OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 22jacket on 31 May 2006, 00:25:17

Title: ground to chopper/plane
Post by: 22jacket on 31 May 2006, 00:25:17
Is there a way I can teleport from the ground into an aircraft...so that I can then halo out of the aircraft..back down to ground then go back to the same position and have another go....
Title: Re: ground to chopper/plane
Post by: XCess on 31 May 2006, 00:38:37
mak a repeating trigger with radio activatiion, and in onActivation field type "player moveincargo heloname"
Title: Re: ground to chopper/plane
Post by: 22jacket on 31 May 2006, 01:41:25
cheers//..that worked ok...can i just walk up to trigger and it will take me to plane or do i have to keep using radio..
Title: Re: ground to chopper/plane
Post by: XCess on 31 May 2006, 01:45:52
you can group the player to the trigger.
Title: Re: ground to chopper/plane
Post by: 22jacket on 31 May 2006, 01:56:46
works a treat..thanks..one last question..lol  how do i get 2 or more players to use it..individually..sorry for being a noob..
Title: Re: ground to chopper/plane
Post by: Wolfrug on 31 May 2006, 02:05:03
Easiest is to just make two identical triggers on top of each other, and group them to different players.  8)

Otherwise I'd have to start thinking. If you don't like the solution, I can start thinking. Tomorrow. :D

*ambles off to bed*

Wolfrug out.
Title: Re: ground to chopper/plane
Post by: 22jacket on 31 May 2006, 02:11:43
top banana ..many thanks.... ;D
have a good sleep..lol/
Title: Re: ground to chopper/plane
Post by: Flauta on 31 May 2006, 02:51:52
another solution is to add them an action... like these

Code: [Select]
loon1 addaction ["Back to the chopper","gobackloon1.sqs"]
and in gobackloon1.sqs

Code: [Select]
loon1 moveincargo helloname
exit

and the same whit loon2...
its the long and odd way to do it.. but it shows it like an action and not on the radio...

Hope that helped..

Title: Re: ground to chopper/plane
Post by: XCess on 31 May 2006, 03:57:35
it's always best to assign an action a name:
_actionName = player addAction ["text","scriptname.sqs"]

Because then, when the action needs to be removed things become much simpler as you can use the action name rather than an index number which can be very unreliable.

player removeAction _actionName
Title: Re: ground to chopper/plane
Post by: Mandoble on 31 May 2006, 08:55:32
The automatic arguments of any action-triggered script are:
Code: [Select]
;stripttriggeredbyaction.sqs
;
;Unit that has the action
_unitacc = _this select 0
;Unit that activated the action
_unit = _this select 1
;Action index
_actionidx = _this select 2
;To remove, if needed:
_unitacc removeAction _actionidx

... whatever code you need

exit

Title: Re: ground to chopper/plane
Post by: 22jacket on 31 May 2006, 14:42:32
sorry dudes..but the lasat bit was over my head..lol...i can use the simple solution..hhehehehe...many thanks for your help......