Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Hi Hivers!
How do I do this; when Kael/Bloodmage casts a spell 1 of his sphere will disappear and will return after awhile... Thanks!![]()
Remove Spheres

Events


Unit - A unit Starts the effect of an ability

Conditions


(Unit-type of (Triggering unit)) Equal to Blood Mage

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Level of Sphere (3) for (Triggering unit)) Equal to 1



Then - Actions




Unit - Remove Sphere (3) from (Triggering unit)




Unit - Add Sphere (2) to (Triggering unit)



Else - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Level of Sphere (2) for (Triggering unit)) Equal to 1





Then - Actions






Unit - Remove Sphere (2) from (Triggering unit)






Unit - Add Sphere (1) to (Triggering unit)





Else - Actions






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Level of Sphere (1) for (Triggering unit)) Equal to 1







Then - Actions








Unit - Remove Sphere (1) from (Triggering unit)







Else - Actions
Nope- Can a player ever have more than 1 Blood mage-type unit (or any other unit for whom you wish to remove spheres)?

Nope- Can more than 1 player have such a unit?

Remove Spheres

Events


Unit - A unit Starts the effect of an ability

Conditions


(Unit-type of (Triggering unit)) Equal to Blood Mage

Actions


Set heroBloodMage = (Triggering unit)


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Level of Spheres (3) for (Triggering unit)) Equal to 1



Then - Actions




Unit - Add Spheres (2) to heroBloodMage




Unit - Remove Spheres (3) from heroBloodMage



Else - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Level of Spheres (2) for (Triggering unit)) Equal to 1





Then - Actions






Unit - Add Spheres (1) to heroBloodMage






Unit - Remove Spheres (2) from heroBloodMage





Else - Actions






Unit - Remove Spheres (1) from heroBloodMage


Set sphereTimer = 5.00


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Regain Spheres <gen> is on) Equal to False



Then - Actions




Trigger - Turn on Regain Spheres <gen>



Else - Actions
Regain Spheres

Events


Time - Every 0.50 seconds of game time

Conditions

Actions


Set sphereTimer = (sphereTimer - 0.50)


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




sphereTimer Equal to 0.00



Then - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Level of Spheres (2) for heroBloodMage) Equal to 1





Then - Actions






Unit - Remove Spheres (2) from heroBloodMage






Unit - Add Spheres (3) to heroBloodMage






Trigger - Turn off (This trigger)





Else - Actions






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Level of Spheres (1) for heroBloodMage) Equal to 1







Then - Actions








Unit - Remove Spheres (1) from heroBloodMage








Unit - Add Spheres (2) to heroBloodMage







Else - Actions








Unit - Add Spheres (1) to heroBloodMage






Set sphereTimer = 5.00



Else - Actions
0.01 would be silly and is not worth mentioning at all, you know thatI think an interval of 1.00 second would not hurt, Apo.
Logically, we would count as 1... 2... 3...
Never 0.5... 1.0... 1.5...
Although if you really want to keep realistic count, you should make it 0.01 second per check, but that would lag the game if it prolongs wouldn't it ?
So an interval of 1.00 second is okay in this case.
THANKS FOR THE HELP ap0calypse!!+Rep to all
Remove Spheres

Events


Unit - A unit Starts the effect of an ability

Conditions


(Unit-type of (Triggering unit)) Equal to Kael

Actions


Set heroBloodMage = (Triggering unit)


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Ability being cast) Equal to Shattered Universe




(Level of Sphere (Exort) (Fire) for (Triggering unit)) Equal to 1



Then - Actions




Unit - Remove Sphere (Exort) (Fire) from heroBloodMage



Else - Actions




Set sphereTimer_Fire = 25.00


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Ability being cast) Equal to Ice Bolt




(Level of Sphere (Quas) (Ice) for (Triggering unit)) Equal to 1



Then - Actions




Unit - Remove Sphere (Quas) (Ice) from heroBloodMage



Else - Actions




Set sphereTimer_Ice = 20.00


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Ability being cast) Equal to Extended Lightning




(Level of Sphere (Wex) (Storm) for (Triggering unit)) Equal to 1



Then - Actions




Unit - Remove Sphere (Wex) (Storm) from heroBloodMage



Else - Actions




Set sphereTimer_Storm = 23.00


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Regain Spheres <gen> is on) Equal to False



Then - Actions




Trigger - Turn on Regain Spheres <gen>



Else - Actions
Regain Spheres

Events


Time - Every 1.00 seconds of game time

Conditions

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Level of Sphere (Exort) (Fire) for heroBloodMage) Equal to 0



Then - Actions




Set sphereTimer_Fire = (sphereTimer_Fire - 1.00)




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






sphereTimer_Fire Equal to 0.00





Then - Actions






Unit - Add Sphere (Exort) (Fire) to heroBloodMage





Else - Actions






Do nothing



Else - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Level of Sphere (Quas) (Ice) for heroBloodMage) Equal to 0



Then - Actions




Set sphereTimer_Ice = (sphereTimer_Ice - 1.00)




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






sphereTimer_Ice Equal to 0.00





Then - Actions






Unit - Add Sphere (Quas) (Ice) to heroBloodMage





Else - Actions






Do nothing



Else - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Level of Sphere (Wex) (Storm) for heroBloodMage) Equal to 0



Then - Actions




Set sphereTimer_Storm = (sphereTimer_Storm - 1.00)




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






