Home   Help Search Login Register  

Author Topic: OK, acouple of questions on ejecting and scripts/create unit  (Read 1009 times)

0 Members and 1 Guest are viewing this topic.

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Hi all,

I'm trying to get the eject command to work on AI, and failing  :-[

Heres my problem.

There are 3 guys in a car. One called 'guy', one called player' and one called 'badguy'. None of them are in the same group. When the car hits a trigger, it speeds up, the driver (guy) dies, and the car is thrown off a cliff  ;)
But heres the problem. I'm trying to get 'badguy' to eject from the car whilst its falling. I've set up a trigger that activates whilst the car is in mid-air. On it, I have put this:

Code: [Select]
badguy action ["eject",car]; unassignvehicle badguy
But, badguy does nothing, and stays in the car. What am I doing wrong here?  ???
Any tips?
« Last Edit: 28 Feb 2005, 20:22:33 by greg147 »
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:OK, acouple of noob questions on ejecting.
« Reply #1 on: 28 Feb 2005, 18:37:39 »
Don't use reserved words (or words you suspect might be reserved) like "car".   Call it "car1" or something, to avoid the risk of confusing the game.

Although I don't know why it doesn't work.   It may be because a ground vehicle is in the air.    Try and get it to work with a chopper, and a car on the ground.

If all else fails, deleteVehicle the loon and createUnit a doppelganger in the air just outside the car.
Plenty of reviewed ArmA missions for you to play

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Re:OK, acouple of noob questions on ejecting.
« Reply #2 on: 28 Feb 2005, 18:50:54 »
Thanks for the reply  ;)

I changed the name of the car to car1

As for the code, it works on flying choppers and cars on the ground. It must just be because the car is in the air that it does not work  :(

I'll try to find a good tutorial for createunit so I can try your other suggestion.  ;)
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Re:OK, acouple of questions on ejecting and scripts/create unit
« Reply #3 on: 28 Feb 2005, 20:20:04 »
OK, heres what I have now.  ;)

When the car goes near the edge of the cliff, a action comes up on the action menu, 'kick seat'. The trigger that activates it is set on 'once', not 'repeatedly', yet the action stays there after it is complete. Here is the script:

Code: [Select]
car1 setvelocity [-22,25,2]
object 4422 setdamage 1
guy setdamage 1
ap setcaptive false

titlecut ["{Driver} AARRGGGGHHHHH!!!!!","plain down",2]

ap RemoveAction ame1

Exit

Heres the activating trigger:

Code: [Select]
ame1=car1 AddAction ["Kick seat","Script.sqs"];
And heres the de-activating trigger:

Code: [Select]
"SoldierE" createunit [getpos badguy,group(badguy)]; badguy setdamage 1; ap RemoveAction ame1
ap being the player, and ame1 being the action variable.
But the action menu thing stay after the triggers are activated  ???
I will replace badguy setdamage 1 with deletevehicle when I learn the correct syntax   ;)


Anyone know how to fix this?
« Last Edit: 28 Feb 2005, 20:22:04 by greg147 »
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:OK, acouple of questions on ejecting and scripts/create unit
« Reply #4 on: 28 Feb 2005, 20:53:01 »
You are adding the action to the car, but removing it from the player.   Hence it is not being removed.
Plenty of reviewed ArmA missions for you to play

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:OK, acouple of questions on ejecting and scripts/create unit
« Reply #5 on: 28 Feb 2005, 22:04:04 »
going back to ejecting the guy:
you could try telling him to eject right before falling off the cliff, and it (and him) should be falling before he gets out

sorry for adding that bit of disorder, but i thought it was a good idea

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Re:OK, acouple of questions on ejecting and scripts/create unit
« Reply #6 on: 28 Feb 2005, 22:43:41 »
@Macguba:
Ah, thats where I was going wrong  ;)  I'll change that ASAP.

@triggerhappy:

Thats what I was trying at first, but he would just be there at the top of the cliff dead, and I really wanted him halfway down or at the bottom  :P . I would have thought the momentum would have pushed him down, but it didn't  :-\

Although that will have to do if nothing else works  ;)
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Re:OK, acouple of questions on ejecting and scripts/create unit
« Reply #7 on: 01 Mar 2005, 20:31:27 »
Success!  :D

The action disappears after its used, and I found out how to get the guy to eject in mid air (without a parachute  8) )

In my trigger I had this

Code: [Select]
Activation: East present
Condition: this
On activation: bad action ["eject", "car1"]

But when I changed it to activation: anyone, it worked  ;D
Now he bails out, and falls aimlessly to the bottom of the cliff. Perfect.  :)

Thanks for all the help  ;)
« Last Edit: 01 Mar 2005, 20:33:00 by greg147 »
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB