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

Building Variable

Status
Not open for further replies.

xplicitjohn

X

xplicitjohn

Ok, i made a unit build a tower.

And i need to use that tower for later on for other triggers

so what variable do i use to call that tower?

Nub question

and in the triggers what do i set the variable as?

  • Set (building Variable) = ?
 

xplicitjohn

X

xplicitjohn

Could you be more specific about what you're trying to accomplish?

ok

A Unit builds a tower (building). I need a variable for that tower. So i can use it in other trigger later on. I dont know which Variable Type to use.
 

xplicitjohn

X

xplicitjohn

Correct. IF you have several of them, make the variable an array.

How come this dosent work?

  • Defeat House
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to ctower
    • Actions
      • Player Group - Pick every player in (All players) and do (Game - Defeat (Picked player) with the message: You couldn't protec...)
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Do you have it like this? This only works for the last constructed structure you know.

  • Untitled Trigger 005
    • Events
      • Unit - A unit Finishes construction
    • Conditions
      • *you could add a condition here about the unit type of constructed structure*
    • Actions
      • Set ctower = (Constructed structure)

  • Defeat House
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to ctower
    • Actions
      • Player Group - Pick every player in (All players) and do (Game - Defeat (Picked player) with the message: You couldn't protec...)
 

xplicitjohn

X

xplicitjohn

Do you have it like this? This only works for the last constructed structure you know.

  • Untitled Trigger 005
    • Events
      • Unit - A unit Finishes construction
    • Conditions
      • *you could add a condition here about the unit type of constructed structure*
    • Actions
      • Set ctower = (Constructed structure)

  • Defeat House
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to ctower
    • Actions
      • Player Group - Pick every player in (All players) and do (Game - Defeat (Picked player) with the message: You couldn't protec...)

  • Untitled Trigger 005
    • Events
      • Unit - A unit Finishes construction
    • Conditions
      • *you could add a condition here about the unit type of constructed structure*
    • Actions
      • Set ctower = (Constructed structure)
I dont have that

Edited : NVM FIXED !! TYVM YOu helped me alot +1 REp
 
Status
Not open for further replies.
Top