• 🏆 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!

Units problems

Status
Not open for further replies.
Level 4
Joined
Jan 3, 2012
Messages
60
Hey Guys!

I have a kinda complicated quest that's really hard to explain, but i'll give it a try.

Okay, Im making a Tower Defence where you ofcourse have to build units to prevent the creeps to reach a certain point. I want these units to be alive IN the waves and then i want them to be buildings or just stading still BETWEEN the waves. So, i made two of each unit, one building and one unit. No problem. My question is how to trigger this? When the wave is over i also want those units who died to respawn at the exact same spot where they were build. Like a resest of all units after each wave. Is this possible and if it is, how do i do it?
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
Hey Guys!

I have a kinda complicated quest that's really hard to explain, but i'll give it a try.

Okay, Im making a Tower Defence where you ofcourse have to build units to prevent the creeps to reach a certain point. I want these units to be alive IN the waves and then i want them to be buildings or just stading still BETWEEN the waves. So, i made two of each unit, one building and one unit. No problem. My question is how to trigger this? When the wave is over i also want those units who died to respawn at the exact same spot where they were build. Like a resest of all units after each wave. Is this possible and if it is, how do i do it?

revive these units after they died and hide them. if your creeps are neutral hostiles then you add a condition not equal to neutral hostile. why should you made two of each unit ? why don't pause them ?

  • Events
    • Unit - A unit dies
  • Conditions
    • (Owner of (Triggering unit)) Not Equal to Neutral Hostile
  • Actions
    • Set tempPoint = (Position of (Triggering unit))
    • Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at tempPoint facing default building degrees
    • Unit - Hide (Last created unit)
    • Custom script : call RemoveLocation (udg_tempPoint)
when the wave is finished,

  • Custom script : set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Playable map area) matching ((Owner of (Matching unit)) not Equal to Neutral Hostile)
    • Loop - Actions
      • Unit - Unhide (Picked unit)
anyway, if you want to learn more, you can look from this map by rulerofiron99. it's not exactly what you want to get, but you should get the point. (this is a very fun map) :p
 
Status
Not open for further replies.
Top