Home   Help Search Login Register  

Author Topic: timer for airplane  (Read 547 times)

0 Members and 2 Guests are viewing this topic.

Commando

  • Guest
timer for airplane
« on: 02 May 2003, 01:16:35 »
is there a way to make a civilian plane to take off after a certain amount of time? Also how did they make the time table in the res campaign for the bus? ???

CrashnBurn

  • Guest
Re:timer for airplane
« Reply #1 on: 02 May 2003, 03:13:48 »
Put yer plane on the taxiway facing south and give it waypoints (not on the airfield...not required there), and set the fuel slider to '0' in its properties, and give it a name. Make a trigger, 0 x 0 radius, and in the condition remove the word this and put a condition-
time > 300

In the on activation box put-
planename setfuel 1

The 300 is time (in seconds) since the mission started. Change that to however many seconds you want it to wait there. The bus schedule is done with the "drop" command. Look for tutorials on that in the editors depot.

Here's a script I made a while back for an airtour that departs every hour on the hour between 8 am and 8 pm, and flys around Nogova island. It uses no waypoints and works great. Maybe you could learn something from it.

;Nogova Scenic Tours script by -CrashnBurn-
;Nogova scenic tours flight info.
;Flights leave at the top of every hour from 8AM to 8PM.
;flight duration is apprx. 20 minutes.
;to call script - [planename, drivername] exec "airtour.sqs".
;place empty Cessna (locked with 0 fuel) on taxiway facing
;south at southwest airport, near large hangar (object 61291)
;and civilian or whatever unit nearby as pilot.
;Pilot will board and disembark plane by script.
;plane is checked for landing damage and fixed/refueled after every flight.
;-----------------------------------------------------------------------------
_unit = _this select 0
_unit2 = _this select 1
;------------------------------------------
#start
? !(alive _unit2): exit
? !(canmove _unit): exit
?(daytime > 7.9 && daytime < 8.1): goto "tour"
?(daytime > 8.9 && daytime < 9.1): goto "tour"
?(daytime > 9.9 && daytime < 10.1): goto "tour"
?(daytime > 10.9 && daytime < 11.1): goto "tour"
?(daytime > 11.9 && daytime < 12.1): goto "tour"
?(daytime > 12.9 && daytime < 13.1): goto "tour"
?(daytime > 13.9 && daytime < 14.1): goto "tour"
?(daytime > 14.9 && daytime < 15.1): goto "tour"
?(daytime > 15.9 && daytime < 16.1): goto "tour"
?(daytime > 16.9 && daytime < 17.1): goto "tour"
?(daytime > 17.9 && daytime < 18.1): goto "tour"
?(daytime > 18.9 && daytime < 19.1): goto "tour"
?(daytime > 19.9 && daytime < 20.1): goto "tour"
~1
goto "start"
;------------------------------------------
#tour
? !(alive _unit2): exit
? !(canmove _unit): exit
?(player distance _unit < 500): _unit2 globalchat "Nogova Scenic tours departs in 5 minutes!"
~300
? !(alive _unit2): exit
? !(canmove _unit): exit
?(player distance _unit < 150): _unit2 globalchat "All aboard for Nogova Scenic tours!"
_unit2 assignasdriver _unit
[_unit2] ordergetin true
;-----------------------------------------
#check
? !(alive _unit2): exit
? !(canmove _unit): exit
?(_unit2 in _unit): goto "flight"
~random(3)
goto "check"
;-----------------------------------------
#flight
_unit2 setbehaviour "CARELESS"
_unit lock false
~random(10) + 10
? !(alive _unit2): exit
? !(canmove _unit): exit
?(getdammage _unit > 0.1 && canmove _unit): _unit setdammage 0
_unit setfuel 1
~1
;-----------------------------------------
;takeoff and go to Modrava
_unit2 move getpos (object 173988)
~180
_unit setspeedmode "LIMITED"
@ Unitready _unit2
;-----------------------------------------
; go to Bludov
_unit2 move getpos (object 2560)
@ Unitready _unit2
;-----------------------------------------
;left turn
_unit2 move getpos (object 2887)
@ Unitready _unit2
;-----------------------------------------
;right turn toward mountain
_unit2 move getpos (object 3459)
@ Unitready _unit2
;-----------------------------------------
;go to Mokropsy
_unit2 move getpos (object 2849)
@ Unitready _unit2
;-----------------------------------------
;left turn
_unit2 move getpos (object 5109)
@ Unitready _unit2
;-----------------------------------------
;right turn
_unit2 move getpos (object 4532)
@ Unitready _unit2
;-----------------------------------------
;go to Kvilda
_unit2 move getpos (object 99124)
@ Unitready _unit2
;-----------------------------------------
;go to Loukov
_unit2 move getpos (object 134540)
@ Unitready _unit2
;-----------------------------------------
;go to Okrouhlo
_unit2 move getpos (object 171925)
@ Unitready _unit2
;-----------------------------------------
;go to Bor
_unit2 move getpos (object 171854)
@ Unitready _unit2
;-----------------------------------------
;turn right near bridge
_unit2 move getpos (object 172610)
@ Unitready _unit2
;-----------------------------------------
;go to Velka Ves
_unit2 move getpos (object 172)
@ Unitready _unit2
;-----------------------------------------
;go to Varta
_unit2 move getpos (object 70496)
@ Unitready _unit2
;-----------------------------------------
;go to Joudov
_unit2 move getpos (object 83214)
@ Unitready _unit2
;-----------------------------------------
;go to Vidlakov
_unit2 move getpos (object 158202)
@ Unitready _unit2
;-----------------------------------------
;land at southwest airfield
_unit land "Land"
;-----------------------------------------
#check2
?(_unit distance (object 61290) < 75): goto "park"
~0.5
goto "check2"
;-----------------------------------------
#park
_unit setspeedmode "NORMAL"
_unit setfuel 0
~random(5) + 10
unassignvehicle _unit2
_unit2 setbehaviour "SAFE"
?(player in _unit): _unit2 globalchat "Thanks for flying Nogova Scenic Tours!"
?(player in _unit): player action ["EJECT", _unit]
_unit lock true
;-----------------------------------------
goto "start"
« Last Edit: 02 May 2003, 04:23:46 by CrashnBurn »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:timer for airplane
« Reply #2 on: 02 May 2003, 11:03:41 »
If you've seen something in a mission - official or use - and want to know how its done, just un pbo the mission and have a look.  Amalfi's pbo decryptor 1.5 is the best tool I know of for this, and handles official campaigns very happily.
Plenty of reviewed ArmA missions for you to play