Home   Help Search Login Register  

Author Topic: triggers ?  (Read 1569 times)

0 Members and 1 Guest are viewing this topic.

Offline 456820

  • Contributing Member
  • **
triggers ?
« on: 23 Dec 2005, 21:51:25 »
ive just been thinking that if you have a a trigger and have a condition say
!alive soldier1

set to once with a small delay in the box's will it still check if the trigger is needed in the game
Would the trigger say
"Ive activated but still exist, i must check if soldier 1 is alove oh wait im set to once so i shouldnt check again ill just shut up for a fe seconds"

then after a few seconds will it repear that ?
Basically will it reduce lag if in the activation field of a once trigger to delete that trigger will it still cause as much lag as leaving the trigger as it is ?

Just thought of it as im making a rather large assault and theres alot of Lag and im trying to reduce it

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re:triggers ?
« Reply #1 on: 23 Dec 2005, 22:00:24 »
I believe that a trigger set to once will not do anything after it has been triggered. Why would it do anything anymore? It triggered already.

So I think you will not gain anything if you delete triggers which were set to once. You could test it by putting your map full of triggers of type once and seeing if you get any change in performance after all the triggers (which have same condition) have triggered. To notice any difference, you would need a lot of triggers.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:triggers ?
« Reply #2 on: 23 Dec 2005, 22:03:29 »
If you set a trigger to fire once, say and east present trigger then if you monitor

list triggername

You will find that the list changes as units move in and out of the trigger area - even though the trigger fired some time before.  So clearly some thing is happening withthe trigger.

For that reason I delete all triggers once I have done with them.

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re:triggers ?
« Reply #3 on: 23 Dec 2005, 22:07:39 »
If you set a trigger to fire once, say and east present trigger then if you monitor

list triggername

You will find that the list changes as units move in and out of the trigger area - even though the trigger fired some time before.  So clearly some thing is happening withthe trigger.

For that reason I delete all triggers once I have done with them.

Oh well, that sounds like a very good reason to delete triggers after they are not needed anymore. Thanks for the information, THobson. So BIS didn't do it right... or they thought that one would like to query the list even after the trigger fired. There should be an option to disable all, or leave list functioning after triggered.

Offline 456820

  • Contributing Member
  • **
Re:triggers ?
« Reply #4 on: 23 Dec 2005, 22:13:11 »
thnaks guys sounds rather weird
Atleast i checked now i can delete the triggers in my laggy missions but one thing would putting
deletevehicle this in the activation field of a trigger delete the trigger or do nothing or would i have to name the trigger and would putting the delete line in the activation field would that effect anything else in the activation field or will i be fine to do it like that ?

thanks for your help and the quick supplys just went downstairs to get a drink  ;D

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:triggers ?
« Reply #5 on: 23 Dec 2005, 22:16:33 »
You can put the deleteVehicle line in the activation field, but take care.  If you are also calling a script that needs the trigger name or location (say to cause an explosion) then the trigger will have gone by the time the script gets to it.

When I delete a trigger in this way I always put it as the last instruction in the activaion field, so that all the other instructions are run before it is deleted.

To delete a trigger you must give it a name.  this doesn't work the way you expect with triggers

Here is an activation field I made earlier (the trigger is called trig_Scene_Vigny):

Code: [Select]
[] exec "Scene_Vigny.sqs";deleteVehicle trig_Scene_Vigny
« Last Edit: 23 Dec 2005, 22:25:50 by THobson »

Offline 456820

  • Contributing Member
  • **
Re:triggers ?
« Reply #6 on: 24 Dec 2005, 10:18:39 »
thanks Thobosn i understand now thanks for your help everyone of you and i guess thats topic solved