Jump to content
Sign in to follow this  
daza

Creating Gamelogic problem and initialising LightOn problem

Recommended Posts

I'm working on a searchlight script for a chopper. And ive got it working

pretty well, when i have the lights sitting on the runway and a gamelogic to turn them on, and an addaction to a script that attaches lights to chopper.

However, i want to be able to create the searchlights using createvehicle command, and that works. But they attach turned off, the gamelogic is still there, but obviously at start when it ran its init, the searchlights didnt exist.

So i tried to create a gamelogic with the same script that creates the searchlights. But it doesnt work, i do not know if the gamelogic failed to create or if it did the initialisation failed because ive got some syntax error.

I was wondering if someone could point out my problem or whether i need to go about this another way. It seems Gamelogic is the only way to turn on a searchlight when its unoccupied.

glog2 = "logic" createVehicle (getpos heli2);

glog2 setVehicleInit "this action [""lightOn"", spot4]; this action [""lightOn"", spot5]; this action [""lightOn""", spot6];";

**Update**

Trying different syntax i did this,

glog2 = "logic" createVehicle (getpos heli2);

glog2 setVehicleInit "this action [""lightOn"", spot4]; this action [""lightOn"", spot5]; this action [""lightOn"", spot6]";

And in the Arma.rpt error report it said "UnExpected call of CreateVehicle for 'logic', pos(4561.181152.2,339.058105.2,10243.977539.2). Vehicles with brain cannot be created using 'createVehicle'!"

So how do you create a gamelogic from a script if it doesnt like the way im doing it?

My second problem since this relates to the same thing. If i am a gunner on chopper and i click on my addaction to move to spotlight nothing happens. But outside of the chopper standing next to it, i can move via addaction to spotlight as gunner no problem.(I cant say for going from back seat to Spotlight because the chopper i am using doesnt have backseat option for some reason, only sitting at sidedoor) Why am cant i jump from chopper gunner to spotlight? it is possible to jump from crew chief to other door gunner and back again. Why cant it be possible to do so to the searchlight?

Thanks for your input guys

Daza

Edited by Daza
typo

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×