Building control Trigger

kiren17

New Member
Reaction score
2
How would i make a trigger to only allow me to control 1 building and if i gain another building the old building becomes neutral?

I want to have so i charm (modified) a building, and later if i charm another building the previously charmed (modified) building goes back to neutral.

I have this so far
Trigger:
  • Events
    • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Control Building

I may switch to a unit changing ownership instead.

Thanks for the help in advance.
 

Yoshii

New Member
Reaction score
74
How would i make a trigger to only allow me to control 1 building and if i gain another building the old building becomes neutral?

I want to have so i charm (modified) a building, and later if i charm another building the previously charmed (modified) building goes back to neutral.

I have this so far
Trigger:
  • Events
    • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Control Building

I may switch to a unit changing ownership instead.

Thanks for the help in advance.
action:change owner ship of CharmedUnit[playernumber of owner of triggering unit] to neutral
set charmedUnit[playernumberof owner of triggering unit]= target of ability being cast
action change ownership of target of ability being cast to owner of casting unit

charmedunit is a unit variable array with a defaul value of nothing
 

kiren17

New Member
Reaction score
2
Is this right?
Trigger:
  • Control
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Control Building
    • Actions
      • Unit - Change ownership of CharmedUnit to Neutral Passive and Change color
      • Set CharmedUnit = (Target unit of ability being cast)
      • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Change color


Edit: it works but he doesnt actually cast the spell (since the unit is already on my team). If i made it (the spell) able to target my own units would it fix this I (so i can have animation, mana spent and cooldown)?
 

Yoshii

New Member
Reaction score
74
should be correct; try it out.you should test it out on unit you do not already own.
 

kiren17

New Member
Reaction score
2
I got it so the animation shows up and i can only use it on neutral passive (not neutral hostile) and my own units. I also added a healing feature if the building is below 35% hp (heals it to 75%). The charm animation looks a bit off (seeing as its for units and not huge buildings). Do you have any animation suggestions that would work well when used on a building?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top