1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  5. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  6. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  7. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  8. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  9. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  10. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  11. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Advanced Pet System v2 [MPI] [Wohuynia]

Submitted by wohuynia
This bundle is marked as substandard. It may contain bugs, not perform optimally or otherwise be in violation of the submission rules.
Note:

This is an advanced spell system, so the only used with multi board.
I know that in this system there are 10 triggers that is really much, but to add new pets you don't need to set up new triggers, also using my system you can add more "Arrow key controlled" multi boards. Probably most of you wont use it cause of the trigger count but just read it and maybe some of you will learn something.

PS#2: I accept only good criticism, flame will be ignored and reported.

Update log
2.0 reworked coding, change layout, added more features.
1.7 removed final leaks, fixed documentation.
1.6 fixed a lot of bugs, reworked the code, made it MPI.
1.5 reworked the coding a bit.
1.4 cleared all the leaks.
1.3 cleared most of the leaks.
1.2 some more fixes, added trigger to the forum.
1.1 some fixes, made it more user friendly.
1.0 official release.


Pros/Cons
Pros:
1. It is the most advanced pet system on hiveworkshop.com.
2. It uses arrow keys to summon a pet.
3. Has an easy show/hide multi board.
4. Bugles and leak-less.
5. Easy to add new pets.
6. Easy Copy/Paste export.
7. MPI

Cons:
1. Quite a lot of triggers.
2. Uses custom made abilities/units/items (could be changed)
3. Trigger is hard to understand for beginners.

Triggers

Initialization

  • Initialization
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- Set up variables --------
      • Set W_P_Group[1] = (All players controlled by a User player)
      • Set W_Point = (Center of (Playable map area))
      • Set W_Point2 = (Center of (Playable map area))
      • Set W_X = (Number of players in (All players controlled by a User player))
      • -------- I advice not to touch unless you really know what are you doing --------
      • -------- This creates multi board and all the variables --------
      • For each (Integer W_Int) from 1 to W_X, do (Actions)
        • Loop - Actions
          • Set W_PetOwner[W_Int] = No unit
          • Set W_Pet1[W_Int] = No unit
          • Set W_Pet2[W_Int] = No unit
          • Set W_Pet3[W_Int] = No unit
          • Set W_Rolumn[W_Int] = 0
          • Set W_Range[W_Int] = 350.00
          • Multiboard - Create a multiboard with 4 columns and 5 rows, titled Pet Menu
          • Set W_Multiboard[W_Int] = (Last created multiboard)
          • Multiboard - Set the width for W_Multiboard[W_Int] item in column 0, row 1 to 1.50% of the total screen width
          • Multiboard - Set the width for W_Multiboard[W_Int] item in column 1, row 0 to 2.00% of the total screen width
          • Multiboard - Set the width for W_Multiboard[W_Int] item in column 0, row 0 to 4.00% of the total screen width
          • Multiboard - Set the width for W_Multiboard[W_Int] item in column 2, row 2 to 7.00% of the total screen width
          • Multiboard - Set the icon for W_Multiboard[W_Int] item in column 0, row 1 to UI\Minimap\MinimapIconCreepLoc2.blp
          • Multiboard - Set the icon for W_Multiboard[W_Int] item in column 1, row 2 to ReplaceableTextures\WorldEditUI\Editor-Random-Unit.blp
          • Multiboard - Set the icon for W_Multiboard[W_Int] item in column 1, row 3 to UI\Widgets\Console\Human\infocard-heroattributes-str.blp
          • Multiboard - Set the icon for W_Multiboard[W_Int] item in column 1, row 4 to UI\Widgets\Console\Human\infocard-heroattributes-agi.blp
          • Multiboard - Set the icon for W_Multiboard[W_Int] item in column 1, row 5 to UI\Widgets\Console\Human\infocard-heroattributes-int.blp
          • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 2 to Name
          • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 2 to Lvl
          • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 3 to Str:
          • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 4 to Agi:
          • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 5 to Int:
          • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 3 to (0 + (|Cffff0000 + + 0))
          • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 4 to (0 + (|Cffff0000 + + 0))
          • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 5 to (0 + (|Cffff0000 + + 0))
          • Multiboard - Hide W_Multiboard[W_Int]
      • -------- Remove Location leaks --------
      • Custom script: call DestroyForce(udg_W_P_Group[1])
      • Custom script: call RemoveLocation(udg_W_Point)
      • Custom script: call RemoveLocation(udg_W_Point2)

