• 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.

Enter region - Summon enemy. Help request

Status
Not open for further replies.
Level 2
Joined
Jul 3, 2009
Messages
22
Hey, im making a map and i cant get the hang of this trigger, when someone enters the region a lvl 1 satyr should spawn there. I did this but than every time someone was in that region (even if the satyr was standing alone) some would come so it was insane. Than i figured to put a condition, so only if a playable toon stands in it than will spawn, and now its not doing anything lol.... here it is:

Region 0011
Events
Unit - A unit enters Region 011 <gen>
Conditions
(Unit-type of (Triggering unit)) Equal to Footman
(Unit-type of (Triggering unit)) Equal to Knight
(Unit-type of (Triggering unit)) Equal to Rifleman
(Unit-type of (Triggering unit)) Equal to Mortar Team
(Unit-type of (Triggering unit)) Equal to Priest
(Unit-type of (Triggering unit)) Equal to Sorceress
(Unit-type of (Triggering unit)) Equal to Siege Engine
(Unit-type of (Triggering unit)) Equal to Spell Breaker
(Unit-type of (Triggering unit)) Equal to Paladin
(Unit-type of (Triggering unit)) Equal to Archmage
(Unit-type of (Triggering unit)) Equal to Mountain King
(Unit-type of (Triggering unit)) Equal to Blood Mage
(Unit-type of (Triggering unit)) Equal to Water Elemental (Level 1)
(Unit-type of (Triggering unit)) Equal to Water Elemental (Level 2)
(Unit-type of (Triggering unit)) Equal to Water Elemental (Level 3)
(Unit-type of (Triggering unit)) Equal to Siege Engine (Barrage)
(Unit-type of (Triggering unit)) Equal to Militia
(Unit-type of (Triggering unit)) Equal to Grunt
(Unit-type of (Triggering unit)) Equal to Raider
(Unit-type of (Triggering unit)) Equal to Tauren
(Unit-type of (Triggering unit)) Equal to Troll Headhunter
(Unit-type of (Triggering unit)) Equal to Demolisher
(Unit-type of (Triggering unit)) Equal to Kodo Beast
(Unit-type of (Triggering unit)) Equal to Troll Witch Doctor
(Unit-type of (Triggering unit)) Equal to Shaman
(Unit-type of (Triggering unit)) Equal to Spirit Walker
(Unit-type of (Triggering unit)) Equal to Blademaster
(Unit-type of (Triggering unit)) Equal to Far Seer
(Unit-type of (Triggering unit)) Equal to Tauren Chieftain
(Unit-type of (Triggering unit)) Equal to Shadow Hunter
(Unit-type of (Triggering unit)) Equal to Spirit Wolf (Level 1)
(Unit-type of (Triggering unit)) Equal to Dire Wolf (Level 2)
(Unit-type of (Triggering unit)) Equal to Shadow Wolf (Level 3)
(Unit-type of (Triggering unit)) Equal to Spirit Walker (Ethereal)
(Unit-type of (Triggering unit)) Equal to Troll Berserker
(Unit-type of (Triggering unit)) Equal to Ghoul
(Unit-type of (Triggering unit)) Equal to Abomination
(Unit-type of (Triggering unit)) Equal to Meat Wagon
(Unit-type of (Triggering unit)) Equal to Crypt Fiend
(Unit-type of (Triggering unit)) Equal to Banshee
(Unit-type of (Triggering unit)) Equal to Necromancer
(Unit-type of (Triggering unit)) Equal to Obsidian Statue
(Unit-type of (Triggering unit)) Equal to Death Knight
(Unit-type of (Triggering unit)) Equal to Lich
(Unit-type of (Triggering unit)) Equal to Dreadlord
(Unit-type of (Triggering unit)) Equal to Crypt Lord
(Unit-type of (Triggering unit)) Equal to Skeleton Warrior
(Unit-type of (Triggering unit)) Equal to Skeletal Mage
(Unit-type of (Triggering unit)) Equal to Carrion Beetle (Level 1)
(Unit-type of (Triggering unit)) Equal to Carrion Beetle (Level 2)
(Unit-type of (Triggering unit)) Equal to Carrion Beetle (Level 3)
(Unit-type of (Triggering unit)) Equal to Archer
(Unit-type of (Triggering unit)) Equal to Huntress
(Unit-type of (Triggering unit)) Equal to Dryad
(Unit-type of (Triggering unit)) Equal to Glaive Thrower
(Unit-type of (Triggering unit)) Equal to Druid of the Talon (Night Elf Form)
(Unit-type of (Triggering unit)) Equal to Druid of the Talon (Storm Crow Form)
(Unit-type of (Triggering unit)) Equal to Druid of the Claw (Night Elf Form)
(Unit-type of (Triggering unit)) Equal to Druid of the Claw (Bear Form)
(Unit-type of (Triggering unit)) Equal to Mountain Giant
(Unit-type of (Triggering unit)) Equal to Keeper of the Grove
(Unit-type of (Triggering unit)) Equal to Priestess of the Moon
(Unit-type of (Triggering unit)) Equal to Demon Hunter
(Unit-type of (Triggering unit)) Equal to Warden
(Unit-type of (Triggering unit)) Equal to Demon Hunter (Demon Form)
(Unit-type of (Triggering unit)) Equal to Treant
(Unit-type of (Triggering unit)) Equal to Avatar of Vengeance
Actions
Unit - Create 1 Satyr for Neutral Hostile at (Center of Region 011 <gen>) facing Default building facing degrees

