How do I make Polymorph only allow 1 target to be sheeped per mage?

staind25

TH.net Regular
Reaction score
7
So basically, one mage should only be allowed to sheep ONE target at a time. If he sheeps another target, it should break the first sheep.

I'm really surprised this isn't an option in the object editor.

Is there a way to do this that you know of?

Thanks.

P.S. Sorry for posting multiple topics...I just happen to be dealing with several issues at once.
 

Cyrus

New Member
Reaction score
1
There are several ways to go about it. This would be my personal method.

1. When a unit is polymorphed, keep track of the unit somehow (adding a custom value, or setting the unit to a variable (sheepedUnit = targeted unit of spell cast)).

2. When the spell is cast again, check to see if the new target is the same unit as the old target. If it isn't, the sheep debuff is removed from the old target and the old target returns to normal.
 

staind25

TH.net Regular
Reaction score
7
Ah okay, I figured I'd have to do something like that...was wondering if there was a way of doing it without another variable (I'm already using 2 variables for this spell, hah)...but I may as well :)

Thank you.


EDIT: Actually...damn, I don't think your suggestion will work if there are multiple mages. Any idea how I can get around this?
 

KingTobiazZz

New Member
Reaction score
1
Ah okay, I figured I'd have to do something like that...was wondering if there was a way of doing it without another variable (I'm already using 2 variables for this spell, hah)...but I may as well :)

Thank you.


EDIT: Actually...damn, I don't think your suggestion will work if there are multiple mages. Any idea how I can get around this?

maybe with an array?
 

canons200

New Member
Reaction score
50
since you want 1 mage can sheep 1 target per time, you don't state you won't allow multi mage sheep 1 target per time.

so make the cooldown longer than the sheep duration? OR make the duration shorter than your cooldown?
 

Happy

Well-Known Member
Reaction score
71
just make this :

duration of being sheeped < cooldown

problem solved..^^
 

staind25

TH.net Regular
Reaction score
7
Thanks for all of the suggestions. I did figure it out, but it was MUCH more complicated than just making a variable an array (Due to the way I needed it to work).

As for making the duration lower than the cooldown, that would entirely defeat the purpose of the spell. I appreciate the time you took to post, though :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top