Show Multiboard
  • Show Interfaces
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Pet Menu
    • Actions
      • -------- This trigger shows the multi board after ability being casted --------
      • -------- I advice not to touch unless you really know what are you doing --------
      • For each (Integer W_Int) from 1 to W_X, do (Actions)
        • Loop - Actions
          • Custom script: if ( GetLocalPlayer() == Player(( udg_W_Int-1)) ) then
          • -------- ----------------------- --------
          • -------- This locks camera to triggering unit, else it would move camera up and down cause of arrow keys --------
          • -------- ----------------------- --------
          • Camera - Lock camera target for (Triggering player) to (Triggering unit), offset by (0.00, 0.00) using Default rotation
          • Set W_Rolumn[W_Int] = 1
          • For each (Integer W_Integer) from 1 to 4, do (Actions)
            • Loop - Actions
              • Multiboard - Set the icon for W_Multiboard[W_Int] item in column W_Integer, row 1 to UI\Minimap\MinimapIconCreepLoc2.blp
          • Multiboard - Set the icon for W_Multiboard[W_Int] item in column W_Rolumn[W_Int], row 1 to UI\MiniMap\MinimapIcon\MinimapIconGold.blp
          • Multiboard - Show W_Multiboard[W_Int]
          • Custom script: endif
          • Trigger - Run Update Interface <gen> (checking conditions)

Move Left
  • Move Left
    • Events
      • Player - Player 1 (Red) Presses the Left Arrow key
      • Player - Player 2 (Blue) Presses the Left Arrow key
      • Player - Player 3 (Teal) Presses the Left Arrow key
      • Player - Player 4 (Purple) Presses the Left Arrow key
      • Player - Player 5 (Yellow) Presses the Left Arrow key
      • Player - Player 6 (Orange) Presses the Left Arrow key
      • Player - Player 7 (Green) Presses the Left Arrow key
      • Player - Player 8 (Pink) Presses the Left Arrow key
      • Player - Player 9 (Gray) Presses the Left Arrow key
      • Player - Player 10 (Light Blue) Presses the Left Arrow key
      • Player - Player 11 (Dark Green) Presses the Left Arrow key
      • Player - Player 12 (Brown) Presses the Left Arrow key
    • Conditions
    • Actions
      • -------- This makes multi board selection go up --------
      • -------- I advice not to touch unless you really know what are you doing --------
      • -------- Don't touch --------
      • For each (Integer W_Int) from 1 to W_X, do (Actions)
        • Loop - Actions
          • Custom script: if ( GetLocalPlayer() == Player(( udg_W_Int-1)) ) then
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • W_Rolumn[W_Int] Greater than 0
            • Then - Actions
              • Set W_Rolumn[W_Int] = (W_Rolumn[W_Int] - 1)
              • For each (Integer W_Integer) from 1 to 4, do (Actions)
                • Loop - Actions
                  • Multiboard - Set the icon for W_Multiboard[W_Int] item in column W_Integer, row 1 to UI\Minimap\MinimapIconCreepLoc2.blp
              • Multiboard - Set the icon for W_Multiboard[W_Int] item in column W_Rolumn[W_Int], row 1 to UI\MiniMap\MinimapIcon\MinimapIconGold.blp
            • Else - Actions
          • Trigger - Run Update Interface <gen> (checking conditions)
          • Custom script: endif
      • -------- Don't touch --------

