Arrays trouble seeing...

sunshinex3

You can change this now in User CP.
Reaction score
7
Code:
Right of Rakshir power level
    Events
        Unit - A unit Dies
    Conditions
        (Level of Right of Rak'shir (tal'darim high lord) for (Killing unit)) Greater than 0
        ((Dying unit) is in Rakshirlvl1) Equal to True
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Right of Rak'shir (tal'darim high lord) for (Killing unit)) Equal to 1
            Then - Actions
                Unit - Increase level of Power (Tal'darim High Lord) for (Killing unit)
                Set RakshirReal = (Real((Level of Power (Tal'darim High Lord) for (Killing unit))))
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Right of Rak'shir (tal'darim high lord) for (Killing unit)) Equal to 2
                    Then - Actions
                        Unit - Increase level of Power (Tal'darim High Lord) for (Killing unit)
                        Unit - Increase level of Power (Tal'darim High Lord) for (Killing unit)
                        Set RakshirReal = (Real((Level of Power (Tal'darim High Lord) for (Killing unit))))
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Right of Rak'shir (tal'darim high lord) for (Killing unit)) Equal to 3
                            Then - Actions
                                Unit - Increase level of Power (Tal'darim High Lord) for (Killing unit)
                                Unit - Increase level of Power (Tal'darim High Lord) for (Killing unit)
                                Unit - Increase level of Power (Tal'darim High Lord) for (Killing unit)
                                Set RakshirReal = (Real((Level of Power (Tal'darim High Lord) for (Killing unit))))
                            Else - Actions
                                Do nothing

so their can be more than one player with alarak using this trigger the integer could get mixed up... i think... wait yea... so...

how do i use arrays here, i get that i have to have a size of 12 for each player... but how do i connect players to this array? how do i store the real variable to the right player?
 

sunshinex3

You can change this now in User CP.
Reaction score
7
Code:
Right of Rakshir power level
    Events
        Unit - A unit Dies
    Conditions
        (Level of Right of Rak'shir (tal'darim high lord) for (Killing unit)) Greater than 0
        ((Dying unit) is in Rakshirlvl1) Equal to True
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Right of Rak'shir (tal'darim high lord) for (Killing unit)) Equal to 1
            Then - Actions
                Unit - Increase level of Power (Tal'darim High Lord) for (Killing unit)
                Set RakshirRealArray[(Player number of (Owner of (Killing unit)))] = (Real((Level of Power (Tal'darim High Lord) for (Killing unit))))
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Right of Rak'shir (tal'darim high lord) for (Killing unit)) Equal to 2
                    Then - Actions
                        Unit - Increase level of Power (Tal'darim High Lord) for (Killing unit)
                        Unit - Increase level of Power (Tal'darim High Lord) for (Killing unit)
                        Set RakshirRealArray[(Player number of (Owner of (Killing unit)))] = (Real((Level of Power (Tal'darim High Lord) for (Killing unit))))
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Right of Rak'shir (tal'darim high lord) for (Killing unit)) Equal to 3
                            Then - Actions
                                Unit - Increase level of Power (Tal'darim High Lord) for (Killing unit)
                                Unit - Increase level of Power (Tal'darim High Lord) for (Killing unit)
                                Unit - Increase level of Power (Tal'darim High Lord) for (Killing unit)
                                Set RakshirRealArray[(Player number of (Owner of (Killing unit)))] = (Real((Level of Power (Tal'darim High Lord) for (Killing unit))))
                            Else - Actions
                                Do nothing
this seems to work correctly
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top