OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: MehMan on 31 Jul 2006, 17:17:23

Title: Setpos on a trigger?
Post by: MehMan on 31 Jul 2006, 17:17:23
Is that possible? I'm experimenting with some stuff and I can't get the trigger to be placed where I want it, as in I can't get it to be where I click for example, is this even possible?
Title: Re: Setpos on a trigger?
Post by: Planck on 31 Jul 2006, 19:28:14
I presume you are referring to placing a trigger in the mission editor.

I don't understand what difficulty you might be having with this if so.

You just select Triggers (F3).....

and double click on the map to bring up the trigger dialog.

You can of course drag the trigger elsewhere afterwards if necessary.


If this is not the problem, please explain a little more.


If you are trying to setPos a trigger as the title suggests then this also is perfectly possible.
Placing the trigger by clicking on the map should also be possible, but you would need to use onMapSingleClick.

Maybe something like:

onMapSingleClick {triggername setPos _pos; onMapSingleClick {}}



Planck
Title: Re: Setpos on a trigger?
Post by: MehMan on 31 Jul 2006, 20:23:57
Yeah, somehow I got it working the second time around, wierd. Well thanks anyway.
Title: Re: Setpos on a trigger?
Post by: THobson on 12 Aug 2006, 22:26:16
Note that setPossing a trigger

trigname setPos [x,y,z]

will place the trigger z metres above sealevel
not a problem if it is just a trigger, but bit of a pain if it is to be used as a sound source, or the location of an explosion.