OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: D_P_ on 17 Mar 2007, 04:37:34

Title: can a trigger be moved during a mission?
Post by: D_P_ on 17 Mar 2007, 04:37:34
anyone know if it's possible to setpos a trigger? like can you move a respawn killzone 10meters back ingame? i know, weird question.
Title: Re: can a trigger be moved during a mission?
Post by: hoz on 17 Mar 2007, 05:17:04
I'm not sure if it will work but you could always test it by getting the position of the trigger then setpos the trigger and then compare. Alternatively you can create a new trigger on the fly at the new location.
Title: Re: can a trigger be moved during a mission?
Post by: D_P_ on 17 Mar 2007, 06:34:45
I've tried getting it to move but can't  :(

Quote
Alternatively you can create a new trigger on the fly at the new location.

^^not sure I understand?  :dunno:
Title: Re: can a trigger be moved during a mission?
Post by: Cheetah on 17 Mar 2007, 09:32:13
As far as I know Thobson used one trigger for multiple purposes in Abandoned Armies, so you should be able to move them. He also advised me once to keep a trigger following the car (setPos it on the car while it drives.

Should work.
Title: Re: can a trigger be moved during a mission?
Post by: h- on 17 Mar 2007, 09:35:04
Yes (as cheetah already points out), you can setPos a trigger :yes:
Just name your trigger and it can be accessed like any other object (setPossed, deleted..).

Quote
not sure I understand?
hoz means that as ArmA includes commands for creating a trigger and setting it's attributes you can create fully functional triggers by scripting
createTrigger (http://www.ofpec.com/COMREF/ArmAOnly/index.php?action=list&game=All&letter=c#createTrigger)
And the commands to set all the 'innards' of the trigger start from
setTriggerActivation (http://www.ofpec.com/COMREF/ArmAOnly/index.php?action=list&game=All&letter=s#setTriggerActivation)
Title: Re: can a trigger be moved during a mission?
Post by: D_P_ on 17 Mar 2007, 19:16:27
wow - thanks - i was unaware of the createtrigger and settrigger activation!
That looks awesome :D
thanks again~
Title: Re: can a trigger be moved during a mission?
Post by: The-Architect on 09 Apr 2008, 23:47:08
I know this thread is old but the info is still needed.
How do I move a trigger or create a trigger?

Move would be preferable.

The links in this thread no longer work.
Title: Re: can a trigger be moved during a mission?
Post by: Mandoble on 09 Apr 2008, 23:50:55
Yes (as cheetah already points out), you can setPos a trigger :yes:
Just name your trigger and it can be accessed like any other object (setPossed, deleted..).
Title: Re: can a trigger be moved during a mission?
Post by: The-Architect on 09 Apr 2008, 23:53:51
So I use,

Code: [Select]
trigname setpos getpos GLname
I knew it all along, just couldn't remember.