Warriors of Darkness Forum

Welcome to Clan WoD's Forum!
 
HomeHome  FAQFAQ  SearchSearch  RegisterRegister  MemberlistMemberlist  UsergroupsUsergroups  Log in  

Share | 
 

 I need help with a trigger.

Go down 
AuthorMessage
HamAma
Global Moderator


Number of posts : 227
Username : HamAma
Clan : Clan BS
Registration date : 2008-01-25

PostSubject: I need help with a trigger.   Sat Mar 15, 2008 12:01 am

Code:
Mana Orb 2
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Mana Orb)) and do (Actions)
            Loop - Actions
                Unit - Move (Picked unit) instantly to (Position of OrbCast[(Player number of (Owner of (Picked unit)))])
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        And - All (Conditions) are true
                            Conditions
                                (Mana of (Picked unit)) Less than 3000.00
                                (Integer((Mana of OrbCast[(Player number of (Owner of (Picked unit)))]))) Greater than or equal to ((Integer((Max mana of OrbCast[(Player number of (Owner of (Picked unit)))]))) / 100)
                    Then - Actions
                        For each (Integer A) from 1 to (Integer(((Max mana of OrbCast[(Player number of (Owner of (Picked unit)))]) / 100.00))), do (Actions)
                            Loop - Actions
                                Unit - Set mana of OrbCast[(Player number of (Owner of (Picked unit)))] to ((Mana of OrbCast[(Player number of (Owner of (Picked unit)))]) - 1.00)
                                Hero - Create Tome of Damage and give it to (Picked unit)
                                Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + 1.00)
                    Else - Actions

The problem? The loop only occurs once. The unit in question has 2625 mana.

Any help?
Back to top Go down
View user profile
Alex
World Editor Mod
avatar

Number of posts : 44
Username : SirAlexander
Registration date : 2008-01-26

PostSubject: Re: I need help with a trigger.   Sat Mar 15, 2008 12:10 am

That doesn't make any sense to me..
Who or what is OrbCast?
Back to top Go down
View user profile
HamAma
Global Moderator


Number of posts : 227
Username : HamAma
Clan : Clan BS
Registration date : 2008-01-25

PostSubject: Re: I need help with a trigger.   Sat Mar 15, 2008 12:14 am

OrbCast = unit array[9]

So far, I've tried the following:
- Set the value of (Integer(((Max mana of OrbCast[(Player number of (Owner of (Picked unit)))]) / 100.00))) to a variable "lol", and made it float. It's 26.
- Changed (Integer(((Max mana of OrbCast[(Player number of (Owner of (Picked unit)))]) / 100.00))) to 50. It still doesn't loop. >_>
Back to top Go down
View user profile
Alex
World Editor Mod
avatar

Number of posts : 44
Username : SirAlexander
Registration date : 2008-01-26

PostSubject: Re: I need help with a trigger.   Sat Mar 15, 2008 12:18 am

Hmm, I am not so sure about what you are trying to do..
Is this some sort of spell?
Or an in-game trigger.
Back to top Go down
View user profile
HamAma
Global Moderator


Number of posts : 227
Username : HamAma
Clan : Clan BS
Registration date : 2008-01-25

PostSubject: Re: I need help with a trigger.   Sat Mar 15, 2008 12:21 am

It's a spell. Don't concern yourself with the first trigger (this is Mana Orb 2, after all), because it must work properly if the references here work.

My problem, however, is that apparently even if i set it to loop 1 to 50, everything in the loop can only function once per second. :/
Back to top Go down
View user profile
HamAma
Global Moderator


Number of posts : 227
Username : HamAma
Clan : Clan BS
Registration date : 2008-01-25

PostSubject: Re: I need help with a trigger.   Sat Mar 15, 2008 12:28 am

PROBLEM SOLVED BY ME USING A FOR LOOP INTEGER B INSTEAD OF INTEGER A HOW THE HELL THAT FIXED THE PROBLEM I DON'T KNOW.
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: I need help with a trigger.   

Back to top Go down
 
I need help with a trigger.
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Warriors of Darkness Forum :: Warcraft III :: Mapmaking-
Jump to: