HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Triggering help

10-16-2006, 09:54 PM#1
Coonskin_13
I'm making a trigger in GUI (can't do JASS) That will kill the selected units when the player types "kill" I've figured out how to kill the selected units, the problem is making it so you cannot kill units that aren't your own.

What I have so far:

The event is a player typing kill in a substring.

The condition verifies the kill is in the begining.

The event adds all selected units by red to a variable unit group.

Help, please.
10-16-2006, 10:17 PM#2
CrashLemon
You need to add an IF/THEN/DO to your trigger.

Trigger:
Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Owner of (Your unit)) Equal to (Your Player)
Collapse Then - Actions
Unit - Kill (Your unit)
Collapse Else - Actions
Do Nothing
10-17-2006, 12:36 AM#3
Coonskin_13
Thanks a bundle. It didn't look exactly like that, but if/then/else was what I was looking for.