OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: bedges on 10 Sep 2005, 12:40:12
-
everyone knows setpos moves things from one place to another. my question is, do these moving things go through a transitional 'place'?
reason i ask, i have a transporter script on the go within the 1985 campaign, and in a couple of missions whenever the player is transported, 4 seconds later he dies. i've opened up the missions in the editor and found some triggers into which the player must stumble to make some gunfire sound effects and kill him 4 seconds later. there's another mission with a 'player not present' trigger which does the same. in neither case was the player anywhere near the triggers/outside the trigger when the setpos occurred.
i can't see anyplace else that the condition could be set, but nor can i see how a straight setpos from one place to another would fulfil the trigger condition... :-\
-
I had smth similar once,a player who dies and respawns triggers a"player not present" trigger.
Maybe the setpos command is the result of "Deletevehicle" and "Createvehicle",and the time between delete and create fires the trigger. ???
-
I had smth similar once,a player who dies and respawns triggers a"player not present" trigger.
Maybe the setpos command is the result of "Deletevehicle" and "Createvehicle",and the time between delete and create fires the trigger. ???
Oh definatly not, setpos simply repositions an object. However, I can understand if setposing a unit within a not present trigger will cause it to fire, but why... I don't think that is the case however, but still I have no idea. Think you can give a little more information? Possibly a layout of the triggers and your unit and where you setpos him to?
-
take a look at the 1985 missions "hind attack" for the surrounding triggers which are fired when the player is setpos'd from A to B, B being nowhere near any of them...
and "incursion" for the 'not present' trigger activated by the player being setpos'd from A to B, B still being within the trigger.
-
This is probably because when you SETPOS to an unset location it'll send the player to 0,0,0 (to my knowledge) or at least 'drop' him there for a millisecond before realising the script doesn't work.
Lemme give it a look.
-
This is probably because when you SETPOS to an unset location it'll send the player to 0,0,0 (to my knowledge) or at least 'drop' him there for a millisecond before realising the script doesn't work.
Lemme give it a look.
No it doesn't do that, the setpos is instantanious. My guess is that the trigger just checks it too quickly. If you remove the trigger's on activation and use a script to check if the player is not in the trigger with a loop with a 1 second pause, then it should work.