Hey, i got some help earlier, and i think ive figured it out, but ive tested the map and it doesnt seem to work. the chat message contains -a1 ,(a letter ie: f, g)(and a space) at positions 4-5 and a number at position 6-6. the idea is to create a unit for neutral hostile within a spawn region, the type of unit being described by the letter in the chat message, and the number also in the chat message. here is my trigger
Player - Player 1 (Red) types a chat message containing -a1 as A substring
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 4, 5)) Equal to f
Then - Actions
Set pickedunittype = Footman
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 4, 5)) Equal to g
Then - Actions
Set pickedunittype = Grunt
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 4, 5)) Equal to r
Then - Actions
Set pickedunittype = Rifleman
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 4, 5)) Equal to t
Then - Actions
Set pickedunittype = Troll Headhunter
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 4, 5)) Equal to a
Then - Actions
Set pickedunittype = Abomination
Else - Actions
Set UnitNumber = (Integer((Substring((Entered chat string), 6, 6))))
Wait 1.00 game-time seconds
Unit - Create UnitNumber pickedunittype for Neutral Hostile at (Center of SpawnA1 <gen>) facing Default building facing degrees
any suggestions, even if it totally changes the trigger, would be greatly appreciated. I dont no how to use JASS yet (although im gona read the tutorial), so any comments about JASS wont be very useful
thanks
Player - Player 1 (Red) types a chat message containing -a1 as A substring
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 4, 5)) Equal to f
Then - Actions
Set pickedunittype = Footman
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 4, 5)) Equal to g
Then - Actions
Set pickedunittype = Grunt
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 4, 5)) Equal to r
Then - Actions
Set pickedunittype = Rifleman
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 4, 5)) Equal to t
Then - Actions
Set pickedunittype = Troll Headhunter
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 4, 5)) Equal to a
Then - Actions
Set pickedunittype = Abomination
Else - Actions
Set UnitNumber = (Integer((Substring((Entered chat string), 6, 6))))
Wait 1.00 game-time seconds
Unit - Create UnitNumber pickedunittype for Neutral Hostile at (Center of SpawnA1 <gen>) facing Default building facing degrees
any suggestions, even if it totally changes the trigger, would be greatly appreciated. I dont no how to use JASS yet (although im gona read the tutorial), so any comments about JASS wont be very useful
thanks