Jump to content
Sign in to follow this  
Lupina

Create soldier and setidentity during game

Recommended Posts

I wants to create dynamically few soldiers.

I have these soldiers identify saved in desciption.ext :

class somalian1

{

name="Muhammed";

face="face33";

glasses="spectacles";

speaker="Adam";

pitch=0.80;

};

how to use function CreateUnit and to attribute her this identify.

Share this post


Link to post
Share on other sites
Guest jacobaby

You should be able to identify the unit in the INIT section of the createunit array.

Maybe like this;

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

guy= "soldierGuer" createunit [POS, GROUP, "this setidentity "mohammed",SKILL, RANK]

<span id='postcolor'>

Something like that anyway. or you could just assign him face33 in the same way. you may have to play about with the quotes in that and add your own other values obviously.

TJ

Share this post


Link to post
Share on other sites

I did't test your version yet,but I found different solution :

_grp = group player

"SoldierGFakeC" createunit [getpos test,_grp,"me=this",0.5,"PRIVATE"]

me SetIdentity "somalian1"

smile.gif

But, someone knows how create with game different objects eg: fence,tent,house.

I look list of game objects, their names (so far I found only list of weapon)

Share this post


Link to post
Share on other sites
Guest jacobaby

Wicked! If that works it will be very useful. I didnt know you could assign a name to a unit via create unit. And without a name its hard to control them.

Brain updated ....

Thanks

TJ

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  

×