Home   Help Search Login Register  

Author Topic: LockWP Dosen't Work, And Lights  (Read 573 times)

0 Members and 1 Guest are viewing this topic.

LAPD

  • Guest
LockWP Dosen't Work, And Lights
« on: 27 Nov 2002, 17:40:53 »
Hi :wave:

I have a few problems:

1. I have a plane named Plane (so unexpected  ;) ). In the start of the mission you sposed to see the plane asking for premission to take off and then he gets premission and it will fly. So I tried to stop him from movinf by using the Plane LockWP True in a script, but he is still moving, and all that I tried didn't work. Any suggestions will be grateful.

2. I tried using the STR_ACTION_LIGHTON to get the chopper lights on (of course in the night). Didn't work. What to do?

Thanks  :)

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re:LockWP Dosen't Work, And Lights
« Reply #1 on: 27 Nov 2002, 18:52:53 »
Hello... :D

1) Hm, you could try the good ol' Stop command (unit Stop TRUE). It's possible lockWp just stops the next waypoint from "appearing", and the plane might just taxi to his current one (which would be the taking-off one). But that's rather far-fetched.

The ultimate solution to this is to quite simply remove the fuel of the plane -> no fuel, no moving. ;D It's always the best to utilise the simiplest solutions when fighting the AI.

so, the trick here is: unit setFuel 0.0 in the appropriate field, afterwhich you will want to put a unit setFuel 1.0 after the authorization has been given.

2) I think the correct command would be unit Action["LIGHTON"], possibly unit Action ["LIGHTON", (vehicle unit)]
But that one's very much fickle, and I woulnd't trust it for two seconds. Your best bet is to use the behavioural commands...in Safe and Careless mode the choppers will always have their light turned on, and in Aware, Combat & Stealth they'll be turned off. So, use the setBehaviour command to have them turn on/off their lights (note, that the chopper'll probably switch to aware for a moment if it spots enemies, thus turning off the lights, so in enemy-rich situations use careless). Syntax -> unit setBehaviour "Safe"

Right, better post this before someone quicker beats it to me ;) Good luck!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Calamity

  • Former Staff
  • ****
  • Calamity Strikes AGAIN!
    • DataCraft Enterprises
Re:LockWP Dosen't Work, And Lights
« Reply #2 on: 27 Nov 2002, 19:04:49 »
Why don't you use a Trigger instead? There are two more ways you can stop a WP from tripping besides the LOCKWP command.
A) In the WP condition field put a Boolean variable.
I.e. "this AND CLEAR_TO_FLY"
In the Init field of the plane type "CLEAR_TO_FLY = FALSE" This Init field will be executed as soon as the plane is created and the condition of the WP will not be met until some other logic, such as a trigger, sets the CLEAR_TO_FLY = TRUE. The plane will taxi to the WP and stop.
B) Since, in my example, you are using a trigger to set the CLEAR_TO_FLY variable = TRUE, Why not just Sync the WP to the trigger! In this circumstance you will not need to use a Boolean variable. Instead just drag a sync line between your WP and the trigger. Set your triggers condition field to whatever logic you desire: WEST:PRESENT, or RADIO ALPHA, or even another Boolean variable! Again, the plain will taxi to the WP and stop. It cannot go further.

If, however, the plane is taxing ARROUND the WP, not moving to the next WP but not stopping either you could use the command "PLANE ACTION "ENGIN OFF" in a trigger set to fire when the plane enters it. Place this trigger right next to the WP and in the path of the plane.

The lights command should look like "CHOPPER ACTION "LIGHTS ON""

Hope this helps
Calamity

LAPD

  • Guest
Re:LockWP Dosen't Work, And Lights
« Reply #3 on: 28 Nov 2002, 18:16:52 »
Thank you both :)

I tried to remove the plane's fuel. It worked, the plane didn't move, but a new problem came out. The instruments of the plane didn't have any light (you know, in the night the insturments have lights so you can see them). The thing is the the camera view is inside the plane in the night, so I really need those instruments lights working.

So, I headed to the second way. Now, the plane had fuel so the instruments lights worked, but the plane started to move along the runway for 10 seconds or so until it stopped (It's right in the start of the mission). That's really not good, because I need the plane staying in one place and moving to the second waypoint only after permission.

If there any way or command to get the instruments lights to work (the plane lights work when I made his behaviour "Safe") and getting the plane to stay on his place it will be good.

One last thing, I tried the "(!canmove Plane)" and all the other stop commands but it didn't work.