Move Right
  • Move Right
    • Events
      • Player - Player 1 (Red) Presses the Right Arrow key
      • Player - Player 2 (Blue) Presses the Right Arrow key
      • Player - Player 3 (Teal) Presses the Right Arrow key
      • Player - Player 4 (Purple) Presses the Right Arrow key
      • Player - Player 5 (Yellow) Presses the Right Arrow key
      • Player - Player 6 (Orange) Presses the Right Arrow key
      • Player - Player 7 (Green) Presses the Right Arrow key
      • Player - Player 8 (Pink) Presses the Right Arrow key
      • Player - Player 9 (Gray) Presses the Right Arrow key
      • Player - Player 10 (Light Blue) Presses the Right Arrow key
      • Player - Player 11 (Dark Green) Presses the Right Arrow key
      • Player - Player 12 (Brown) Presses the Right Arrow key
    • Conditions
    • Actions
      • -------- This makes multi board selection go down --------
      • -------- I advice not to touch unless you really know what are you doing --------
      • -------- Don't touch --------
      • For each (Integer W_Int) from 1 to W_X, do (Actions)
        • Loop - Actions
          • Custom script: if ( GetLocalPlayer() == Player(( udg_W_Int-1)) ) then
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • W_Rolumn[W_Int] Less than 4
            • Then - Actions
              • Set W_Rolumn[W_Int] = (W_Rolumn[W_Int] + 1)
              • For each (Integer W_Integer) from 1 to 4, do (Actions)
                • Loop - Actions
                  • Multiboard - Set the icon for W_Multiboard[W_Int] item in column W_Integer, row 1 to UI\Minimap\MinimapIconCreepLoc2.blp
              • Multiboard - Set the icon for W_Multiboard[W_Int] item in column W_Rolumn[W_Int], row 1 to UI\MiniMap\MinimapIcon\MinimapIconGold.blp
            • Else - Actions
          • Trigger - Run Update Interface <gen> (checking conditions)
          • Custom script: endif
      • -------- Don't touch --------

