Jump to content
Sign in to follow this  
Steaksauce1337

New to scripting need answers please...

Recommended Posts

#1 is it possible to spawn an entire enemy base so that AI cannot report it too early in a mission?

#2 how would I begin writing a script that for example says.. when X units takes Y amount of deaths then Z will spawn for a retaliation .. and if possible spawn the camp so they can start lobbing mortar rounds?

Share this post


Link to post
Share on other sites

#1 : I'm not exactly sure what you mean here, if you spawn enemies far enough away, they wont be noticed.

#2 : If you're new to arma2 scripting, it would be difficult to do from scratch. Luckily there are some great scripts for this already, one of my favorites is UPSMON by Monsada. It does exactly what you're looking for, have a read through the thread here: http://forums.bistudio.com/showthread.php?t=91696

Share this post


Link to post
Share on other sites

for the units to fire mortar rounds - you will need to read about the artillery module and how to get it to work.

http://community.bistudio.com/wiki/Artillery_Module

its not difficult, but making the ai decide what targets to fire at might be (however i believe someone made an officer observer script that does this)

for the script idea:

heres the general idea:

add all the units you want to check for into an array - easiest way is to create a trigger with an area that covers all the guys, with blufor/opfor present. create a variable called enemyarray in the init:

enemyarray = [];

so it is an empty array

then in activation of trigger

enemyarray =  +(list triggerName)

in a loop:

{if (!alive _x) then {enemyarray = enemyarray - [_x]}} foreach enemyarray;

then just do another trigger with condition:

count enemyarray < 15

depending on how many units you have in the array, this checks to see that if a unit in the area is dead, it is removed from the array.

Then this trigger checks to see if the number of elements in the array (# of units) is less than 15 (whatever number you want to use)

then you can activate your artillery like this; or spawn stuff.

ps. dont expect this code to run, its off the top of my head.

Edited by Igneous01

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  

×