Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
ffak

Create unit wherever

Recommended Posts

hello

is there any script creating an unit set up with a trigger?

in my mission, i want create enemy units when the Players Squad starts a trigger...

but this creation must be, for example, 150m in front of Players Squad with 3 soldiers with "seek and destroy squad" behavior (or combat mode if not possible)

i think it's a more suitable way to set up enemies encounters in a coop mission....enemy is here ...whatever the borrowed way

thx for help

Share this post


Link to post
Share on other sites

in teh trigger activation field typ [] exec "createnemy.sqs"

creat a new txt doc in your mission folder and name it "createnemy.sqs"

put this line in the sqs file

"SoldierWB" createUnit [getpos EnemyPos, groupAlpha]

use the behaviour command to set it to combat

put a trigger on the location where you want the soldiers to apear and name it "EnemyPos"

that should to the trick

Share this post


Link to post
Share on other sites

Thx for answer...i tried but its not working..your answer is not quite clear wink.gif

I create my player

I create 1 trigger (exec .sqs) with west activation

and what? another trigger, my enemy?

help! smile.gif

Share this post


Link to post
Share on other sites

you need to place one unit on your map that acts as groupleader for groupalpha. If the groupleader isn't already there, the new unit can't join groupalpha and won't be created.....

Then you have groupalpha consisting of following units

1. groupleader (was already there)

2. newunit you created

if you want the new unit to be a group itself, use:

newunitname  = groupalpha select 1 //select 0 is the already

existing unit

unitname join grpnull //this unassigns unit from group

groupbravo = units group newunitname

That's it!

Share this post


Link to post
Share on other sites

You may also want to check this topic this topic for more information about createUnit.

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  

×