OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Ding on 01 Sep 2005, 09:14:05
-
ive been trying to ge this to work, and im having difficultys with it, What im trying to do is when you land a BIS Camel the trigger is activated i cant seem to get it to work though, this is what im trying to do in the editor>
Condition: this && Getpos Player select 0 < 2
that didnt work, i also tried the following:
this && Getpos Player select 0 <= 2
this && Getpos Player select 0 >= 2
this && Getpos Player select 0 == 0
this && Getpos Player select 0 > 2
no luck with any of them though
-
Do you need the 'this &&' part of it? What type of trigger are you using?
-
If you're trying to activate the trigger when the plane reaches a certain height, then you need the 'z' value, and that should be
Getpos Player select 2 < 2
Couple of other ideas if this doesn't work.
-
it is a trigger over an airfield that you are meant to land at, i want the trigger to activate when the player lands, or gets down to 2 meters or less on the air field, and the trigger is grouped to the player's aircraft, all i want it to do is activate when the player lands at this specific airfield. i just tried that now silent1 and it didnt work :(
-
silent1 is on the right track. to isolate the height you do need the z coordinate using getpos player select 2. try putting
height = getpos player select 2
in the init line of the player and then in your script try
condition: this AND height =< 2
this might help
also try a higher number like 3 because the vehicle you are in might be holding you slightly above 2
hope this helps :-\
-
tired it and it still dosnt work
-
what is in the activation field of the trigger (eg. west present). it might be that it isnt completing that. either that or my snytax is wrong :-[
-
maybe "()" are required?
this AND (getpos player select 2) < 2
or
this AND ((getpos player select 2) <2)
I don't know, just thinking out loud right now.
-Student Pilot
-
bored_onion is close I think, but by setting the variable height in the player's init field will just set it to the value at the start of the mission. Maybe that is what you want and I just mis-read the quesiton.
You have a trigger right? It is grouped with the player right? It activates when the vehicle is in the trigger area right?
Then put the following in the condition field of the trigger:
this and (getPos (vehicle player) select 2 <= 2)
The trigger will then fire when the player's vehicle is in the trigger area and the height of the vehicle is <= 2.
Check that you have 0 inthe Min Max and Mid fields.
The problem might be that the getPos select 2 of a player in a vehicle might behave the same as it does when he is in a building, it measures his height from the floor he is standing/sitting on. You could check this by creating a repeatable radio trigger with the following inthe activation field:
hint format["height of player = %1\nheight of plane = %2",getPos player select 2,getPos (vehicle player) select 2]
-
works perfectly thobson, thanks to everyone for your replys :)
-
For some reason it has suddenly stopped working,i just put an aircraft in the editor and when i landed using that command it worked, but then i copyed the plane and the trigger into my other mission, they were still grouped and then made myself the player of that plane and it didnt work when i tried to land it ???
-
Have you used my hint to find out the height of the player and the plane? What are the results?
Is it the same island, and the same place on that island?
Bye the way I thing I was wrong in suggesting that getPos in a vehicle might be working the same way it does in a house. The problem could well have been that although the plane was on the ground the player was still > 2 m above ground
-
its the same island in exactly the same place, i changed it up to 20 and it still didnt work, i also then changed the trigger to a regular this, Grouped it to the plane, and it still didnt work? ??? im probably doing somthing realy obviously wrong but i cant see what it is.
ive figuerd out what hte problem is, for some reason End1 isnt working (maybe because i used it in the intro?) i'll just use end2 instead.
-
What results do you get from the hint I gave you?
-
the result i got was that the plane was at -1 (rounded up) and the player was at 0.8 (Rounded Up), well it works fine now, thanks :D
-
I am puzzled. What did you change?
-
well for some reason it wasnt activating the End Mission #1 so i changed it to the second one and it worked fine. I will solve this now :)