HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

help - removing unit from region via voice command

11-11-2002, 10:22 PM#1
danewb
I am making a matrix map on wc3 similar to those that most loved in starcraft. I have the basics down but I wanted to make a script to stop the annoying people that like to go into someone elses lane and steal there kills, but i dont want to keep everyone out so they could be backd up if someone leaves. with that being said I tryd to make a voice trigger command to do that but it isnt working.

with that being said, heres the triggers that i used:

red type

-events
Player - Player 1 (Red) types a char message containing -remove as An exact match

-actions
Trigger - Run red remove <gen> (Checking conditions)

red remove (not initaly on)

-events
Unit - A unit enters red region <gen>

-conditions
(Owner of (Triggering unit)) Not equal to Player 1 (red)
(Owner of (Triggering unit)) Not equal to Player 11 (Dark green)
(Owner of (Triggering unit)) Not equal to Player 12 (Brown)


-actions
Unit - Move (triggering unit) instantly to (center of remove <gen> )
Trigger - Turn off (This trigger)


anyone help me to where i went wrong? :/
11-11-2002, 10:45 PM#2
danewb
ok i think I found the part that could be the problem

under events in red remove trigger

"Unit - A unit enters redregion <gen>"
the unit that i want to remove is already in the region - so is there any way to make it a unit in that region already? the only other one is "a unit leaves region" which wouldnt do me any good... so does anyone know a way to kick a unit thats already in a region?
11-11-2002, 11:00 PM#3
Guest
You want a condition on the 2nd one. Remove the event, and do a condition "unit owned by __ in region __ equal to 1"
11-12-2002, 03:14 AM#4
Guest
First of all, you don't need the variable.
Second, try this:

EVENT:
Player 1 types a chat message equal to '-remove.'

CONDITIONS:
Nada. Zip. Bang.

ACTIONS:
Pick all units in 'redarea' and do if (picked unit) is owned by player 1 then do if (picked unit) is owned by player 11 then do if (picked unit) is owned by player 12 then (do nothing) else do Unit- Remove (picked unit) else (do nothing) else (do nothing).

That's a bit complicated...
11-12-2002, 10:23 PM#5
Kerry
No the thing thats wrong on your trigger danewb is that the first action should be Trigger - Turn on <Run red remove> not Trigger - Run. This will make the trigger to be turned on when a unit enters that region, if u use run trigger it will run the trigger instantly.
11-12-2002, 11:55 PM#6
ph33rb0
Quote:
Originally posted by Zenithan
First of all, you don't need the variable.
Second, try this:

EVENT:
Player 1 types a chat message equal to '-remove.'

CONDITIONS:
Nada. Zip. Bang.

ACTIONS:
Pick all units in 'redarea' and do if (picked unit) is owned by player 1 then do if (picked unit) is owned by player 11 then do if (picked unit) is owned by player 12 then (do nothing) else do Unit- Remove (picked unit) else (do nothing) else (do nothing).

That's a bit complicated...


You don't need all them ifs. Just do If (Picked Unit) is not owned by Player 1.