• 🏆 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!

to make this MPI/MUI

Status
Not open for further replies.
Level 11
Joined
Dec 5, 2009
Messages
846
Hi there im currently trying to store some values with triggering i made this thing:
  • Storing Elements
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Fire
          • (Ability being cast) Equal to Earth
          • (Ability being cast) Equal to Lightning
          • (Ability being cast) Equal to Cold
          • (Ability being cast) Equal to Light
          • (Ability being cast) Equal to Water
    • Actions
      • Set IntegerCount = (Player number of (Owner of (Triggering unit)))
      • Set U[IntegerCount] = (Triggering unit)
      • Set Index = (Player number of (Owner of U[IntegerCount]))
      • Game - Display to (All players) the text: (String((Player number of (Owner of U[IntegerCount]))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • StoringElements[Index] Equal to 4
        • Then - Actions
          • Game - Display to (All players) the text: You already have 4 ...
        • Else - Actions
          • Set StoringElements[Index] = (StoringElements[Index] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ability being cast) Equal to Fire
            • Then - Actions
              • Set SystemOrder[StoringElements[Index]] = 1
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • FireBoolean[Index] Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • FireBoolean[(Index + 10)] Equal to True
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • FireBoolean[(Index + 100)] Equal to True
                        • Then - Actions
                          • Set FireBoolean[(Index + 1000)] = True
                        • Else - Actions
                          • Set FireBoolean[(Index + 100)] = True
                    • Else - Actions
                      • Set FireBoolean[(Index + 10)] = True
                • Else - Actions
                  • Set FireBoolean[Index] = True
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
so here i store the value fire, so if player 1 uses the ability fire the index will be set to 1 right? and it will be stored propely, but the stored value wont be used until a spell is used, meanwhile player 2 can use the same thing, then index will be 2 and if player 1 uses the spell when player2 just used fire and set index to 2 the stored values will be overwritten and be replaced by player 2 stored values instead. How can i prevent this?

EDIT: BTW i posted the same problem in another thread, but that one was set to solved so i simply made a new one.
 
Status
Not open for further replies.
Top