Update Interface
  • Update Interface
    • Events
    • Conditions
    • Actions
      • For each (Integer W_Int) from 1 to W_X, do (Actions)
        • Loop - Actions
          • Custom script: if ( GetLocalPlayer() == Player(( udg_W_Int-1)) ) then
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • W_Rolumn[W_Int] Equal to 1
            • Then - Actions
              • Multiboard - Set the display style for W_Multiboard[W_Int] item in column 0, row 0 to Show text and Hide icons
              • Multiboard - Set the display style for W_Multiboard[W_Int] item in column 1, row 0 to Show text and Show icons
              • Multiboard - Set the display style for W_Multiboard[W_Int] item in column 0, row 1 to Show text and Show icons
              • Multiboard - Set the icon for W_Multiboard[W_Int] item in column 1, row 2 to ReplaceableTextures\WorldEditUI\Editor-Random-Unit.blp
              • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 2 to (Proper name of W_Pet1[W_Int])
              • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 2 to (Lv: + (String((Hero level of W_Pet1[W_Int]))))
              • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 3 to Str:
              • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 4 to Agi:
              • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 5 to Int:
              • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 3 to ((String((Strength of W_Pet1[W_Int] (Exclude bonuses)))) + (|Cff00ff00 + + (String(((Strength of W_Pet1[W_Int] (Include bonuses)) - (Strength of W_Pet1[W_Int] (Exclude bonuses)))))))
              • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 4 to ((String((Agility of W_Pet1[W_Int] (Exclude bonuses)))) + (|Cff00ff00 + + (String(((Agility of W_Pet1[W_Int] (Include bonuses)) - (Agility of W_Pet1[W_Int] (Exclude bonuses)))))))
              • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 5 to ((String((Intelligence of W_Pet1[W_Int] (Exclude bonuses)))) + (|Cff00ff00 + + (String(((Intelligence of W_Pet1[W_Int] (Include bonuses)) - (Intelligence of W_Pet1[W_Int] (Exclude bonuses)))))))
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • W_Rolumn[W_Int] Equal to 2
                • Then - Actions
                  • Multiboard - Set the display style for W_Multiboard[W_Int] item in column 0, row 0 to Show text and Hide icons
                  • Multiboard - Set the display style for W_Multiboard[W_Int] item in column 1, row 0 to Show text and Show icons
                  • Multiboard - Set the display style for W_Multiboard[W_Int] item in column 0, row 1 to Show text and Show icons
                  • Multiboard - Set the icon for W_Multiboard[W_Int] item in column 1, row 2 to ReplaceableTextures\WorldEditUI\Editor-Random-Unit.blp
                  • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 2 to (Proper name of W_Pet2[W_Int])
                  • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 2 to (Lv: + (String((Hero level of W_Pet2[W_Int]))))
                  • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 3 to Str:
                  • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 4 to Agi:
                  • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 5 to Int:
                  • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 3 to ((String((Strength of W_Pet2[W_Int] (Exclude bonuses)))) + (|Cff00ff00 + + (String(((Strength of W_Pet2[W_Int] (Include bonuses)) - (Strength of W_Pet2[W_Int] (Exclude bonuses)))))))
                  • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 4 to ((String((Agility of W_Pet2[W_Int] (Exclude bonuses)))) + (|Cff00ff00 + + (String(((Agility of W_Pet2[W_Int] (Include bonuses)) - (Agility of W_Pet2[W_Int] (Exclude bonuses)))))))
                  • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 5 to ((String((Intelligence of W_Pet2[W_Int] (Exclude bonuses)))) + (|Cff00ff00 + + (String(((Intelligence of W_Pet2[W_Int] (Include bonuses)) - (Intelligence of W_Pet2[W_Int] (Exclude bonuses)))))))
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • W_Rolumn[W_Int] Equal to 3
                    • Then - Actions
                      • Multiboard - Set the display style for W_Multiboard[W_Int] item in column 0, row 0 to Show text and Hide icons
                      • Multiboard - Set the display style for W_Multiboard[W_Int] item in column 1, row 0 to Show text and Show icons
                      • Multiboard - Set the display style for W_Multiboard[W_Int] item in column 0, row 1 to Show text and Show icons
                      • Multiboard - Set the icon for W_Multiboard[W_Int] item in column 1, row 2 to ReplaceableTextures\WorldEditUI\Editor-Random-Unit.blp
                      • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 2 to (Proper name of W_Pet3[W_Int])
                      • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 2 to (Lv: + (String((Hero level of W_Pet3[W_Int]))))
                      • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 3 to Str:
                      • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 4 to Agi:
                      • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 5 to Int:
                      • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 3 to ((String((Strength of W_Pet3[W_Int] (Exclude bonuses)))) + (|Cff00ff00 + + (String(((Strength of W_Pet3[W_Int] (Include bonuses)) - (Strength of W_Pet3[W_Int] (Exclude bonuses)))))))
                      • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 4 to ((String((Agility of W_Pet3[W_Int] (Exclude bonuses)))) + (|Cff00ff00 + + (String(((Agility of W_Pet3[W_Int] (Include bonuses)) - (Agility of W_Pet3[W_Int] (Exclude bonuses)))))))
                      • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 5 to ((String((Intelligence of W_Pet3[W_Int] (Exclude bonuses)))) + (|Cff00ff00 + + (String(((Intelligence of W_Pet3[W_Int] (Include bonuses)) - (Intelligence of W_Pet3[W_Int] (Exclude bonuses)))))))
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • W_Rolumn[W_Int] Equal to 4
                        • Then - Actions
                          • Multiboard - Set the display style for W_Multiboard[W_Int] item in column 0, row 0 to Show text and Hide icons
                          • Multiboard - Set the display style for W_Multiboard[W_Int] item in column 0, row 1 to Show text and Show icons
                          • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 2 to Press <Esc>
                          • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 3 to To
                          • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 3 to Exit
                          • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 2 to <Empty String>
                          • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 4 to <Empty String>
                          • Multiboard - Set the text for W_Multiboard[W_Int] item in column 2, row 5 to <Empty String>
                          • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 4 to <Empty String>
                          • Multiboard - Set the text for W_Multiboard[W_Int] item in column 3, row 5 to <Empty String>
                        • Else - Actions
          • Custom script: endif

