Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Useful Survival Systems v. 2.0

Submitted by tjordell
This bundle is marked as substandard. It may contain bugs, not perform optimally or otherwise be in violation of the submission rules.
This system is made specially for survival maps. You can use the system to other stuffs to but anyways if you use or edit the system I would appreciate credits please.

Construct System
When you have enought lumber/stone to create a structure, you can easily go into your backpack and build
the structure you want to, then the building will be built automatically without your unit needing to stand by.
If you don't have enought lumber/stone and trying to build it you will recive a fail message and nothing else will happen.


Iten Pickup System
Picks up items and put them into an invisible backpack that can only contain a specific number of maximum resources. (Stone_MaxCap & Lumber_MaxCap variables)
When your backpack is full, you will not be able to collect more resources and you will recive a fail message.
This system is hard to configure. (I will try to make it easier to configure in another update).


Different ways to show resources
There are three diffrent ways to show the resources. They are as listed below:
1. Use the MPI Multiboard. You can show/hide the multiboard at any time with these following commands.
Show = -showresources or -sr.
Hide = -hideresources or -hr.

2. You can also use the spell "Show Resources" that will calculate the resources you have and show them to you through a In-Game Message.

3. You can use the command "-resources". This command will calculate the resources you have and show them to you through a In-Game Message.

4. When you pick up an resource (Item) there will appear a Floating Text that shows you this: WhatResource: (CurrentResource / MaxCapacity.)


