Forum Jump :

Author Message

Posts: 3

Level: Member

Country: us
In-game name:

#1 Posted at 2014-07-16 01:05        
I have been making missions for the unit I'm in and have just started to script some more things to make them better and a bit more random so its not the same each time.
Anyway the mission I'm making involves you destroying a fuel depot and clearing an enemy medical camp outside of the town. I need to know how to make it so i can have a fuel depot and then ill be able to have text pop up once its destroyed. Then i need to know a init. script for the enemy ai so i can have some spawn in with bandages or some injuries lying down unconscious but alive so its like an actual medical camp.

I've been looking around and couldnt find anything where i wouldnt have to download another mod, because i dont feel that its needed, Thank you in advanced.
~2LT. Malik [1st ID]

Mod Edit:
Please use descriptive topic titles next time instead of just "quick question" thanks.
Also post in the correct forum section!

If you can add useless tags to a topic you can also add a proper title and post it correctly, right?

This post was edited by Foxhound (2014-07-16 09:26, ago)

Author Message

Posts: 1189

Level: Member

Country: tr
Occupation: Computer Science student
Age: 22
In-game name: Wak

#2 Posted at 2014-07-16 07:56        
For the medical camp it would require them to loop in some animations of your choice, and probably setDamage for the blood effect and low health. Coming to the fuel depot, it needs a really simple script. I did this for a radar tower so for the fuel station you'll have to stay a bit more away :P. Put your fuel tanks around, name them fuel1 fuel2, or just 1, 2, 3. For this example I'm going to name them fuelTank1, fuelTank2, fuelTank3.

Put this on the init line of something away from the tanks, like a detonator, or a fuel pump, maybe a control console, something that makes sense.
_nul = this addAction["Sabotage","sabotage.sqf"];

_me = _this select 0;
_act = _this select 2;
_me removeAction _act;    //For removing the sabotage action.
_unit playMove "AinvPknlMstpSlayWrflDnon_medic";    //Animation for immersion.
sleep 7;    //How long the animation takes.
hint "Ka-Boom!";    //The text you wanted.
fuelTank1 setDamage 1;    //The tanks blowing up one by one.
sleep 1;
fuelTank2 setDamage 1;
sleep 1;
fuelTank3 setDamage 1;
sleep 1;
hint "Good job, the fuel depot is destroyed!";    //The text you ACTUALLY wanted.

Sometimes I like to think as I started the whole "earplugs" thing.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

#define getDamage getDammage