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

It's me again! – kill unit entering region, make new region

Status
Not open for further replies.
Level 3
Joined
Sep 28, 2012
Messages
21
Okay, so I'm trying to make it so if a unit walks into region (x) it will kill the unit and create a unit at region (Y). Help is appreciated!
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
Simple:

  • Unit Spawn
    • Events
      • Unit - A unit enters Region X <gen>
    • Conditions
    • Actions
      • Unit - Kill (Triggering unit)
      • Unit - Create 1 Footman for (Owner of (Triggering unit)) at (Center of Region Y <gen>) facing Default building facing degrees
I'm guessing your new, so I wont bother you with memory leaks. Enjoy.

Here is the map if your still having trouble:
 

Attachments

  • Unit Region.w3m
    16.4 KB · Views: 53
Level 3
Joined
Sep 28, 2012
Messages
21
Simple:

  • Unit Spawn
    • Events
      • Unit - A unit enters Region X <gen>
    • Conditions
    • Actions
      • Unit - Kill (Triggering unit)
      • Unit - Create 1 Footman for (Owner of (Triggering unit)) at (Center of Region Y <gen>) facing Default building facing degrees
I'm guessing your new, so I wont bother you with memory leaks. Enjoy.

Here is the map if your still having trouble:

It kills the unit, but it doesn't create another unit.
 
Level 3
Joined
Apr 21, 2012
Messages
33
I guess you have to store the owner of triggering unit into a variable before killing a triggering unit.
 
Status
Not open for further replies.
Top