Exit
  • Exit
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
      • Player - Player 2 (Blue) skips a cinematic sequence
      • Player - Player 3 (Teal) skips a cinematic sequence
      • Player - Player 4 (Purple) skips a cinematic sequence
      • Player - Player 5 (Yellow) skips a cinematic sequence
      • Player - Player 6 (Orange) skips a cinematic sequence
      • Player - Player 7 (Green) skips a cinematic sequence
      • Player - Player 8 (Pink) skips a cinematic sequence
      • Player - Player 9 (Gray) skips a cinematic sequence
      • Player - Player 10 (Light Blue) skips a cinematic sequence
      • Player - Player 11 (Dark Green) skips a cinematic sequence
      • Player - Player 12 (Brown) skips a cinematic sequence
    • Conditions
    • Actions
      • -------- These triggers issue an action after selecting your option and pressing right arrow key --------
      • -------- I advice not to touch unless you really know what are you doing --------
      • -------- Don't touch --------
      • Set W_P_Group[2] = (Player group((Owner of W_PetOwner[W_Int])))
      • For each (Integer W_Int) from 1 to W_X, do (Actions)
        • Loop - Actions
          • -------- All these triggers are necessary for the pet system, don't delete anything --------
          • Custom script: if ( GetLocalPlayer() == Player(( udg_W_Int-1)) ) then
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • W_Rolumn[W_Int] Equal to 1
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (W_Pet1[W_Int] is dead) Equal to True
                • Then - Actions
                  • Set W_Pet[W_Int] = W_Pet1[W_Int]
                  • Set W_Point2 = (Position of W_PetOwner[W_Int])
                  • Unit - Kill W_Pet2[W_Int]
                  • Unit - Kill W_Pet3[W_Int]
                  • Hero - Instantly revive W_Pet[W_Int] at W_Point2, Hide revival graphics
                  • Set W_Point = (Position of W_Pet[W_Int])
                  • Unit - Unhide W_Pet[W_Int]
                  • -------- ----------------------- --------
                  • -------- You can chose any kinda of spell effect(Leaks and spells will be removed automaticaly) --------
                  • -------- ----------------------- --------
                  • Special Effect - Create a special effect at W_Point using Abilities\Spells\Other\Charm\CharmTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveLocation(udg_W_Point)
                  • Custom script: call RemoveLocation(udg_W_Point2)
                • Else - Actions
                  • Game - Display to W_P_Group[2] the text: The Pet is already ...
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • W_Rolumn[W_Int] Equal to 2
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (W_Pet2[W_Int] is dead) Equal to True
                    • Then - Actions
                      • Set W_Pet[W_Int] = W_Pet2[W_Int]
                      • Set W_Point2 = (Position of W_PetOwner[W_Int])
                      • Unit - Kill W_Pet1[W_Int]
                      • Unit - Kill W_Pet3[W_Int]
                      • Hero - Instantly revive W_Pet[W_Int] at W_Point2, Hide revival graphics
                      • Set W_Point = (Position of W_Pet[W_Int])
                      • Unit - Unhide W_Pet[W_Int]
                      • -------- ----------------------- --------
                      • -------- You can chose any kinda of spell effect(Leaks and spells will be removed automaticaly) --------
                      • -------- ----------------------- --------
                      • Special Effect - Create a special effect at W_Point using Abilities\Spells\Other\Charm\CharmTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Custom script: call RemoveLocation(udg_W_Point)
                      • Custom script: call RemoveLocation(udg_W_Point2)
                    • Else - Actions
                      • Game - Display to W_P_Group[2] the text: The Pet is already ...
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • W_Rolumn[W_Int] Equal to 3
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (W_Pet3[W_Int] is dead) Equal to True
                        • Then - Actions
                          • Set W_Pet[W_Int] = W_Pet3[W_Int]
                          • Set W_Point2 = (Position of W_PetOwner[W_Int])
                          • Unit - Kill W_Pet1[W_Int]
                          • Unit - Kill W_Pet2[W_Int]
                          • Hero - Instantly revive W_Pet[W_Int] at W_Point2, Hide revival graphics
                          • Set W_Point = (Position of W_Pet[W_Int])
                          • Unit - Unhide W_Pet[W_Int]
                          • -------- ----------------------- --------
                          • -------- You can chose any kinda of spell effect(Leaks and spells will be removed automaticaly) --------
                          • -------- ----------------------- --------
                          • Special Effect - Create a special effect at W_Point using Abilities\Spells\Other\Charm\CharmTarget.mdl
                          • Special Effect - Destroy (Last created special effect)
                          • Custom script: call RemoveLocation(udg_W_Point)
                          • Custom script: call RemoveLocation(udg_W_Point2)
                        • Else - Actions
                          • Game - Display to W_P_Group[2] the text: The Pet is already ...
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • W_Rolumn[W_Int] Equal to 4
                        • Then - Actions
                          • Multiboard - Hide W_Multiboard[W_Int]
                          • Set W_Rolumn[W_Int] = 0
                        • Else - Actions
          • Custom script: call DestroyForce(udg_W_P_Group[2])
          • Custom script: endif
      • -------- Don't touch --------

