• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

help "Divine Intelligence"

Status
Not open for further replies.
Level 3
Joined
Jun 30, 2006
Messages
24
i want to make a spell called divine intelligence and its like this ..

Code:
Events
    Unit - Spell Tester 0000 <gen> Begins casting an ability
Conditions
    (Ability being cast) Equal to Divine Intelligence 
Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            (Hero level of (Triggering unit)) Greater than or equal to 1
        Then - Actions
            Hero - Modify Intelligence of (Triggering unit): Add 15
            Wait 15.00 seconds
            Hero - Modify Intelligence of (Triggering unit): Subtract 15
        Else - Actions
            Do nothing
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            (Hero level of (Triggering unit)) Greater than or equal to 3
        Then - Actions
            Hero - Modify Intelligence of (Triggering unit): Add 20
            Wait 20.00 seconds
            Hero - Modify Intelligence of (Triggering unit): Subtract 20
        Else - Actions
            Do nothing
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            (Hero level of (Triggering unit)) Greater than or equal to 6
        Then - Actions
            Hero - Modify Intelligence of (Triggering unit): Add 25
            Wait 25.00 seconds
            Hero - Modify Intelligence of (Triggering unit): Subtract 25
        Else - Actions
            Do nothing


but when i use it the user of the spell gets the intelligence permanently and i dont know why !!!

and i dont know if possible but if it is what i would like to do is to make the effect of the spell depending on its level and not the level of the hero !!

plz help me 

Mocreiazul
 
Level 3
Joined
Jul 29, 2006
Messages
61
triggering unit disappears after a wait time, I suggest you use a variable instead. (or even better a local variable, so it can be MUI)
 
Level 2
Joined
Sep 12, 2006
Messages
23
gralamin said:
triggering unit disappears after a wait time, I suggest you use a variable instead. (or even better a local variable, so it can be MUI)
im pretty sure thats not the problem, because triggering unit is the only one that doesnt disappear after a wait time, iirc.

and i dont know if possible but if it is what i would like to do is to make the effect of the spell depending on its level and not the level of the hero !!

Thats not very hard =D this is what you want.
Code:
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Divine Intelligence
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Level of Divine Intelligence for (Triggering unit)) Equal to 1
    Then - Actions
        Hero - Modify Intelligence of (Triggering unit): Add X
        Wait X seconds
        Hero - Modify Intelligence of (Triggering unit): Subtract X
    Else - Actions
        Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Level of Divine Intelligence for (Triggering unit)) Equal to 2
    Then - Actions
        Hero - Modify Intelligence of (Triggering unit): Add X
        Wait X seconds
        Hero - Modify Intelligence of (Triggering unit): Subtract X
    Else - Actions
        Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Level of Divine Intelligence for (Triggering unit)) Equal to 3
    Then - Actions
        Hero - Modify Intelligence of (Triggering unit): Add X
        Wait X seconds
        Hero - Modify Intelligence of (Triggering unit): Subtract X
    Else - Actions
        Do nothing

Lemme know if this works.
 
Level 3
Joined
Jun 30, 2006
Messages
24
so what i got to do is ..instead of putting unit begins casting an ability i put starts the effect of an ability ?
 
Level 11
Joined
Jul 12, 2005
Messages
764
This can be made much simpler:

Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Divine Intelligence
Actions
Set MyHero = Triggering unit
Set X = 10 + (Level of Divine Intelligence for (Triggering unit) * 5)
Hero - Modify Intelligence of MyHero: Add X
Wait X seconds
Hero - Modify Intelligence of MyHero: Subtract X

See... X will be 15/20/25, according to the level. Tricky, heh?
 
Level 3
Joined
Jun 30, 2006
Messages
24
thx guys :D and even if i put more levels to an ability this trigger will still work ?

ohh and one more thing .. when i put a special effect on it it stays for a while then dissapear before the effect of the ability ends .. how do i extend the times the s effect is shown ?
 
Level 3
Joined
Jun 30, 2006
Messages
24
paskovich i cant find the action you indicated ...

this " set X " is a variable right ?? if it is .. of which type is it ?

and i cant find the action level of Divine Intelligence for Triggering Unit o_O
 
Level 3
Joined
Aug 17, 2006
Messages
38
It looks like this is a GUI trigger you're making, so you want to do the following steps:

1) Add a new action "Set Variable"
2) Click "variable" and pick an integer variable
3) Click on "value"
4) Select "Arithmetic"
5) Click on "value" for the Arithmetic function and type in 10. Then press ok.
6) Click on "1" and select Arithmetic again
7) Click on "value" and select "Unit - Level of Ability For Unit"
8) Click on "ability" and select your Divine Intelligence ability. Then click ok (triggering unit is already picked)
9) Click on "+" and change it to "x". Click ok.
10) Click on "1" and type in the value 5.
11) Press ok about 3 or 4 times, until you get back to the trigger window.

That should do it for the step that's confusing you. I know I probably went more in depth than you needed, but oh well. You shouldn't have any problems with these steps at least.
 
Level 3
Joined
Jun 30, 2006
Messages
24
wtf ? that function doesnt appear in here !!!

something's wrong with my we ..... well thx anyway ill reinstall it ...

i guess if install everything correctly this will work :)
 
Status
Not open for further replies.
Top