Jump to content

Scripted elevator only runs once

Recommended Posts


Loosely following a related tutorial, I created an elevator with top and bottom buttons, and the platform waits at the last position until the correct button is pressed (rather than a func_plat that always returns to start). This involved using func_static, ref_tag's, and two simple scripts with target_scriptrunner's. The elevator works great and successfully descends when I press one button and ascends when I press the other. However, this cycle only works one time.

Does anyone know why that might be? The tutorial I was following said that having count = -1 on the triggers would give it infinite uses so I made sure to include that (although I tried it without). The buttons are able to be used, still, but the elevator does not move.


Share this post

Link to post

You need the count -1 on the target_scriptrunner, not the trigger_multiple. That should fix it.

Also, a better practice would be to avoid target_scriptrunner altogether for this. Just add a useScript to the trigger_multiple, and you'll get your infinite uses and save a few entities in the process.

Edit: I've found that func_door is a lot more useful for scripted elevators. Func_static doesn't have a lot of extra utility to it. 

Also, instead of ref_tag, you can use a move block in your script to literally move the elevator anywhere you want in the entire map. Ref_tag is valid, but not nearly as flexible.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...