Pet Setup
  • Pet Gen
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Summon Pet
    • Actions
      • -------- These triggers adds pets to the multi board --------
      • For each (Integer W_Int) from 1 to W_X, do (Actions)
        • Loop - Actions
          • -------- All these triggers are necessary for the pet system, don't delete anything --------
          • Custom script: if ( GetLocalPlayer() == Player(( udg_W_Int-1)) ) then
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • W_Pet1[W_Int] Equal to No unit
            • Then - Actions
              • Set W_PetOwner[W_Int] = (Triggering unit)
              • Set W_Point = (Position of W_PetOwner[W_Int])
              • -------- ----------------------- --------
              • -------- While creating new pets don't forget to change what pet it will spawn --------
              • -------- ----------------------- --------
              • Unit - Create 1 Pet for (Owner of (Triggering unit)) at W_Point facing Default building facing degrees
              • Set W_Pet1[W_Int] = (Last created unit)
              • Unit - Hide W_Pet1[W_Int]
              • Unit - Kill W_Pet1[W_Int]
              • Custom script: call RemoveLocation(udg_W_Point)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • W_Pet2[W_Int] Equal to No unit
                • Then - Actions
                  • Set W_PetOwner[W_Int] = (Triggering unit)
                  • Set W_Point = (Position of W_PetOwner[W_Int])
                  • -------- ----------------------- --------
                  • -------- While creating new pets don't forget to change what pet it will spawn --------
                  • -------- ----------------------- --------
                  • Unit - Create 1 Pet for (Owner of (Triggering unit)) at W_Point facing Default building facing degrees
                  • Set W_Pet2[W_Int] = (Last created unit)
                  • Unit - Hide W_Pet2[W_Int]
                  • Unit - Kill W_Pet2[W_Int]
                  • Custom script: call RemoveLocation(udg_W_Point)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • W_Pet3[W_Int] Equal to No unit
                    • Then - Actions
                      • Set W_PetOwner[W_Int] = (Triggering unit)
                      • Set W_Point = (Position of W_PetOwner[W_Int])
                      • -------- ----------------------- --------
                      • -------- While creating new pets don't forget to change what pet it will spawn --------
                      • -------- ----------------------- --------
                      • Unit - Create 1 Pet for (Owner of (Triggering unit)) at W_Point facing Default building facing degrees
                      • Set W_Pet3[W_Int] = (Last created unit)
                      • Unit - Hide W_Pet3[W_Int]
                      • Unit - Kill W_Pet3[W_Int]
                      • Custom script: call RemoveLocation(udg_W_Point)
                    • Else - Actions
                      • Hero - Create Pet Egg and give it to (Triggering unit)
          • Trigger - Run Update Interface <gen> (checking conditions)
          • Custom script: endif

Pet Fallow
  • Pet Fallow
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • -------- I advice not to touch unless you really know what are you doing --------
      • -------- These triggers make all your pets fallow you if range between <W_PetOwner[*]> and <W_Pet[*]> is bigger then varialbe <W_Range[*]> --------
      • -------- And if you character attacks a unit, pet also will attack --------
      • For each (Integer W_Int) from 1 to W_X, do (Actions)
        • Loop - Actions
          • Custom script: if ( GetLocalPlayer() == Player(( udg_W_Int-1)) ) then
          • Set W_Point = (Position of W_PetOwner[W_Int])
          • Set W_Point2 = (Position of W_Pet[W_Int])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between W_Point and W_Point2) Greater than or equal to W_Range[W_Int]
            • Then - Actions
              • Unit - Order W_Pet[W_Int] to Right-Click W_PetOwner[W_Int]
            • Else - Actions
          • Custom script: call RemoveLocation(udg_W_Point2)
          • Custom script: call RemoveLocation(udg_W_Point)
          • Custom script: endif

Pet Level Up
  • Pet Lvl up
    • Events
      • Unit - A unit Gains a level
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • -------- I advice not to touch unless you really know what are you doing --------
      • -------- These triggers sets variable to pets current level and updates to the multi board --------
      • For each (Integer W_Int) from 1 to W_X, do (Actions)
        • Loop - Actions
          • Custom script: if ( GetLocalPlayer() == Player(( udg_W_Int-1)) ) then
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Triggering unit) Equal to W_Pet[W_Int]
            • Then - Actions
              • Trigger - Run Update Interface <gen> (checking conditions)
            • Else - Actions
          • Custom script: endif