So whats the problem here?
 
Level 13
Joined
Sep 14, 2008
Messages
1,408
First of all remove those conditions!
Please...

Just use: (Unit-type of (Triggering unit)) NOT equal to satyr)

See when the trigger spawns a unit
-> The spawned unit "enters" the map and so the area
--> That again triggers the action
---> Endless loop

Just add the condition I gave u :/


And your trigger won't work because:

World editor will use AND if you give him more conditions..
-> The entering unit needs to be e.g. archer AND mountain giant AND treant ...
--> Not possible..
---> Use the condiditon I gave you
 
Honesly, how did you make all those conditions? I'd get so bored. As far as I can see, you want all the units from Human/Orc/Night Elf/Undead, so why don't you:
  • Initialization
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set Races[1] = Human
    • Set Races[2] = Orc
    • Set Races[3] = Night Elf
    • Set Races[4] = Undead
  • Trigger
  • Events
    • Unit - A unit enters (your region <gen>)
  • Conditions
  • Actions
    • For each (IntegerA) from 1 to 4, do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • (Race of (Triggering unit)) Equal to Races[(IntegerA)]
          • Then - Actions
            • Set Point1 = (Center of (your region <gen>))
            • Unit - Create 1 Satyr for Neutral Hostile at (Point1) facing Default building facing degrees
            • Custom script: call RemoveLocation (udg_Point1)
The "Races" is a variable of type "Race". For more info, visit:
[•] http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/variables-5896/
[•] http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
[•] http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/array-tutorial-17789/
 
Level 13
Joined
Sep 14, 2008
Messages
1,408
Honesly, how did you make all those conditions? I'd get so bored. As far as I can see, you want all the units from Human/Orc/Night Elf/Undead, so why don't you:
  • Initialization
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set Races[1] = Human
    • Set Races[2] = Orc
    • Set Races[3] = Night Elf
    • Set Races[4] = Undead
  • Trigger
  • Events
    • Unit - A unit enters (your region <gen>)
  • Conditions
  • Actions
    • For each (IntegerA) from 1 to 4, do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • (Race of (Triggering unit)) Equal to Races[(IntegerA)]
          • Then - Actions
            • Set Point1 = (Center of (your region <gen>))
            • Unit - Create 1 Satyr for Neutral Hostile at (Point1) facing Default building facing degrees
            • Custom script: call RemoveLocation (udg_Point1)
The "Races" is a variable of type "Race". For more info, visit:
[•] http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/variables-5896/
[•] http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
[•] http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/array-tutorial-17789/

That will definitly work but its not what he is lookign for as far as I understood him.

I think he just used all that conditions because he wanted to cover every possible unit :D
 
Level 2
Joined
Jul 3, 2009
Messages
22
Thank you i will try it out, and yea i wanted to cover all the races xD took alot of time :p

thanks again for the answers :D
 
Status
Not open for further replies.
Top