Jump to content
Sign in to follow this  
bibblebabble

Some semi-noob questions for mission making

Recommended Posts

Hi!

I've got some great ideas for some missions, for this fabulous game smile_o.gif I'm employed as a software developer, so I'm not clueless as far as actual coding goes, however, I have a few questions/hurdles before I can start smile_o.gif

My plans involve airstrikes (in the form of Napalm-esque strikes, akin to "I love the smell of napalm in the morning" scene from Apoc' Now.) and also involves drop-off's and evac's. smile_o.gif So, to begin:

- How do I spawn new units/vehicles after a trigger? I understand triggers, but the actual creation of units is my current problem. Do I have to create them somewhere out of sight (at map start) and call them in when needed, or can I spawn them on an action?

- How do I group units together, then allocate instructions to that group? Something like "group1 goto [x,y]" instead of "unit1 goto [x,y]; unit2 goto [x,y]"

- How do I get a group of Harriers to attack the same point, which doesn't necessarily have a target? Currently I'm using "harrier1 fire "Bomblauncher"" but that of course is not entirely accurate, and when a group does it, they fall quite far apart. At first I thought about having say a row of satchels explode (thus the harrier doesn't drop any munitions at all) but I can't find/create the satchel object.. have I simply missed it, or is it impossible to spawn some objects?

Much obliged for any help smile_o.gif

Share this post


Link to post
Share on other sites

That's great, thanks smile_o.gif

I'm now just having issues creating pretty explosions. I saw Chris' OFP Editor had a LandMine script come with, but it doesn't create an explosion anymore (I'm assuming it does create the unit, then removes it. I've changed it from Heat125 as those are not present in ArmA smile_o.gif)

Share this post


Link to post
Share on other sites

This mission example may help.

I've just modified some scripts from OFP to run in AA, I can't get my head around sqf's and it's taken me 5 years just to learn sqs! There may be better ways of achieving the same results but it works for me.

I've commented them to try and explain what is going on so it's hopefully self-explanatory.

Just so it's clear, the scripts aren't mine, I've nabbed them from a DMA template, tweaked them for AA and credit is given in the files. I couldn't come up with these so I have to rely on reverse- engineering, the best recomendation I can come up with for learning the commands is download some missions and rip apart the ones you see the effect you are after in and see how it's done. The command reference is great but in isolation it's like the dictionary, unless you know what word you are looking for you'll never know it existed!

Share this post


Link to post
Share on other sites

Thanks MrN smile_o.gif

What would be utterly fantastic is an object (both literal sense, and programmatical sense) API.. <span id='ME'><center>BibbleBabble looks wishfully at BIS</center></span>

Share this post


Link to post
Share on other sites

Right.. I'm getting there..

So far I have this small snippet:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_X = _this select 0;

_Y = _this select 1;

_Z = _this select 2;

// create plane

_av8ba = createVehicle ["AV8B", [_X - 1500, _Y], [], 0, "FLY"];

_av8ba setDir 90;

_av8ba setPos [_X - 1500, _Y, 400];

_av8ba setVelocity [300, 0, 0];

// create pilot

"SoldierWPilot" createUnit [getPos _av8ba, dummy, "Pilot = this"];

Pilot moveInDriver _av8ba;

// assign to group and set waypoint

dummy move [_X + 1500, _Y, 400];

sleep 8;

// boom..

_bomb = "Bo_GBU12_LGB" createVehicle [_X - 40, _Y];

sleep 0.1;

_bomb = "Bo_GBU12_LGB" createVehicle [_X - 30, _Y];

sleep 0.1;

_bomb = "Bo_GBU12_LGB" createVehicle [_X - 20, _Y];

sleep 0.1;

_bomb = "Bo_GBU12_LGB" createVehicle [_X - 10, _Y];

sleep 0.1;

_bomb = "Bo_GBU12_LGB" createVehicle [_X, _Y];

sleep 0.1;

_bomb = "Bo_GBU12_LGB" createVehicle [_X + 10, _Y];

sleep 0.1;

_bomb = "Bo_GBU12_LGB" createVehicle [_X + 20, _Y];

sleep 0.1;

_bomb = "Bo_GBU12_LGB" createVehicle [_X + 30, _Y];

sleep 0.1;

_bomb = "Bo_GBU12_LGB" createVehicle [_X + 40, _Y];

BUT.. the plane continously barrell rolls and crashes.. I don't know why..

Share this post


Link to post
Share on other sites

all sorted.. here is a demonstration if anyone wants to use it:

http://www.jenk.co.uk/ArmA/testairstrike.Intro.pbo

It has been created to drop the airstrike right on the Pos supplied when you call the script. I haven't got round to making a radio call for it or anything like that, but I probably will in the near future smile_o.gif

Also if I ever get my head round it (I suck at relational maths) then I'll update it to use a Vector, instead of a Pos so you can have varying angles, too smile_o.gif

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  

×