# chat message summon help

Status
Not open for further replies.

#### dudds4

Level 2
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
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

#### Maker

Level 37
Use
• [/ TRIGGER] tags.
• Can't see what's wrong there, this trigger spawns 6 footmen if I type
• -a1 f6
• [TRIGGER]Untitled Trigger 063
• Events
• Player - Player 1 (Red) types a chat message containing -a1 as A substring
• Conditions
• (Substring((Entered chat string), 4, 5)) Equal to f
• Actions
• Set Temp_UnitType = Footman
• Set Temp_Integer_1 = (Integer((Substring((Entered chat string), 6, 6))))
• Wait 1.00 seconds
• Set Temp_Loc_1 = (Position of Barracks 0114 <gen>)
• Unit - Create Temp_Integer_1 Temp_UnitType for Player 1 (Red) at Temp_Loc_1 facing Default building facing degrees
• Custom script: call RemoveLocation(udg_Temp_Loc_1)
Make sure you have included the space in your "Equal to f" comparison.

#### dudds4

Level 2
thanks,looking at your trigger, i just realized what a stupid mistake i made.
(-a1 ) takes up 4 spots. the dash, the a the 1 and the space.
i had the letter set to position 4, so my entire trigger just contradicted itself.

... and something totally different...i know this is gona sound stupid but. im new here, and i kant quiet figure out how to delete a thread... Wtf?!?!? thers no delete button or anything!!

#### eleljrk

Level 9

Status
Not open for further replies.

Replies
5
Views
1K
[Trigger] bugged trigger
Replies
8
Views
888
[Solved] Vote Kick
Replies
2
Views
970
Replies
5
Views
696
Replies
5
Views
780