Pet Release
  • Pet Release
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Release Pet
    • Actions
      • For each (Integer W_Int) from 1 to W_X, do (Actions)
        • Loop - Actions
          • Custom script: if ( GetLocalPlayer() == Player(( udg_W_Int-1)) ) then
          • -------- These triggers remove pet and set variables to default after they are were released --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Triggering unit) Equal to W_Pet1[W_Int]
            • Then - Actions
              • Unit - Remove (Triggering unit) from the game
              • Set W_Pet1[W_Int] = No unit
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Triggering unit) Equal to W_Pet2[W_Int]
                • Then - Actions
                  • Unit - Remove (Triggering unit) from the game
                  • Set W_Pet2[W_Int] = No unit
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Triggering unit) Equal to W_Pet3[W_Int]
                    • Then - Actions
                      • Unit - Remove (Triggering unit) from the game
                      • Set W_Pet3[W_Int] = No unit
                    • Else - Actions
          • Trigger - Run Update Interface <gen> (checking conditions)
          • Custom script: endif


Keywords:
pet, system, advanced, multi board, multi, board, multiboard, summon, wohuynia.
Contents

Wohuynia's Pet System v2 (Map)

Reviews
Moderator
12th Dec 2015 IcemanBo: Too long time as NeedsFix. Rejected. 11:30, 31st May 2011 Maker: Leak: Set W_X = (Number of players in (All players controlled by a User player)) Instead of looping through the player indexes, couldn't you use Custom...
  1. 12th Dec 2015
    IcemanBo: Too long time as NeedsFix. Rejected.

    11:30, 31st May 2011
    Maker:
    Leak:
    • Set W_X = (Number of players in (All players controlled by a User player))

    Instead of looping through the player indexes, couldn't you use
    • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
    and utilize player number of triggering player for W_Int.
     
  2. jxtranghero

    jxtranghero

    Joined:
    Dec 13, 2008
    Messages:
    586
    Resources:
    0
    Resources:
    0
    looks nice I should try this...
     
  3. Midnighters

    Midnighters

    Joined:
    Jun 2, 2009
    Messages:
    1,796
    Resources:
    12
    Icons:
    10
    Packs:
    1
    Maps:
    1
    Resources:
    12
    Nice system, but maybe have it follow a bit closer
     
  4. x3GlikE

    x3GlikE

    Joined:
    Jul 7, 2010
    Messages:
    658
    Resources:
    0
    Resources:
    0
    Post triggers!
     
  5. Midnighters

    Midnighters

    Joined:
    Jun 2, 2009
    Messages:
    1,796
    Resources:
    12
    Icons:
    10
    Packs:
    1
    Maps:
    1
    Resources:
    12
    x3 there are like 10 triggers.
     
  6. light bolt30

    light bolt30

    Joined:
    Jan 31, 2009
    Messages:
    1,847
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Well, don't we have hidden tags for that matter?
     
  7. wohuynia

    wohuynia

    Joined:
    Dec 9, 2008
    Messages:
    102
    Resources:
    0
    Resources:
    0
    Now you can set <Range> in "Initialization" trigger.

    Here maybe you'll feel better ;D i have wasted 25mins of my life time just for you.

    You better, else your post would be simple spam.
     
  8. Orcnet

    Orcnet

    Joined:
    Jul 31, 2010
    Messages:
    3,865
    Resources:
    4
    Maps:
    3
    Tutorials:
    1
    Resources:
    4
    this system is wonderful! do you know another version that does not use arrow keys? not a request, just a suggestion
     
  9. baassee

    baassee

    Joined:
    Nov 14, 2008
    Messages:
    3,220
    Resources:
    17
    Spells:
    14
    Tutorials:
    3
    Resources:
    17
    Owner of Triggering Unit -> Triggering Player

    Set a temporary integer variable into the "player number" for quick reference.

    Leak
    • (Position of PetOwner)


    Another leak that is repeated 2 times as the above one.
    • Special Effect - Create a special effect at (Position of Pet[1]) using Abilities\Spells\Other\Charm\CharmTarget.mdl


    Another leak
    • Player group((Owner of PetOwner))


    This system isn't even MPI due to the exit trigger shutting everything down for all the players.

    More leaks
    • Unit - Create 1 Pet_Type[1] for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees


    Change owner into triggering player too

    Why do you set a pet and create a pet and instantly after kill it?

    leak
    • Unit - Create 1 Pet_Type[2] for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
    • Unit - Create 1 Pet_Type[3] for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees


    follow trigger leaks 60 times per second

    • (Distance between (Position of PetOwner) and (Position of Pet[(Integer A)])) Greater than or equal to range


    the idea is kinda good yet it's not leak free and it's not mpi
     
  10. wohuynia

    wohuynia

    Joined:
    Dec 9, 2008
    Messages:
    102
    Resources:
    0
    Resources:
    0
    This system has only one version of it, so no.

    Because i setup booleans that check if other pets are alive, plus if i wouldn't kill it it would cause some bugs also you would be able to summon more then one pet at the time or something.

    I think i fixed it, if not ill take my thinking capsule and go to sleep... Edit.

    Fixed all of them, now it SHOULD NOT leak.
     
  11. baassee

    baassee

    Joined:
    Nov 14, 2008
    Messages:
    3,220
    Resources:
    17
    Spells:
    14
    Tutorials:
    3
    Resources:
    17
    Still in the follow trigger you set a point which you dont use in the distance check

    • (Distance between (Position of PetOwner) and (Position of Pet[(Integer A)])) Greater than or equal to range


    Also you only remove it if the range is greater. The remove custom script line should be behind the whole if, also you need to set another point

    this should have needs fix before being approved
     
  12. Magtheridon96

    Magtheridon96

    Joined:
    Dec 12, 2008
    Messages:
    6,006
    Resources:
    26
    Maps:
    1
    Spells:
    8
    Tutorials:
    7
    JASS:
    10
    Resources:
    26
    Nice System :D
    I'd love to use this in an RPG (you know - when i feel like making one :p)
    You've done a good job with this system
    I vote for APPROVAL and I'll give you a 5/5 :D
     
  13. .VTZ.

    .VTZ.

    Joined:
    Dec 17, 2009
    Messages:
    784
    Resources:
    0
    Resources:
    0
    it works for more than 1 player?
     
  14. baassee

    baassee

    Joined:
    Nov 14, 2008
    Messages:
    3,220
    Resources:
    17
    Spells:
    14
    Tutorials:
    3
    Resources:
    17
    The answer to that is no. And it still leaks.
     
  15. wohuynia

    wohuynia

    Joined:
    Dec 9, 2008
    Messages:
    102
    Resources:
    0
    Resources:
    0
    Sorry for not making any updates today, its women day and my girl friend begs for attention, i found a way how to fix all the leaks and make it MPI, till tomorrow.
     
  16. Magtheridon96

    Magtheridon96

    Joined:
    Dec 12, 2008
    Messages:
    6,006
    Resources:
    26
    Maps:
    1
    Spells:
    8
    Tutorials:
    7
    JASS:
    10
    Resources:
    26
    You're french aren't you ;)
    Women's day in Lebanon also happens to be a very.. how do i put this.. "Politically Active" day :p - Very "Problematic"

    Anyways, i just realized that your system isn't MPI (I looked at the comments below mine :p), and decided to change my rating (orally) to a 4/5 :/ DONT WORRY. I'm not going to change my rating on the hive, it's just a mental note.. -.- :p
     
  17. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    Comments


    Right now: idea is fine, not approvable yet due being not MUI and leakless

    After it becomes MPI and leakless: great, approvable

    After it becomes MUI: EPIC, HR I think...
     
  18. wohuynia

    wohuynia

    Joined:
    Dec 9, 2008
    Messages:
    102
    Resources:
    0
    Resources:
    0
    Ding Ding Ding, your dreams can come through, only for 1.99$ just email me with paypal to "wohuynia@gmail.com" and it will happen...
    On topic: Now its MPI and thanks for the rating ;D

    PS: Not French, Lithuanian, yeah this day gets very active in our country, discounts, commercials, "special for ladies", etc etc etc.

    Thanks for the comment, now it is great ;D

    It is now.

    Fixed it, now it doesn't leak.
     
  19. baassee

    baassee

    Joined:
    Nov 14, 2008
    Messages:
    3,220
    Resources:
    17
    Spells:
    14
    Tutorials:
    3
    Resources:
    17
    Still not MPI as the whole system uses only 1 multiboard which is not possible to do.