• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Rp command

Status
Not open for further replies.
Level 7
Joined
Mar 12, 2006
Messages
407
U mean u want to spwan multiple unit-types at once ?
That should be like a trigger loop which spawns an unit-type array spawnunit[x] and that x is each integer from 1 to 12 for example
then you have to create a table in which you define the unit-types
spawnunit[1] == unit 1
spawnunit[2] == unit 2

of course this works also to spawn just one unit type
you will need one trigger with the definition table
one for the chatmsg
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
Events:
Player 1 (Red) types a chat message containing spawn as A Substring
Player 2 (Blue) types a chat message containing spawn as A Substring
....(And so on until Player 12/10)

Conditions:
None

Actions:
Create 1 (Unit-Type((Substring((Entered Chat String), 7, 127)))) for (Triggering Player) at Position of Spawner facing (...)

Ok, this creates a unit by simply typing spawn Unittype.

spawn ghoul
spawn acolyte

Substrings? What does 7 and 127 mean?
7= The 7 is the spawn and the space after it.

spawn
123456

The 1 is the S, the 2 is the P, etc. The 7 starts in the next entered number or symbol after the space, so that's where you enter the unit type.

127 = I belive it's the maximum number of characters you can enter while playing.
For the spawner, you simply need creating a Footman custom unit and giving it a Start Location model, if you want, and set it's Collision Size to 0.00. The Start Location can be used by just double clicking on the Model File. Then you have a list of Units/Units-Missiles/Units-Special, etc. Select Extra. At the end of the list you'll see Start Location. Select it and press OK.
 
Status
Not open for further replies.
Top