Home   Help Search Login Register  

Author Topic: Vehicle Moves When Player Enters  (Read 1343 times)

0 Members and 1 Guest are viewing this topic.

Offline snafu

  • Members
  • *
Vehicle Moves When Player Enters
« on: 08 Mar 2009, 19:33:24 »
Hi all,

I have a helicopter on a landing pad (it has a group already in it) and once the player enters it the helicopter will then take off and land somewhere and all the units in it will get out.

Problem is that the helicopter always takes off and never waits for the player. I have this in the condition of the first waypoint.

Code: [Select]
s1 == heli1
What's wrong?  ???

Offline i0n0s

  • Former Staff
  • ****
Re: Vehicle Moves When Player Enters
« Reply #1 on: 08 Mar 2009, 19:35:51 »
Code: [Select]
s1 in heli1Your check would be if the player will get the heli, but he can't get the heli ;)

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: Vehicle Moves When Player Enters
« Reply #2 on: 08 Mar 2009, 20:17:30 »
Assuming the first waypoint is attached to the helicopter: the helicopter takes off and hovers above the waypoint, right?

One solution is to add "this flyInHeight 0" to the chopper's init field and "heli1 flyInHeight 150" to the first waypoint's activation field.
try { return true; } finally { return false; }

Offline snafu

  • Members
  • *
Re: Vehicle Moves When Player Enters
« Reply #3 on: 08 Mar 2009, 20:19:16 »
That doesn't work either.

I am using the Hellenic Huey's. Since they don't come with co-pilots for the co-pilot seat I have a pilot grouped to the Huey with
Code: [Select]
npc1 moveInCargo heli1 in the co-pilots init field. In addition there are a small group of soldiers with the lead called group1, and in his init field
Code: [Select]
{_x moveInCargo Heli1} forEach Units group1.

Once the Huey has the player on board it will move to a WP beside Corazol, it has
Code: [Select]
s1 in heli1 in its Condition field (and a time of 5 seconds before it 'activates', the next waypoint is a transport unload one at an invisible H at Obregan. Then the Huey has a getout WP at Corazol Airport.

 :dunno:

EDIT

Quote
Assuming the first waypoint is attached to the helicopter: the helicopter takes off and hovers above the waypoint, right?

One solution is to add "this flyInHeight 0" to the chopper's init field and "heli1 flyInHeight 150" to the first waypoint's activation field.

What do you mean by attached? The WP is the Hueys.

The second part just makes the Huey start its engine and not move.
« Last Edit: 08 Mar 2009, 20:26:54 by snafu »

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: Vehicle Moves When Player Enters
« Reply #4 on: 08 Mar 2009, 20:32:57 »
Like in the mission below. The helicopters first waypoint is attached to the helicopter. I've omitted waypoints for the player (like GetIn, GetOut) and did not use Transport Unload (because it won't work here)
« Last Edit: 08 Mar 2009, 21:39:32 by Worldeater »
try { return true; } finally { return false; }