Jump to content
Sign in to follow this  
Powerstrip

multiple scripting questions

Recommended Posts

Multipart question 1: _Unit = mygroup createunit ("MQ9Predator", POS, (), 0, "FLY"); this will not spawn a pre-manned predator, the predator flashes on the screen for a second and instantly deletes. () i used these in this post cuz i typed this from a phone and there are no square braces. 2: how can i force an ai pilot to maintain an altitude in script. i used FlyInHeight but he will only fly to that altitude initially. once he spots an enemy target he will drop to around 100 altitude and get shot down. 3: i would like to add a feature in my scripts that allows me to open up the map and place a marker where i clicked that way i can set a waypoint on the marker pos.

Share this post


Link to post
Share on other sites

You can't createUnit an MQ9 since it needs a driver. createVehicle one and createUnit a pilot and moveInDriver the pilot into the MQ9. Or use the functions for it:

grpUAV = createGroup west; 
_va = [position logUAVSpawn, random 360, "MQ9PredatorB_US_EP1", grpUAV] call BIS_fnc_spawnVehicle;
myUAV = _va select 0;
modUAV synchronizeObjectsAdd [myUAV]; 

Can't really stop that if you want them to still attack.

That's default behaviour, minus the marker part, but you can select a unit and click on the map to assign a waypoint. Just double click afterwards to place a marker if you need.

Share this post


Link to post
Share on other sites

Thanks for the reply but: 1: for the uav i am already doing it the way you suggested and then syncing it to the uav module. it works and it has all of the functions of a uav accept it doesnt seem to use the typical uav circular waypoit flight pattern. 2: can i set the ai behavior to ignore targets so it will stay at a safe altitude. i dont need them to attack, the uav is simply to locate enemy d30 & AA installations. 3: the marker iwant to do just likee the artilleery system. where you click a location on the map, and arty will hit that marker loc. i want to figurre how to add to my script the abillity to place a marker on mouseclick so that i can do something on the marker . for example one of my scripts adds a reinforcement squad on my location. instead of spawning it on my location id like to be able to bring up the map, click to create marker then have the reinforecments spawn on that marker . i know how to make the reinforcments spawn on the marker, just not how to place a marker

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  

×