OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Mr.Peanut on 29 Oct 2005, 22:07:08

Title: triggers and setdir
Post by: Mr.Peanut on 29 Oct 2005, 22:07:08
Okay,

I am losing my mind trying to debug a script.  Does setDir work for triggers?  It does not seem to. Can anyone verify this?

Title: Re:triggers and setdir
Post by: dmakatra on 29 Oct 2005, 22:54:38
It's been quite a while but I seem to recall that triggers can't be affected by an set or get command. E.g. getpos, setpos, setdir, getdir. Don't quote me on this though.

:beat: *Gets Shot* :beat:
Title: Re:triggers and setdir
Post by: h- on 30 Oct 2005, 09:07:45
getPos/Dir and setPos/Dir works just fine for triggers...

But why on earth would you need to setDir a trigger ???
Title: Re:triggers and setdir
Post by: THobson on 30 Oct 2005, 10:53:21
dmakatra:
setPos and getPos work fine(ish) with triggers.  The qualification is that setPos [x,y,z] will result in the trigger being placed z above sealevel.  This is usually not important, unless for example you plan to create an environmental sound, or an explosion at its location.

HateR_Kint:
I suppose if you have a trigger that is not a square or a circle you might want to rotate it, say to move a detected by trigger to simulate the effect of a search light or some such.  Just a thought.
Title: Re:triggers and setdir
Post by: Mr.Peanut on 31 Oct 2005, 01:38:22
I am setPosing and setDiring trigger for random tripwire mine placement.  setDir is not behaving though.  Try the following.  Place a long thin trigger running east- west and a unit just south of the trigger's centre, just outside of trigger range. Set trigger to do something when any unit is present. Now in the ECP debugger setDir the trigger to 90 degrees and it does not fire...

edit:
Just tried it again. setPos works setDir does not. After using setDir on a trigger, getDir returns the angle you set it to, but the the trigger orientation does not really change.  If someone can verify this I will add it to the bugged command thread.
Title: Re:triggers and setdir
Post by: bedges on 31 Oct 2005, 07:57:02
you're right; just tested and setdir does not work on triggers.