Jump to content
Sign in to follow this  
jeppelykke

Type createunit unitinfo

Recommended Posts

Hey, can anyone tell me why this dont work i use this as it showed in help file:

Example:

"SoldierWB" createUnit [getMarkerPos "barracks", groupAlpha]

So my script says:

"SoldierWB" createUnit [getMarkerPos "Test", groupAlpha]

I made the Marker Test just few feet infront of me while i testing.

When i activate that script, no erros comes and NO soldiers sad.gif

Could some please explain how i can Create a unit, special soldiers confused.gif

Best Regards

Jeppe Lykke, Denmark

Share this post


Link to post
Share on other sites

try this :

Give a name to your Unit or to the leader's group (like Guy)

in the init field of your Unit (or leader group) : UnitG=group Guy

In your script :

"SoldierWB" createUnit [getMarkerPos "barracks", UnitG]

Share this post


Link to post
Share on other sites

For create others units :

Put in the map editor this soldier

save

open the mission.sqm (notepad) and look how he is called (like SoldierWCrew for a Tank man "WEST", or SoldierEPilot for a ...pilot "EAST")

You can also grab the class tree in www.ofpediting.com -Tutorials

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (jeppelykke @ Aug. 01 2002,20:00)</td></tr><tr><td id="QUOTE">So my script says:

"SoldierWB" createUnit [getMarkerPos "Test", groupAlpha]

I made the Marker Test just few feet infront of me while i testing.<span id='postcolor'>

You also need variable groupAlpha to point to some group.

You can add groupAlpha = group this into init of your character. This will make newly created units to be members of your squad.

Alternative is to use group player directly in the createUnit command:

"SoldierWB" createUnit [getMarkerPos "Test", group player]

Share this post


Link to post
Share on other sites

Thanx Guys!

I give it a try later tonight wink.gif

Best Regards

Jeppe Lykke, Denmark

Share this post


Link to post
Share on other sites

How do you add a whole squad?

If using the foreach in a script how does each player get its own unique name?

Hoz

edit:

How do you add soldiers to a non exisitant group?

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  

×