Weegee
Go Weegee!
- Reaction score
- 102
Hi there . Have you ever wondered how extreme candy wars (if you have ever played it) or how when you double select a unit you get the unit? Well I am going to show you a noob way to make it. Now lets start and don't get lost :thup:
Variables:
You need an Integer array set to 12 (were gonna call it Has_Picked_Integer_Player), A boolean array (were gonna call that Has_Picked), And were going to be using a point variable (called TempPoint)
Ok Now I will walk through with you step by step...
Trigger
These are my events. You can add more but since this is just a demo I will only have 2
Now you may be wondering but we never set that variable to anything. We will set it later but for now this is used to check if the variable is false and if the player has not already picked a character.
The first green text is setting the TempPoint Variable to the center of the map (for your map just set it where ever you want). The second green text sets the variable to the current value of the variable +1. This is needed for the game to check if you have selected twice and the array is needed to make things easier for the game to refer to and making it MUI (or so I think ).
The red text does a couple of things. First it checks if the integer array we had set before is at 2 yet. If it is then it checks if the selected unit is a hero and is owned by the player neutral passive. We check if the units a hero so it can only be a hero and we check if the owner is Neutral Passive (you can change this if you have an AoS map that uses team colors) because our units have to be Neutral Passive so we cant select our allies hero
The orange text start the whole process and creates the selected hero at TempPoint, pans the camera to the TempPoint, selects the last created unit, and removes the selected unit so no one can have 2 of the same hero (you can change this if you want)
The purple text then sets the variable Has_Picked to true so you cant keep creating heroes and you set the Has_Picked_Integer_Player variable to 0 (which you don't need to do but I did anyway )
Don't forget to also add custom script with this code "call RemoveLocation (udg_TempPoint)" (without quotes). If the name of the variable is different then change TempPoint to the name of your variable
Here are my pictures of my system in action...
Thank you to Flare for improving my system. If you have any questions just post them and I will help you. Enjoy =D
Edit: can I get a mod to remove my old Double Click System Map?
Variables:
You need an Integer array set to 12 (were gonna call it Has_Picked_Integer_Player), A boolean array (were gonna call that Has_Picked), And were going to be using a point variable (called TempPoint)
Ok Now I will walk through with you step by step...
Trigger
Code:
Events
Player - Player 1 (Red) Selects a unit
Player - Player 2 (Blue) Selects a unit
These are my events. You can add more but since this is just a demo I will only have 2
Code:
Conditions
Has_Picked[(Player number of (Triggering player))] Equal to False
Now you may be wondering but we never set that variable to anything. We will set it later but for now this is used to check if the variable is false and if the player has not already picked a character.
Code:
Actions
[COLOR="Green"]Set TempPointCenter = (Center of (Playable map area))
Set Has_Picked_Integer_Player_1[(Player number of (Triggering player))] = (Has_Picked_Integer_Player_1[(Player number of (Triggering player))] + 1)[/COLOR]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
Has_Picked_Integer_Player_1[(Player number of (Triggering player))] Equal to 2
((Triggering unit) is A Hero) Equal to True
(Owner of (Triggering unit)) Equal to Neutral Passive
[COLOR="Red"] Has_Picked_Integer_Player_1[(Player number of (Triggering player))] Equal to 2
((Triggering unit) is A Hero) Equal to True
(Owner of (Triggering unit)) Equal to Neutral Passive[/COLOR]
Then - Actions
[COLOR="DarkOrange"]Unit - Create 1 (Unit-type of (Triggering unit)) for (Triggering player) at TempPointCenter facing Default building facing degrees
Camera - Pan camera for (Triggering player) to TempPointCenter over 0.00 seconds
Selection - Select (Last created unit) for (Triggering player)
Unit - Remove (Triggering unit) from the game[/COLOR]
[COLOR="Purple"]Set Has_Picked[(Player number of (Triggering player))] = True
Set Has_Picked_Integer_Player_1[(Player number of (Triggering player))] = 0[/COLOR]
Else - Actions
The first green text is setting the TempPoint Variable to the center of the map (for your map just set it where ever you want). The second green text sets the variable to the current value of the variable +1. This is needed for the game to check if you have selected twice and the array is needed to make things easier for the game to refer to and making it MUI (or so I think ).
The red text does a couple of things. First it checks if the integer array we had set before is at 2 yet. If it is then it checks if the selected unit is a hero and is owned by the player neutral passive. We check if the units a hero so it can only be a hero and we check if the owner is Neutral Passive (you can change this if you have an AoS map that uses team colors) because our units have to be Neutral Passive so we cant select our allies hero
The orange text start the whole process and creates the selected hero at TempPoint, pans the camera to the TempPoint, selects the last created unit, and removes the selected unit so no one can have 2 of the same hero (you can change this if you want)
The purple text then sets the variable Has_Picked to true so you cant keep creating heroes and you set the Has_Picked_Integer_Player variable to 0 (which you don't need to do but I did anyway )
Don't forget to also add custom script with this code "call RemoveLocation (udg_TempPoint)" (without quotes). If the name of the variable is different then change TempPoint to the name of your variable
Here are my pictures of my system in action...
Thank you to Flare for improving my system. If you have any questions just post them and I will help you. Enjoy =D
Edit: can I get a mod to remove my old Double Click System Map?