Home   Help Search Login Register  

Author Topic: trigger resources  (Read 421 times)

0 Members and 1 Guest are viewing this topic.

Rokket

  • Guest
trigger resources
« on: 25 Apr 2004, 02:38:31 »
I know many triggers can be a resource problem, but what about "activated once" trigs? Does the engine scan them continuosuly, UNTIL they are tripped, and then ignore them? Or does engine scan them after tripping but just not allow them to be tripped again?

 trigs are pretty handy, but I don't want to bog down machines...

Thanks

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:trigger resources
« Reply #1 on: 25 Apr 2004, 10:34:12 »
Triggers I think checks every 0.5 seconds. So your only way out I think is to make a script with a greater loop than 0.5 seconds. But I don't think a 100 0.5 triggers do so much damage.

:beat: *Gets Shot* :beat:

csde-PiLLe

  • Guest
Re:trigger resources
« Reply #2 on: 25 Apr 2004, 18:44:44 »
Well, I just keep wondering who originally said that the size of a trigger did matter (as for resource consumption).

I just tried something with an extremely huge (5000 by 5000) trigger and it did not occur to me that this was different than any other trigger.

Aside from triggers being checked regularly, that is.

I mean, each unit already has his "position" set (as a combination of x and y coordinates on a map - the way triggers are working in OFP is simply two-dimensional.

What the game does, is simply check for each unit that the trigger condition applies to, if it is within the trigger area by comparing x and y values. SO, if you have your trigger set, you always have this amount of checks to do, by checking the trigger area against a given array of units. You can further improve this by doing only one check per vehicle (not per soldier) and so on.

But, as always, dosis fiat venenum. The more triggers you have, the more checks the game has to perform.

So, if you have to use triggers, group them with specified units, if feasible ;)

Cheers
PiLLe

Rokket

  • Guest
Re:trigger resources
« Reply #3 on: 26 Apr 2004, 04:23:47 »
Hmmm...thanks guys. Back to tweaking...