• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Spawning problems

Status
Not open for further replies.
Level 8
Joined
Sep 1, 2009
Messages
124
Hey, i need some help with a trigger... it does not work for some reason, even though i have gone over it over and over!
here is the part of the trigger giving me complete grief:

  • Else - Actions
    • Unit - Remove (Target unit of ability being cast) from the game
    • Unit - Create 1 Fire for (Owner of (Triggering unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
    • Animation - Play (Last created unit)'s decay animation
    • Unit - Create 1 No other buildings being built for (Owner of (Triggering unit)) at (Center of No other buildings being built <gen>) facing Default building facing degrees
for more detail: this is the spawning part of a "Unit begins casting an ability on a specific unit" trigger
this is the part that spawns my unit, for some really annoying reason, it spawns the unit in a random area of the map. I tried fixing it with variables, but no go, its annoying, and i tried lots of different kinds of things that will allow me to keep the trigger as it is...
anyone know a fix for this?
 
Level 9
Joined
Oct 11, 2009
Messages
477
Could you show the whole trigger so I/we can clarify the problem. Anyway your trigger leaks 2 damn locations, try cleaning them. If you can't find the leaks, here it is:

  • Unit - Create 1 Fire for (Owner of (Triggering unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
and
  • Unit - Create 1 No other buildings being built for (Owner of (Triggering unit)) at (Center of No other buildings being built <gen>) facing Default building facing degrees

Try cleaning the actions for leaks.
 
Level 6
Joined
Oct 10, 2009
Messages
1,425
which unit causes a problem to spawn?

anyways if its the fire unit, you should rearrange the position of the two events (creating fire and removing unit) because when the unit is removed, then you cant get its location because its gone. so if you try to get a nonexistent location it could mess up and give you a random location.
  • Else - Actions
    • Unit - Create 1 Fire for (Owner of (Triggering unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
    • Unit - Remove (Target unit of ability being cast) from the game
    • Animation - Play (Last created unit)'s decay animation
    • Unit - Create 1 No other buildings being built for (Owner of (Triggering unit)) at (Center of No other buildings being built <gen>) facing Default building facing degrees
or you could make it to where it kills the unit instead of removing it, then it still has a location briefly.
  • Else - Actions
    • Unit - Kill (Target unit of ability being cast)
    • Unit - Create 1 Fire for (Owner of (Triggering unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
    • Animation - Play (Last created unit)'s decay animation
    • Unit - Create 1 No other buildings being built for (Owner of (Triggering unit)) at (Center of No other buildings being built <gen>) facing Default building facing degrees
maybe that will defeat the purpose of the Fire unit depending on what the unit is there for. I'm not sure as i cant see your map, but this is merely a suggestion. and if you need help to remove those leaks I'd be happy to show you how.
 
Status
Not open for further replies.
Top