Jump to content
Sign in to follow this  
Kydoimos

Triggers Not Always Firing

Recommended Posts

I was wondering. One time in about thirty, a script will fail to be called from a trigger or eventhandler. It doesn't happen often, but when it does, it's pretty catastrophic! Is there a way to guarantee the calling of an .sqf? Or a way to double check to make sure it's activated? Thanks all, in advance!

Share this post


Link to post
Share on other sites

Well, what is the context? How is the trigger activated, and what is the event handler, and what makes you say they were supposed to be activated that one of 30th time that they didn't?

Share this post


Link to post
Share on other sites

I can think of a couple of reasons why triggers fail.

They're only check every half second so fast moving objects can pass through small triggers in that time.

The next is a little more difficult to explain.

If a unit enters a trigger it fires, if another unit enters the trigger while the first is still there it doesn't even if set to repeating.

For the trigger to fire again both units need to leave the trigger.

Share this post


Link to post
Share on other sites

There are also some transient conditions that can cause trigger misfires. If a trigger requires a player to be a driver of a vehicle for it to fire, the player alone can cause the trigger to fire just after they exited as the driver of a vehicle. For a short period the player is both a driver of a vehicle and not in a vehicle at all.

Share this post


Link to post
Share on other sites

Ok, I'll try and flesh out a little context. I have a "Get In" eventhandler that fires an .sqf with a unitPlay command. As I said, it works almost always, but every once in a while, it fails to activate the .sqf. It's very rare, but it does happen. I also have the odd problem when I activate a unitPlay command from an .sqf. Sometimes, very rarely, but sometimes, the unit which the unitPlay command is summoning, fails to materialise... any ideas?

Share this post


Link to post
Share on other sites

Can anyone think of a reason why a unitPlay command in an .sqf might not work on occasion? Or why a "GET IN" eventhandler might misfire?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×