Code
Multiboard Create
  • Multiboard Create
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- Setting up the Colors of all the players from 1 to 12 --------
      • Set Temp_PlayerColors[1] = |c00FF0303
      • Set Temp_PlayerColors[2] = |c000042FF
      • Set Temp_PlayerColors[3] = |c001CE6B9
      • Set Temp_PlayerColors[4] = |c00540081
      • Set Temp_PlayerColors[5] = |c00FFFC01
      • Set Temp_PlayerColors[6] = |c00fEBA0E
      • Set Temp_PlayerColors[7] = |c0020C000
      • Set Temp_PlayerColors[8] = |c00E55BB0
      • Set Temp_PlayerColors[9] = |c00959697
      • Set Temp_PlayerColors[10] = |c007EBFF1
      • Set Temp_PlayerColors[11] = |c00106246
      • Set Temp_PlayerColors[12] = |c004E2A04
      • -------- ------------------------------------------------------------------------------------------ --------
      • -------- Calculates how many players that is playing. (Not Computers) --------
      • Set Temp_PlayerGroup = (All players controlled by a User player)
      • Set Temp_PlayerCount = (Number of players in Temp_PlayerGroup)
      • -------- ------------------------------------------------------------------------------------------ --------
      • -------- Creating and setting up the Multiboard for another view of the Resources --------
      • Multiboard - Create a multiboard with 5 columns and Temp_PlayerCount rows, titled Resources (Multiboa...
      • Set Temp_Multiboard = (Last created multiboard)
      • For each (Integer A) from 1 to Temp_PlayerCount, do (Actions)
        • Loop - Actions
          • Set Temp_RowCount = (Temp_RowCount + 1)
          • Multiboard - Set the width for Temp_Multiboard item in column 1, row Temp_RowCount to 10.00% of the total screen width
          • Multiboard - Set the width for Temp_Multiboard item in column 2, row Temp_RowCount to 3.00% of the total screen width
          • Multiboard - Set the width for Temp_Multiboard item in column 3, row Temp_RowCount to 3.00% of the total screen width
          • Multiboard - Set the width for Temp_Multiboard item in column 4, row Temp_RowCount to 3.00% of the total screen width
          • Multiboard - Set the width for Temp_Multiboard item in column 5, row Temp_RowCount to 3.00% of the total screen width
          • Multiboard - Set the display style for Temp_Multiboard item in column 1, row Temp_RowCount to Show text and Hide icons
          • Multiboard - Set the display style for Temp_Multiboard item in column 3, row Temp_RowCount to Show text and Hide icons
          • Multiboard - Set the display style for Temp_Multiboard item in column 5, row Temp_RowCount to Show text and Hide icons
          • Multiboard - Set the icon for Temp_Multiboard item in column 2, row Temp_RowCount to ReplaceableTextures\CommandButtons\BTNStoneArchitecture.blp
          • Multiboard - Set the icon for Temp_Multiboard item in column 4, row Temp_RowCount to ReplaceableTextures\CommandButtons\BTNHumanLumberUpgrade1.blp
          • Multiboard - Set the text for Temp_Multiboard item in column 3, row Temp_RowCount to (0/ + (String(Stone_MaxCap)))
          • Multiboard - Set the text for Temp_Multiboard item in column 5, row Temp_RowCount to (0/ + (String(Lumber_MaxCap)))
          • Player Group - Pick every player in Temp_PlayerGroup and do (Actions)
            • Loop - Actions
              • Multiboard - Set the text for Temp_Multiboard item in column 1, row (Player number of (Picked player)) to (Temp_PlayerColors[Temp_RowCount] + ((Name of (Picked player)) + |r))
              • Hashtable - Save Handle OfTemp_Multiboard as 3 of (Key (Picked player)) in Temp_Hashtable
      • Multiboard - Show Temp_Multiboard
      • Custom script: call DestroyForce (udg_Temp_PlayerGroup)
      • Set Temp_RowCount = 0
      • -------- ------------------------------------------------------------------------------------------ --------

Multiboard ShowResources
  • Multiboard ShowResources
    • Events
      • Player - Player 1 (Red) types a chat message containing -showresources as An exact match
      • Player - Player 2 (Blue) types a chat message containing -showresources as An exact match
      • Player - Player 3 (Teal) types a chat message containing -showresources as An exact match
      • Player - Player 4 (Purple) types a chat message containing -showresources as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -showresources as An exact match
      • Player - Player 6 (Orange) types a chat message containing -showresources as An exact match
      • Player - Player 7 (Green) types a chat message containing -showresources as An exact match
      • Player - Player 8 (Pink) types a chat message containing -showresources as An exact match
      • Player - Player 9 (Gray) types a chat message containing -showresources as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -showresources as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -showresources as An exact match
      • Player - Player 12 (Brown) types a chat message containing -showresources as An exact match
      • Player - Player 1 (Red) types a chat message containing -sr as An exact match
      • Player - Player 2 (Blue) types a chat message containing -sr as An exact match
      • Player - Player 3 (Teal) types a chat message containing -sr as An exact match
      • Player - Player 4 (Purple) types a chat message containing -sr as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -sr as An exact match
      • Player - Player 6 (Orange) types a chat message containing -sr as An exact match
      • Player - Player 7 (Green) types a chat message containing -sr as An exact match
      • Player - Player 8 (Pink) types a chat message containing -sr as An exact match
      • Player - Player 9 (Gray) types a chat message containing -sr as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -sr as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -sr as An exact match
      • Player - Player 12 (Brown) types a chat message containing -sr as An exact match
    • Conditions
    • Actions
      • -------- Check the Trigger Comment in the top of the Trigger Editor Window! --------
      • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
      • Multiboard - Show (Load 3 of (Key (Triggering player)) in Temp_Hashtable)
      • Custom script: endif

Multiboard HideResources
  • Multiboard HideResources
    • Events
      • Player - Player 1 (Red) types a chat message containing -hideresources as An exact match
      • Player - Player 2 (Blue) types a chat message containing -hideresources as An exact match
      • Player - Player 3 (Teal) types a chat message containing -hideresources as An exact match
      • Player - Player 4 (Purple) types a chat message containing -hideresources as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -hideresources as An exact match
      • Player - Player 6 (Orange) types a chat message containing -hideresources as An exact match
      • Player - Player 7 (Green) types a chat message containing -hideresources as An exact match
      • Player - Player 8 (Pink) types a chat message containing -hideresources as An exact match
      • Player - Player 9 (Gray) types a chat message containing -hideresources as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -hideresources as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -hideresources as An exact match
      • Player - Player 12 (Brown) types a chat message containing -hideresources as An exact match
      • Player - Player 1 (Red) types a chat message containing -hr as An exact match
      • Player - Player 2 (Blue) types a chat message containing -hr as An exact match
      • Player - Player 3 (Teal) types a chat message containing -hr as An exact match
      • Player - Player 4 (Purple) types a chat message containing -hr as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -hr as An exact match
      • Player - Player 6 (Orange) types a chat message containing -hr as An exact match
      • Player - Player 7 (Green) types a chat message containing -hr as An exact match
      • Player - Player 8 (Pink) types a chat message containing -hr as An exact match
      • Player - Player 9 (Gray) types a chat message containing -hr as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -hr as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -hr as An exact match
      • Player - Player 12 (Brown) types a chat message containing -hr as An exact match
    • Conditions
    • Actions
      • -------- Check the Trigger Comment in the top of the Trigger Editor Window! --------
      • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
      • Multiboard - Hide (Load 3 of (Key (Triggering player)) in Temp_Hashtable)
      • Custom script: endif

Item Pickup System
  • Item Pickup System
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set Temp_Player = (Player number of (Owner of (Triggering unit)))
      • Set Temp_Multiboard = (Load 3 of (Key (Owner of (Triggering unit))) in Temp_Hashtable)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Stone
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Stone_Integer[Temp_Player] Equal to Stone_MaxCap
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Triggering unit)
              • Set Temp_PlayerGroup = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
              • Game - Display to Temp_PlayerGroup the text: You don't have enou...
              • Custom script: call DestroyForce (udg_Temp_PlayerGroup)
            • Else - Actions
              • -------- Adds the Item to the Backpack and Removing it from inventory. Also Updating all the views of the Resources Systems. --------
              • Item - Remove (Item being manipulated)
              • Set Stone_Integer[Temp_Player] = (Stone_Integer[Temp_Player] + 1)
              • Hashtable - Save Stone_Integer[Temp_Player] as 0 of (Key (Triggering unit)) in Temp_Hashtable
              • Multiboard - Set the text for Temp_Multiboard item in column 3, row Temp_Player to ((String(Stone_Integer[Temp_Player])) + (/ + (String(Stone_MaxCap))))
              • Set Temp_FT = (Load (Key temp_ft) of (Key (Triggering unit)) in Temp_HashtableIf the label is not found, this function returns NULL.)
              • Floating Text - Destroy Temp_FT
              • Floating Text - Create floating text that reads ((|c00ffff00Stone:|r + (|c0000ff00 + (String(Stone_Integer[Temp_Player])))) + (/ + ((String(Stone_MaxCap)) + |r))) above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
              • Hashtable - Save Handle Of(Last created floating text) as (Key temp_ft) of (Key (Triggering unit)) in Temp_Hashtable
              • -------- ------------------------------------------------------------------------------------------ --------
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to Lumber
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Lumber_Integer[Temp_Player] Equal to Lumber_MaxCap
                • Then - Actions
                  • Hero - Drop (Item being manipulated) from (Triggering unit)
                  • Game - Display to Temp_PlayerGroup the text: You don't have enou...
                  • Set Temp_PlayerGroup = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
                  • Custom script: call DestroyForce (udg_Temp_PlayerGroup)
                • Else - Actions
                  • -------- Adds the Item to the Backpack and Removing it from inventory. Also Updating all the views of the Resources Systems. --------
                  • Item - Remove (Item being manipulated)
                  • Set Lumber_Integer[Temp_Player] = (Lumber_Integer[Temp_Player] + 1)
                  • Hashtable - Save Lumber_Integer[Temp_Player] as 1 of (Key (Triggering unit)) in Temp_Hashtable
                  • Multiboard - Set the text for Temp_Multiboard item in column 5, row Temp_Player to ((String(Lumber_Integer[Temp_Player])) + (/ + (String(Lumber_MaxCap))))
                  • Set Temp_FT = (Load (Key temp_ft) of (Key (Triggering unit)) in Temp_HashtableIf the label is not found, this function returns NULL.)
                  • Floating Text - Destroy Temp_FT
                  • Floating Text - Create floating text that reads ((|c00ffff00Lumber:|r + (|c0000ff00 + (String(Lumber_Integer[Temp_Player])))) + (/ + ((String(Lumber_MaxCap)) + |r))) above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
                  • Hashtable - Save Handle Of(Last created floating text) as (Key temp_ft) of (Key (Triggering unit)) in Temp_Hashtable
                  • -------- ------------------------------------------------------------------------------------------ --------
            • Else - Actions

