Jump to content

Ok new scripting challenge to figure out!


Recommended Posts

Posted

I want to create shooting range targets hanging from the ceiling that flip up 90 degrees when shot, wait a few seconds then flip back to the starting position. I Have a basic understanding of the rotation part, but what I don't know is how to trigger the rotation when the target is shot.

Posted

How many times do you want them to flip back down after being shot? Do you want the range to be resettable at any point in time?

 

Doing what you are asking in itself is simple, but adding in diversity and accounting for player choice complicates the matter a bit.

Posted

You could make it into a func_door, giving it health values and no movement and a script_targetname. The func_door would target a target_scriptrunner which in turn performs the rotating on the door using an affect() block (I think).

I think func_static might have a health value too, but not sure.

Posted

Umm, @eezstreet how do I set the func_door with no movement?

 

You could maybe go with a func_usable instead with the always_on spawnflag. Give it health "-1", usescript "folder/script" and a script_targetname.

 

Func_static doesn't seem to work with health when I tested it.

Posted

Ok I tried the func_useable with these settings. It flips up and stays that way. It doesn't run the rest of the script (wait 4 seconds and then flip back down).

Posted

Ok I tried the func_useable with these settings. It flips up and stays that way. It doesn't run the rest of the script (wait 4 seconds and then flip back down).

That must be the script's fault.

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...