Home   Help Search Login Register  

Author Topic: Moving player out of vehicles in flight  (Read 690 times)

0 Members and 1 Guest are viewing this topic.

Offline DarkAngel

  • Members
  • *
  • The night is my friend.
    • DarkAngels Missions
Moving player out of vehicles in flight
« on: 06 Oct 2004, 21:28:30 »
A slightly tricky question here, can't seem to work out how to do this one...

I'm making a Nam mission for my forthcoming campaign, which begins with the player making an overflight in the recon zone. I've worked out the scripting for the overflight using OnMapSingleClick and it works well, but then the problems start. I then need to move the player out of the overflight vehicle and into the insertion chopper. The script's on another computer but it's something like this (BirdDog = the overflight plane, p = the player, InsertBird = insertion chopper)

unAssignVehicle p
deleteVehicle BirdDog
p AssignAsCargo InsertBird
p moveInCargo InsertBird
(I also use the join command to put the player back together with his group)

The InsertBird is just sitting on the ground, ready to take off. But for some reason the player doesn't move into it and instead falls to his death. Any idea why this happens? Or is there any way round this problem? I've tried using setPos to place the player back on the ground, but he's still splatting as if he'd fallen. I guess I could try to make it a two-mission campaign (it's part of an up-and-coming campaign anyway) but at the moment I can't get my head round the campaign tutes on here...

Any ideas anyone?
"Moondark" in Beta Testing

Kammak

  • Guest
Re:Moving player out of vehicles in flight
« Reply #1 on: 06 Oct 2004, 21:55:17 »
The problem is not the script.  I just typed it in to a radio trigger, and it works fine.

I would imagine you have a typo when referring to the "InsertBird" - perhaps the name in the script doesn't match the object  name?  Or maybe the InsertBird is full and can't fit the player?

Or the other really obvious thing could be - are you sure the player unit is named "p"?  That would explain why setPos'ing him didn't work either - if you had the wrong unit name!  :)


But the script you posted is fine.  It works.
« Last Edit: 06 Oct 2004, 21:56:43 by Kammak »

Offline DarkAngel

  • Members
  • *
  • The night is my friend.
    • DarkAngels Missions
Re:Moving player out of vehicles in flight
« Reply #2 on: 06 Oct 2004, 22:29:54 »
Thanks Kammak, I double-checked all the typing, chopper names etc and realised that the InsertBird was set to Flying and SetFuel 0. So I changed it, and I don't die any more. But I still don't get moved into the chopper. And the really odd thing is, the computer thinks I am - I got a hint to come up @p in chopper and, although I'm still standing on the runway, the hint comes up. Maybe a version thing? - I'm using v1.96b. I can circumvent it by having the chopper wait a few seconds before take off, but it seems very odd.

Cheers for your help,
Dark
"Moondark" in Beta Testing

Kammak

  • Guest
Re:Moving player out of vehicles in flight
« Reply #3 on: 06 Oct 2004, 22:46:58 »
That's weird!

I've got 1.96 too.  If you figure it out, post the solution.  I'm curious now!


Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Moving player out of vehicles in flight
« Reply #4 on: 07 Oct 2004, 01:36:38 »
I haven't tried it but I think the order of the commands is no good.

Unassign will make the player eject.  (I'm surprised he doesn't parachute to the ground.)     I'd start with the moveInCargo:   once he is safely in the new vehicle you can start sorting out all the assignment stuff.    Only once everything is settled should you get to the deleteVehicle part.

But, it may just be a OFP "feature".   The answer with these is always just to play with it, using as much lateral thinking as you can muster, till you find a solution that you can live with.    If you want perfection you can whistle for it.
Plenty of reviewed ArmA missions for you to play

Kammak

  • Guest
Re:Moving player out of vehicles in flight
« Reply #5 on: 07 Oct 2004, 06:12:43 »
No, thats not the issue.  I *did* try it, and it works okay.  While I agree the order isn't the best, it still works.

When I tried it, the guy "teleported" right into the helo on the ground without any trouble.

I still think the issue is a name/variable one.  If the check for "p in <heloname> is true, yet the player is on the tarmac, it makes me think another unit is being affected by the script, and not the player unit.

I would like to see the mission/script myself and play with it.  Its very curious.


Kammak

  • Guest
Re:Moving player out of vehicles in flight
« Reply #6 on: 07 Oct 2004, 06:22:00 »
Unassign will make the player eject.  (I'm surprised he doesn't parachute to the ground.)

??

When run on a player, unassign has no effect.  When run on an AI in a helo, unassign makes the helo land and the AI gets out, then the helo continues on its waypoints (the gunner takes over as pilot).

At least that is what happens with standard BIS units and helos.



Offline DarkAngel

  • Members
  • *
  • The night is my friend.
    • DarkAngels Missions
Re:Moving player out of vehicles in flight
« Reply #7 on: 07 Oct 2004, 11:10:11 »
Right, now this is getting seriously odd, because last night, after I moved the chopper a couple of meters east, it suddenly all started working as planned. I have *absolutely NO idea* why this should be the case, since I didn't alter the scripting one iota. So I guess I'll just leave it as it is.

The magic of OFP strikes again...
Thanks for your help guys.
"Moondark" in Beta Testing