• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Hero selecting trigger

Status
Not open for further replies.
Level 4
Joined
Sep 25, 2009
Messages
49
Im having a problem with my hero selecting trigger, When i go to select a hero it will remove the wisp (i want it to do that) But it wont spawn the hero... My old trigger worked, but in order to try and save room i tryed to fit it into 1 trigger

Old trigger:

  • spawn archer OLD
    • Events
      • Unit - A unit enters hero archer <gen>
    • Conditions
      • ((Triggering unit) is A ground unit) Equal to True
      • (Unit-type of (Triggering unit)) Equal to Wisp
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Unit - Remove (Triggering unit) from the game
      • Unit - Create 1 Sylvanas Windrunner for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
New trigger:

  • spawn archer NEW
    • Events
      • Unit - A unit enters hero archer <gen>
    • Conditions
      • ((Triggering unit) is A ground unit) Equal to True
      • (Unit-type of (Triggering unit)) Equal to Wisp
    • Actions
      • Unit - Remove (Triggering unit) from the game
      • Unit - Create 1 Sylvanas Windrunner for (Triggering player) at (Center of (Playable map area)) facing Default building facing degrees
Any help?
 
Level 4
Joined
Sep 25, 2009
Messages
49
well i know, i did that on purpose, and i dont think it would actually effect it >< cause i was trying to slim down 40 triggers into 4......

edit: didnt see your post- en funego
 
Level 3
Joined
Jun 15, 2009
Messages
39
Wouldn´t it be better to use Entering Unit instead of Triggering Unit, cause of the Event?
 
Level 8
Joined
Feb 15, 2009
Messages
463
triggering is better(heard today by the Reborn DEvil so credit him)
but also you can skip the condition trigger unit is a ground unit

you leak also a point
set the mid of the map to a point variable named TempLoc and create units at the variable position ,
as well as adding following line to your triggers
call RemoveLocation(udg_TempLoc)

what it look like in acceptable way

  • spawn archer NEW
    • Events
      • Unit - A unit enters hero archer <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Wisp
    • Actions
      • set TempLoc = CenterOfPlayableMapArea
      • Unit - Create 1 Sylvanas Windrunner for (OwnerOf(Triggering unit) at (TempLoc) facing 0.
      • Unit - Remove (Triggering unit) from the game
      • call RemoveLocation(udg_TempLoc)
 
Level 15
Joined
Jan 27, 2007
Messages
948
i belive that this should work even a bit better

  • spawn archer NEW
  • Events
  • Unit - A unit enters hero archer <gen>
  • Conditions
  • (Unit-type of (Entering unit)) Equal to Wisp
  • Actions
  • set TempLoc = CenterOfPlayableMapArea
  • Unit - Create 1 Sylvanas Windrunner for (OwnerOf(Entering unit) at (TempLoc) facing 0.
  • Unit - Remove (Entering unit) from the game
  • call RemoveLocation(udg_TempLoc)
 
Level 8
Joined
Feb 15, 2009
Messages
463
no triggering unit is refered 2 faster (as i said reborn devil told me before and i believe)
also even faster would be 2 safe the unit in a variable so we are safing a call and do everything in conditions (only possible in JASS)
 
Status
Not open for further replies.
Top