- Joined
- Sep 17, 2012
- Messages
- 11
Hello there, I'm new here, and I've been attempting to create a simple map of which the goal is to survive through several levels of a dungeon.
Well, that's not the essence; I've attempted to make a spell [Please note - I'm only an amateur at triggering] which could transform the caster (any caster) into a bear, otherwise known as "Bear Form".
The trigger goes as simply as this;
Event - A unit begins the effect of a spell
Condition - Spell casted is equal to Bear Form
Action (and this is obviously where it gets loopy)
If (all conditions are true) then (actions) or else (actions)
-If; Conditions:
Unit type of (Casting unit) different of (Feral bear)
-Then; Actions:
Set BearFormCaster = (Unit type of (Casting Unit))
Unit - Replace (Casting unit) with a Feral Bear using new Max HP
-Else; Actions:
If (all conditions are true) then (actions) or else (actions)
-If; Conditions:
Unit-type of (casting unit) is equal to Feral bear
-Then; Actions:
Replace (casting unit) with BearFormCaster using Old unit HP and Mana
-Else; Actions:
Do nothing
So, yes, that's the simple trigger. The fact of the matter is, is that it works for 1 unit transforming in-and-out if it wishes so. Although, if 1 unit(#1) transforms in, another unit(#2) transforms in, the variable BearFormCaster is then changed to unit-type of unit(#2), and thus if unit(#1) transforms back, then it is changed into a unit-type equa to unit(#2).
At least, that's what I believe is the error.
And thus I am asking for help; how could I make this spell work so that one unit casting it, no matter how many units cast the same spell in between the first unit's transform in and transform out, be able to transform back to its original unit-type?
Thank you in advance,
CnP
Well, that's not the essence; I've attempted to make a spell [Please note - I'm only an amateur at triggering] which could transform the caster (any caster) into a bear, otherwise known as "Bear Form".
The trigger goes as simply as this;
Event - A unit begins the effect of a spell
Condition - Spell casted is equal to Bear Form
Action (and this is obviously where it gets loopy)
If (all conditions are true) then (actions) or else (actions)
-If; Conditions:
Unit type of (Casting unit) different of (Feral bear)
-Then; Actions:
Set BearFormCaster = (Unit type of (Casting Unit))
Unit - Replace (Casting unit) with a Feral Bear using new Max HP
-Else; Actions:
If (all conditions are true) then (actions) or else (actions)
-If; Conditions:
Unit-type of (casting unit) is equal to Feral bear
-Then; Actions:
Replace (casting unit) with BearFormCaster using Old unit HP and Mana
-Else; Actions:
Do nothing
So, yes, that's the simple trigger. The fact of the matter is, is that it works for 1 unit transforming in-and-out if it wishes so. Although, if 1 unit(#1) transforms in, another unit(#2) transforms in, the variable BearFormCaster is then changed to unit-type of unit(#2), and thus if unit(#1) transforms back, then it is changed into a unit-type equa to unit(#2).
At least, that's what I believe is the error.
And thus I am asking for help; how could I make this spell work so that one unit casting it, no matter how many units cast the same spell in between the first unit's transform in and transform out, be able to transform back to its original unit-type?
Thank you in advance,
CnP