sphereTimer_Storm Equal to 0.00





Then - Actions






Unit - Add Sphere (Wex) (Storm) to heroBloodMage





Else - Actions






Do nothing



Else - Actions

Yes, but I figure that he needs it for some kind of system (like 'you cannot cast a spell unless you have enough orbs').Geries said:Doesn't the "sphere" ability that (blood)mages have by default do this?![]()
let me try changing itYou used "Triggering Unit" in the Regain Spheres-trigger. You should use the variable "heroBloodMage" (it may be my own mistake, I don't know).
thanksCongratulations on not being a peon anymore![]()

Remove Spheres

Events


Unit - A unit Starts the effect of an ability

Conditions


(Unit-type of (Triggering unit)) Equal to Kael

Actions


Set heroBloodMage = (Triggering unit)


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Ability being cast) Equal to Shattered Universe




(Level of Sphere (Exort) (Fire) for (Triggering unit)) Equal to 1



Then - Actions




Unit - Remove Sphere (Exort) (Fire) from heroBloodMage




Wait 25.00 seconds




Unit - Add Sphere (Exort) (Fire) to heroBloodMage



Else - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Ability being cast) Equal to Ice Bolt




(Level of Sphere (Quas) (Ice) for (Triggering unit)) Equal to 1



Then - Actions




Unit - Remove Sphere (Quas) (Ice) from heroBloodMage




Wait 20.00 seconds




Unit - Add Sphere (Quas) (Ice) to heroBloodMage



Else - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Ability being cast) Equal to Extended Lightning




(Level of Sphere (Wex) (Storm) for (Triggering unit)) Equal to 1



Then - Actions




Unit - Remove Sphere (Wex) (Storm) from heroBloodMage




Wait 23.00 seconds




Unit - Add Sphere (Wex) (Storm) to heroBloodMage



Else - Actions





Yes, but I figure that he needs it for some kind of system (like 'you cannot cast a spell unless you have enough orbs').



-------- SomeInteger = integer between 0 and 2 --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)

If - Conditions


SomeInteger Equal to 0

Then - Actions


-------- Integer == 0 --------

Else - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




SomeInteger Equal to 1



Then - Actions




-------- Integer == 1 --------



Else - Actions




-------- Integer == 2 --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)

If - Conditions


SomeInteger Equal to 0

Then - Actions


-------- Integer == 0 --------

Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)

If - Conditions


SomeInteger Equal to 1

Then - Actions


-------- Integer == 1 --------

Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)

If - Conditions


SomeInteger Equal to 2

Then - Actions


-------- Integer == 2 --------

Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)

If - Conditions


(Level of Spheres (fire) (2) for (Triggering unit)) Equal to 0

Then - Actions


Unit - Order heroBloodMage to Stop

Else - Actions


Unit - Remove Spheres (fire) (2) from heroBloodMage


Set sphereTimer[2] = 5.00
You done it very well, just wanted to say about the the "if not": I was using it once, and since I overdid it, the map crushed: if not:ifnot: ifnot: on the 10 time it just crushed my map. unfixedable other than this methode of parting if: if: if: if: x1000 times won't crush, since I got used to it, I don't use ifnot anymore. And about the spells, Whatever spell that done immidiatly, without need of TARGETING, will be done instantly so stop wont effect them. And some spells that are stopped immdiatly will still make your hero lose the mana for the try, but Im not sure which spells exactly.Well, best_player_88 pretty much nailed it
There are only 2 things that could have been better.
The first one is that is adding a fourth orb won't work because the blood mage only has 3 attachment points to put the orbs in (sprite,first-third). Of course, it's possible to attach 2 orbs on the same attachment point, but it wouldn't look that great.
The second one is that if you have multiple if-then-elses (ITE's) and you're certain that if ITE 1 is true, then the rest is false, you should put the others in the else-section.
If the hero does not have the correct orb, simply order him to stop (Unit - Order unit with no target).As opposed to...
-------- SomeInteger = integer between 0 and 2 --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SomeInteger Equal to 0
Then - Actions
-------- Integer == 0 --------
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SomeInteger Equal to 1
Then - Actions
-------- Integer == 1 --------
Else - Actions
-------- Integer == 2 --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SomeInteger Equal to 0
Then - Actions
-------- Integer == 0 --------
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SomeInteger Equal to 1
Then - Actions
-------- Integer == 1 --------
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SomeInteger Equal to 2
Then - Actions
-------- Integer == 2 --------
Else - Actions
This won't work for a few spells (such as wind walk I believe), but changing the event to "begins channeling" should eliminate a few of those.
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Spheres (fire) (2) for (Triggering unit)) Equal to 0
Then - Actions
Unit - Order heroBloodMage to Stop
Else - Actions
Unit - Remove Spheres (fire) (2) from heroBloodMage
Set sphereTimer[2] = 5.00
THANKS FOR YOUR HELP GUYS!!If the hero does not have the correct orb, simply order him to stop (Unit - Order unit with no target).
This won't work for a few spells (such as wind walk I believe), but changing the event to "begins channeling" should eliminate a few of those.
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Spheres (fire) (2) for (Triggering unit)) Equal to 0
Then - Actions
Unit - Order heroBloodMage to Stop
Else - Actions
Unit - Remove Spheres (fire) (2) from heroBloodMage
Set sphereTimer[2] = 5.00