Construct System
  • Construct System
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set Temp_Player = (Player number of (Owner of (Triggering unit)))
      • Set Temp_Multiboard = (Load 3 of (Key (Owner of (Triggering unit))) in Temp_Hashtable)
      • -------- COPY THE IF/THEN/ELSE BELOW FOR EACH BUILDING AND PASTE IT IN THE ELSE AT THE BOTTOM OF THIS TRIGGER (LOOK FOR THE ###%%% COMMENT) --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Build Camp Fire
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • Stone_Integer[Temp_Player] Less than 2
                  • Lumber_Integer[Temp_Player] Less than 1
            • Then - Actions
              • -------- If the player doesn't have enought resources for the building, the Construct will be Interrupted and a text message will be showed. --------
              • Set Temp_PlayerGroup = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
              • Game - Display to Temp_PlayerGroup the text: You don't have enou...
              • Custom script: call DestroyForce (udg_Temp_PlayerGroup)
              • -------- ------------------------------------------------------------------------------------------ --------
            • Else - Actions
              • -------- If the Player have enought resources the Effect will start. --------
              • -------- The Conditions below checks if the building is the Camp Fire and enought Resources for the Construction. --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Ability being cast) Equal to Build Camp Fire
                  • Stone_Integer[Temp_Player] Greater than or equal to 2
                  • Lumber_Integer[Temp_Player] Greater than or equal to 1
                • Then - Actions
                  • -------- Setting up some variables for the Effect. --------
                  • Set Temp_Loc[1] = (Target point of ability being cast)
                  • Set Temp_Group = (Units within 200.00 of Temp_Loc[1] matching ((Unit-type of (Matching unit)) Not equal to Test Hero))
                  • -------- ------------------------------------------------------------------------------------------ --------
                  • -------- The Condition below checks if the location to build is clear from units. --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Temp_Group is empty) Equal to True
                      • (Terrain pathing at Temp_Loc[1] of type Buildability is off) Equal to False
                    • Then - Actions
                      • -------- Checks if there is any Destructibles nearby. If there are, the building wont be built. --------
                      • Destructible - Pick every destructible within 200.00 of Temp_Loc[1] and do (Actions)
                        • Loop - Actions
                          • Set Temp_Destructibles = (Temp_Destructibles + 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Temp_Destructibles Greater than 0
                        • Then - Actions
                          • -------- If the Location is in use, the player gets a text message. --------
                          • Set Temp_PlayerGroup = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
                          • Game - Display to Temp_PlayerGroup the text: Unable to build str...
                          • Custom script: call DestroyForce (udg_Temp_PlayerGroup)
                          • -------- ------------------------------------------------------------------------------------------ --------
                          • Set Temp_Destructibles = 0
                        • Else - Actions
                          • -------- Creates the Effect. --------
                          • Unit - Create 1 Dummy unit for (Owner of (Triggering unit)) at Temp_Loc[1] facing Default building facing degrees
                          • Unit - Order (Last created unit) to build a Camp Fire at Temp_Loc[1]
                          • Unit - Turn collision for (Constructed structure) Off
                          • Unit - Add a 21.00 second Generic expiration timer to (Last created unit)
                          • Special Effect - Create a special effect at Temp_Loc[1] using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
                          • Special Effect - Destroy (Last created special effect)
                          • -------- ------------------------------------------------------------------------------------------ --------
                          • -------- Updating the Resources and view Systems --------
                          • Set Lumber_Integer[Temp_Player] = (Lumber_Integer[Temp_Player] - 1)
                          • Set Stone_Integer[Temp_Player] = (Stone_Integer[Temp_Player] - 2)
                          • Multiboard - Set the text for Temp_Multiboard item in column 3, row Temp_Player to ((String(Stone_Integer[Temp_Player])) + (/ + (String(Stone_MaxCap))))
                          • Multiboard - Set the text for Temp_Multiboard item in column 5, row Temp_Player to ((String(Lumber_Integer[Temp_Player])) + (/ + (String(Lumber_MaxCap))))
                          • Hashtable - Save Lumber_Integer[Temp_Player] as 1 of (Key (Triggering unit)) in Temp_Hashtable
                          • Hashtable - Save Stone_Integer[Temp_Player] as 0 of (Key (Triggering unit)) in Temp_Hashtable
                          • -------- ------------------------------------------------------------------------------------------ --------
                          • -------- Cleares the trigger from leaks and other stuffs. --------
                          • Unit - Turn collision for (Constructed structure) On
                          • Custom script: call RemoveLocation (udg_Temp_Loc[1])
                          • Custom script: call RemoveLocation (udg_Temp_Loc[3])
                          • -------- ------------------------------------------------------------------------------------------ --------
                    • Else - Actions
                      • -------- If the Location is in use, the player gets a text message. --------
                      • Set Temp_PlayerGroup = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
                      • Game - Display to Temp_PlayerGroup the text: Unable to build str...
                      • Custom script: call DestroyForce (udg_Temp_PlayerGroup)
                      • -------- ------------------------------------------------------------------------------------------ --------
                  • Custom script: call DestroyGroup (udg_Temp_Group)
                • Else - Actions
        • Else - Actions
          • -------- ###%%% --------
          • -------- This above is for the structure Camp Fire. --------
          • -------- There is just to load in more and more for each building or you can create one trigger for each building. --------
          • -------- ##!•••OBSERVE•••## Remember to store all locations into the Temp_Loc variable and remove them, just as in the actions above. --------

Resources System
  • Resources System
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Show Resources
    • Actions
      • -------- If the Player cast the Show Resources Ability, he will get text messages with information about the Resources. --------
      • Set Temp_PlayerGroup = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
      • Game - Display to Temp_PlayerGroup the text: (You currently have : |c0000ff00 + ((String((Load 0 of (Key (Triggering unit)) from Temp_Hashtable))) + (/ + ((String(Stone_MaxCap)) + |r |c00ffff00Stone(s)|r))))
      • Game - Display to Temp_PlayerGroup the text: (You currently have : |c0000ff00 + ((String((Load 1 of (Key (Triggering unit)) from Temp_Hashtable))) + (/ + ((String(Lumber_MaxCap)) + |r |c00ffff00Lumber(s)|r))))
      • Custom script: call DestroyForce (udg_Temp_PlayerGroup)
      • -------- ------------------------------------------------------------------------------------------ --------

Killing System
  • Killing System
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Test Hero
    • Actions
      • -------- Setting up some important Variables --------
      • Set Temp_Player = (Player number of (Owner of (Triggering unit)))
      • Set Temp_Multiboard = (Load 3 of (Key (Owner of (Triggering unit))) in Temp_Hashtable)
      • Set Temp_Loc[2] = (Position of (Triggering unit))
      • -------- ------------------------------------------------------------------------------------------ --------
      • For each (Integer A) from 1 to Lumber_Integer[Temp_Player], do (Actions)
        • Loop - Actions
          • -------- Places the items on the ground when the unit dies --------
          • Item - Create Lumber at Temp_Loc[2]
          • Item - Change ownership of (Last created item) to (Owner of (Triggering unit)) and Change color
      • For each (Integer A) from 1 to Stone_Integer[Temp_Player], do (Actions)
        • Loop - Actions
          • Item - Create Stone at Temp_Loc[2]
          • Item - Change ownership of (Last created item) to (Owner of (Triggering unit)) and Change color
      • -------- Clearing leaks, Updating Resources variables and Updates the view Resources Systems and also displaying a text message for the player. --------
      • -------- ------------------------------------------------------------------------------------------ --------
      • Custom script: call RemoveLocation (udg_Temp_Loc[2])
      • Set Lumber_Integer[Temp_Player] = 0
      • Set Stone_Integer[Temp_Player] = 0
      • Multiboard - Set the text for Temp_Multiboard item in column 3, row Temp_Player to ((String(Stone_Integer[Temp_Player])) + (/ + (String(Stone_MaxCap))))
      • Multiboard - Set the text for Temp_Multiboard item in column 5, row Temp_Player to ((String(Lumber_Integer[Temp_Player])) + (/ + (String(Lumber_MaxCap))))
      • Hashtable - Save Lumber_Integer[Temp_Player] as 1 of (Key (Triggering unit)) in Temp_Hashtable
      • Hashtable - Save Stone_Integer[Temp_Player] as 0 of (Key (Triggering unit)) in Temp_Hashtable
      • Set Temp_PlayerGroup = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
      • Game - Display to Temp_PlayerGroup the text: Oh no! You've dropp...
      • Custom script: call DestroyForce (udg_Temp_PlayerGroup)
      • -------- ------------------------------------------------------------------------------------------ --------

Command Resources System
  • Command Resources System
    • Events
      • Player - Player 1 (Red) types a chat message containing -resources as An exact match
      • Player - Player 2 (Blue) types a chat message containing -resources as An exact match
      • Player - Player 3 (Teal) types a chat message containing -resources as An exact match
      • Player - Player 4 (Purple) types a chat message containing -resources as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -resources as An exact match
      • Player - Player 6 (Orange) types a chat message containing -resources as An exact match
      • Player - Player 7 (Green) types a chat message containing -resources as An exact match
      • Player - Player 8 (Pink) types a chat message containing -resources as An exact match
      • Player - Player 9 (Gray) types a chat message containing -resources as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -resources as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -resources as An exact match
      • Player - Player 12 (Brown) types a chat message containing -resources as An exact match
    • Conditions
    • Actions
      • -------- When the player writes -resources, the player will get a text message that tells him how much Resources of any kind he have. --------
      • Set Temp_PlayerGroup = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
      • Set Command_Group = (Units in (Playable map area))
      • Unit Group - Pick every unit in Command_Group and do (Actions)
        • Loop - Actions
          • Game - Display to Temp_PlayerGroup the text: (You currently have : |c0000ff00 + ((String((Load 0 of (Key (Picked unit)) from Temp_Hashtable))) + /10|r |c00ffff00Stone(s)|r))
          • Game - Display to Temp_PlayerGroup the text: (You currently have : |c0000ff00 + ((String((Load 1 of (Key (Picked unit)) from Temp_Hashtable))) + /10|r |c00ffff00Lumber(s)|r))
      • Custom script: call DestroyForce (udg_Temp_PlayerGroup)
      • Custom script: call DestroyGroup (udg_Command_Group)
      • -------- ------------------------------------------------------------------------------------------ --------



Made by: tjordell
Idea by: tjordell
Helpers: ----

Changelog
v. 2.0 - [When picking up items, the previous floating text now gets destroyed before creating a new one. Thanks to Aspard for suggestion] - [Removed the unneccesary "set bj_wantDestroyGroup = true" from the Multiboard Create trigger.]

v. 1.9 - [Swapped places on some Actions for more flexibility] - [Added Walkthrough's in the Comments Triggers] - [Removed unneccesary Leak Prevention]

v. 1.8 - [Removed some Player Group leaks] - [Added a JASS code to increase the MPI Multiboard System]

v. 1.7 - [Fixed mayor bugs with Construct System. (This should now work 100%)] - [Added an MPI Multiboard] - [Added Stone & Lumber Max Capacity variables for easier customizing.] - [Fixed Hashtable leak]

v. 1.5 - [Added another viewing of the Resources System (Multiboard)] - [Added some Commands] - [Also, for the Multiboard, added 2 Commands (-showresources/-sr & -hideresources/-hr) that shows/hides the Multiboard] - [Changed name from Construct System to Useful Survival System]

v. 1.4 - [Fixed mayor bug reported by aspard] - [Added new system (Command Resources System (Another way than the ability to show you how much resources you have, reported by aspard))] - [Change title of Quest log to Commands (Now you can see the commands in the Commands log if you've cleared the window from the commands info text message)]

v. 1.3 - [Added one new trigger (Killing Trigger (Drops all items in backpack on death))] - [Added 2 new Commands. (-kill & -revive (Use it to check the new trigger))] - [Fixed some actions in most of the triggers.(Using Hashtables)]

v. 1.2 - [Fixed the spells, reported by Kingz (It looks nicer now)] - [Changed name from Construct & Backpack System to Construct System] - [Added a new Command. (-clear)]

v. 1.1 - [Fixed an Integer Variable. Reported by baassee]

v. 1.0 - [Uploaded!]


Keywords:
system, construct, build, structure, backpack, item, items, tjordell, svenskunganka
Contents

Useful Survival Systems (Map)

Reviews
Moderator
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 15:23, 20 Oct, 2012 Magtheridon96: There's some room for improvement: - You can cache things like (Triggering unit) and (Owner of (Triggering unit)) instead of repeating them more than...
  1. 12th Dec 2015
    IcemanBo: Too long as NeedsFix. Rejected.

    15:23, 20 Oct, 2012
    Magtheridon96:

    There's some room for improvement:
    - You can cache things like (Triggering unit) and (Owner of (Triggering unit)) instead of repeating them more than once because function calls in this game are pretty slow :/
    - Instead of having like 12 events for each trigger involved in commands, you can iterate from 1 to 12 on map initialization and add the events to the triggers yourself.
    This way, you avoid generating 12 lines of code for event registration for each trigger, but instead, just 6-8 for all the command triggers combined :D
    - If a dummy unit (or any other unit that must have it's death-type set to "Can't raise, does not decay") is given an expiration timer, the unit will not be totally removed from the game, so you're going to have to add one extra trigger that runs upon unit-death. This trigger would check if the type of the unit is equal to the dummy-type that you're using here, and then it would remove it from the game.
     
  2. Aspard

    Aspard

    Joined:
    Jul 2, 2008
    Messages:
    595
    Resources:
    1
    Spells:
    1
    Resources:
    1
    12/10? :) Inventory flooded then?
    Give me an appropriate example, where this can be used instead of another bag system and I won't vote for rejection.
     
  3. baassee

    baassee

    Joined:
    Nov 14, 2008
    Messages:
    3,220
    Resources:
    17
    Spells:
    14
    Tutorials:
    3
    Resources:
    17
    Gosh Aspard is back! :)

    On topic

    Store the plyer number as a temp integer and use it in the array to increase effienecty drfhdfhdj
     
  4. tjordell

    tjordell

    Joined:
    Jan 25, 2009
    Messages:
    554
    Resources:
    5
    Icons:
    1
    Spells:
    4
    Resources:
    5
    In example, survivals. I will update the spell as much as i can and work with it really often =)
     
  5. Aspard

    Aspard

    Joined:
    Jul 2, 2008
    Messages:
    595
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Ha-ha! Fear of me, mortals!

    Cool word, for what does it stand for? :)

    I pretty understand in which kind of map I can use this system. The question was: Why should I prefer this to another? Especially with possibility to pick up 12/10 units and not MUI?
     
  6. tjordell

    tjordell

    Joined:
    Jan 25, 2009
    Messages:
    554
    Resources:
    5
    Icons:
    1
    Spells:
    4
    Resources:
    5
    Yes ofc =)
     
  7. baassee

    baassee

    Joined:
    Nov 14, 2008
    Messages:
    3,220
    Resources:
    17
    Spells:
    14
    Tutorials:
    3
    Resources:
    17
    well as I couldnt spell the word infront of it, I lacked of patience and hit some random keys. Call it rage if you want, I wouldn't disagree :)
     
  8. MortAr

    MortAr

    Joined:
    Feb 25, 2009
    Messages:
    1,765
    Resources:
    7
    Icons:
    6
    Packs:
    1
    Resources:
    7
    Back.. wait what?
    You made a system that has been already invented into the game.. ?

    And, what if my lumbers or stones becomes greater than 100 ? You can't track the levels of the ability after that, 'cause the maximum possible level-value is 100 .. ?

    Unefficient and I don't see how this is going to be used by anyone, since its clearly useless.. (or at least for me)

    Also, the way you construct the structures is awful, I mean I would need a thousands of ITE functions to make like 10 buildings to be built with this "system" ..
     
  9. tjordell

    tjordell

    Joined:
    Jan 25, 2009
    Messages:
    554
    Resources:
    5
    Icons:
    1
    Spells:
    4
    Resources:
    5
    :angry: Wtf? It's not only a backpack system.
    I did this system most for peoples that are creating Survival maps. It's useful in that kind of maps.

    MortAr :thumbs_down: Everyone have rights to upload a system here if it follows the rules.

    I did a combo. To show the downloaders!:hohum:
     
    Last edited by a moderator: Feb 23, 2010
  10. Aspard

    Aspard

    Joined:
    Jul 2, 2008
    Messages:
    595
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Great, here is your personal "Meter of Rage":
    [||||||||]

    Be patient, dude! You are running out of petience! Do you want to get negrepped and become "Evil servant"? :D I saw one today looking through Contest Depositery. He had about -50 rep and 4 red gems :D And it was written "*** decided to join the evil force" ))
     
  11. tjordell

    tjordell

    Joined:
    Jan 25, 2009
    Messages:
    554
    Resources:
    5
    Icons:
    1
    Spells:
    4
    Resources:
    5
    So? That will not cause any lag or crashes? And as it seems that you don't know is that there are people who like to make STABLE maps. With that i mean that the highest cap of lumber/stone is 10 or a bit more. Stable maps are much fun than maps like "EPIC MEGA LVL 99999999 HUGE MAP!".
     
  12. MortAr

    MortAr

    Joined:
    Feb 25, 2009
    Messages:
    1,765
    Resources:
    7
    Icons:
    6
    Packs:
    1
    Resources:
    7
    Whatever. Im leaving it to the mods.
     
  13. tjordell

    tjordell

    Joined:
    Jan 25, 2009
    Messages:
    554
    Resources:
    5
    Icons:
    1
    Spells:
    4
    Resources:
    5
  14. Aspard

    Aspard

    Joined:
    Jul 2, 2008
    Messages:
    595
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Explain me then, when I collect all this stuff quickly I reach the number of 12/10 lumber and stone. Is that possible, how do you think? :) And! When I try to collect more - they spam my six inventory slots. Let's look - overall there 18/10 lumber or stone. Are you still sure your system isn't buggy?
     
  15. Kingz

    Kingz

    Joined:
    Jun 5, 2008
    Messages:
    2,470
    Resources:
    6
    Spells:
    5
    Tutorials:
    1
    Resources:
    6
    Hmm, shouldn't you be able to save any number you wish in a hashtable instead of using ability levels?

    Just an opinion.

    EDIT:

    I suggest you to not show the resources as you do them now.
    You should just make the ability you activate show the resource number tied to that ability.

    Also this is good if you want to implement custom resources i guess.
     
  16. tjordell

    tjordell

    Joined:
    Jan 25, 2009
    Messages:
    554
    Resources:
    5
    Icons:
    1
    Spells:
    4
    Resources:
    5
    Thanks Kingz. I'll do that. +rep and credits for you'r suggests =)
     
  17. tjordell

    tjordell

    Joined:
    Jan 25, 2009
    Messages:
    554
    Resources:
    5
    Icons:
    1
    Spells:
    4
    Resources:
    5
    bump

    Info for bumping: Have updated my system.

    EDIT: Added this above =)
     
  18. Aspard

    Aspard

    Joined:
    Jul 2, 2008
    Messages:
    595
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Ehem... You are violating two HW rules:

    Thread Bumping
    Thread Bumping

    Hive Workshop users are permitted to bump their own threads.
    Threads bumps must include new details and / or information, not just simply a word or vague comment.
    Threads cannot be bumped within 48 hours of the most recent post.
    Posts that violate these rules may be deleted by moderators without warning.
    Threads that consistently violate these rules may be closed after the author has been warned.


    Double Posting
    Please do not double post in threads or make two of the same thread. We have an edit button for a reason, if you accidently double posted/threaded, please delete it before we do.


    Not an offence, but, please, read rules ^^
     
  19. tjordell

    tjordell

    Joined:
    Jan 25, 2009
    Messages:
    554
    Resources:
    5
    Icons:
    1
    Spells:
    4
    Resources:
    5
    Sorry =) Whon't repeat that =)