OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Ace Productions on 04 May 2004, 07:41:29
-
Hi again,
When using the "getin" EH it returns the unit that entered the vehicle. I've tried in my script to put the condition if this unit is the player then to do something:
?(_unitname==player)
OR
_myunit=player
?(_unitname==_myunit)
but nothing!
Can someone please help me?
-
How do you 'launch' the EH and the sript?
...["getin",{_this exec "srcipt.sqs"}]
then
_unitname = _this select 0
?_unitname == player: sumtin happens...
???
-
Thanks HateR_Kint but as I wrote in my post I've tried that already without any luck.
-
It was more of a question...
But, if you substitute the _this select 0 with _this select 2 it should work...
0 is the vehicle on which the getin EH is 'attached' and 1 is the position (gunner/driver/commander/cargo...)...
Just checked the EH tute at Ed Depot... ;)
-
My friend HateR_Kint I've already done all that but it seems it doesn't like the ?(_unitname==player) line.
-
Well, it worked for me just fine...
I had an jeep with the getin EH and it ran this code:
_unitname = _this select 2
hint format ["%1",_unitname]
~1
?_unitname == player: hint "wupdiduu"
And it worked fine...
No error msgs or anything...
There's bound to be some errors in your syntaxes... ???
-
I'll try it again tonight and let you know tommorow. Thanks a lot anyway for your many replies today.
-
HateR_Kint u were perfectly right.
Thanks again.