Change Owner

Levdragon

Member
Reaction score
2
Hey,

I'm making a type of risk map and I was wondering how to make it so if there is a building (Human Town) and if another player attacks it it will change ownership to the attacking player (Already Know This Part) but also change from Human Town to Elf Town, or Undead Town etc. (Another Unit) but if the human player attacks it, it turns again to Human Town.

If this is to confusing ask, tell me which part is confusing and I will elaborate, plus rep. to anyone who helps. Thanks.
 

Levdragon

Member
Reaction score
2
Yeh but that will only work once and how will it know what unit type it replaces and what player?
 

cleeezzz

The Undead Ranger.
Reaction score
268
set some kind of variable (race variable might not work since you might have custom races or something)

maybe just like a boolean
set it in the beginning when they choose races, Player picks night elf race
set Night_Elf[(Player Number of (Triggering Player)] equal True

when your unit attacks use if/then/else to check the boolean
if Night_Elf[Player Number of (Attacking Unit) = True
Replace Attacked Unit with Tree of Eternity.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top