Jump to content
Sign in to follow this  
jetplane_pete

Script exec in unit init vs trigger

Recommended Posts

Guys hi

Just when I think I'm getting the hang of this.....

I run this line

{_x setface "camoflage2"} foreach units group this

in the init box of a group memeber to add a camo face to each unit in the group, and it works fine.

However I also want to do the same for units created by "createUnit" via a spawn script.

I have tried the setface command within the spawn script, and also via the activation line of a trigger but can't get the correct syntex.

Any ideas

thanx

P

Share this post


Link to post
Share on other sites

untested, but should work

two solutions

the first one would be in the createunit line

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"SoldierWB" createUnit [_spawnlocation,_teamname,"mana1=this; this setface {camoflage2}",0.3,"PRIVATE"]

the other, after all your createunit lines, to add

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"_x setface {camoflage2}" foreach units _teamname

If there is a problem, use this

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x setface {camoflage2}} foreach units _teamname

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  

×