Ok 1st thing i need help with i have a idea on how to do it but i need more help. It is when how in dota for however many players there are a certain amount of gold is given to the players so in other words if player 1 and 2 are on ally side and player 6 is on enemy side players 1,2 will get 2000g while player 6 gets 3000g.
Would it look like this
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 1 (Red) slot status) Equal to Is playing
(Player 2 (Blue) slot status) Equal to Is playing
(Player 3 (Teal) slot status) Equal to Is unused
(Player 4 (Purple) slot status) Equal to Is unused
(Player 5 (Yellow) slot status) Equal to Is unused
(Player 6 (Orange) slot status) Equal to Is playing
(Player 7 (Green) slot status) Equal to Is playing
(Player 8 (Pink) slot status) Equal to Is unused
(Player 9 (Gray) slot status) Equal to Is unused
(Player 10 (Light Blue) slot status) Equal to Is unused
Then - Actions
Player - Add 3500 to Player 1 (Red) Current gold
Player - Add 3500 to Player 2 (Blue) Current gold
Player - Add 3500 to Player 6 (Orange) Current gold
Player - Add 3500 to Player 7 (Green) Current gold
Else - Actions
Do nothing
And if it does can you tell me a quicker way on how to do this.
secondly im trying to make custom spells and im having lots of trouble. I dont know any triggers for making custom spells. Ive been on youtube looking at videos and they all are terrible. So i would appreciate if someone had a site or video that explained in detail what is required step by step for making an average custom spell.
Thanks, Cakeface
I need help with a few triggers
Moderator: Cheaters
-
- Forum Staff
- Posts: 506
- Joined: November 17th, 2008, 3:49 pm
Re: I need help with a few triggers
Alright..sorry if this doesnt work..i made it very quickly and dident test it out just tell me the result if ya try it..
You will have to make two variables, one for team 1, and one for team 2. Make them type of Player Group. Then just follow what i did...shouldn't be that hard..of course you will have to work around with the numbers to get them right..i mean the ((Number of Players in Team1) Equal to 1) Im not sure what the correct numbers are..(If they start from 0 or 1). Anyways, i made an example for each team with 1 player (I think) adding 3500 gold..you will just have to copy that and change the numbers and gold for what you want.
Anyways, for your second question..there are quite a few tutorials out there to help with spells... Besides those, just download GUI spells from and look how they are done..reviewing multiple sources and examples will be the key to making the spell ya want.
Code: Select all
Untitled Trigger 010
Events
Time - Elapsed game time is 5.00 seconds
Conditions
Actions
Set Team1 = (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) is an ally of Player 1 (Red)) Equal to True)))
Set Team2 = (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) is an ally of Player 7 (Green)) Equal to True)))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of players in Team1) Equal to 1
Then - Actions
Player Group - Pick every player in Team1 and do (Player - Set (Picked player) Current gold to (((Picked player) Current gold) + 3500))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of players in Team2) Equal to 1
Then - Actions
Player Group - Pick every player in Team2 and do (Player - Set (Picked player) Current gold to (((Picked player) Current gold) + 3500))
Else - Actions
Anyways, for your second question..there are quite a few tutorials out there to help with spells...
Spoiler:
Spoiler:

-
- Forum Staff
- Posts: 506
- Joined: August 5th, 2007, 1:38 pm
- Title: Gui Expert
- Location: *Unknown*
Re: I need help with a few triggers
An easier way would be to just give a constant gold like 500 per player, and if the player on a particular side is not playing, just split the 500 gold up evenly between the remaining players.
-
- Newcomer
- Posts: 3
- Joined: March 7th, 2009, 11:40 pm
Re: I need help with a few triggers
thank you for the help but where is set team1 = in the triggers i dont see it. and is there a way i can copy that text as a trigger and paste it into editor.
and also can u show some of the triggers for spliting gold like arab said.
and also can u show some of the triggers for spliting gold like arab said.
-
- Forum Staff
- Posts: 506
- Joined: November 17th, 2008, 3:49 pm
Re: I need help with a few triggers
Sorry, as its the first time ive made something like this i dont exactly know what he means, he will have to respond later. But for Team1 and such. They are variables. You make them with the variable editor.
Open the trigger editor and click the X button, between Redo and New Category. Or Ctrl+B. That will bring up the editor, from there click the green +X or Ctrl+N. That will make a new variable. Here you pick the name and type. I decided to name mine Team1 and Team2. You can name yours whatever you want, you just need to make two of them. Secondly from the menu you pick the type of Variable. This trigger is concerning player groups, so the variable type should be Player Group.
Now after that, the action you would want to use to get it working is "Set Variable" which is 8th from the top in the list under Do Nothing.
And to copy text from the editor, under where the trigger functions box is (Bottom-right box with event, condition and action), right-click the part you want to copy and select "Copy as Text" then paste on here with the code button (Between Quote and List under the subject name)
Open the trigger editor and click the X button, between Redo and New Category. Or Ctrl+B. That will bring up the editor, from there click the green +X or Ctrl+N. That will make a new variable. Here you pick the name and type. I decided to name mine Team1 and Team2. You can name yours whatever you want, you just need to make two of them. Secondly from the menu you pick the type of Variable. This trigger is concerning player groups, so the variable type should be Player Group.
Now after that, the action you would want to use to get it working is "Set Variable" which is 8th from the top in the list under Do Nothing.
And to copy text from the editor, under where the trigger functions box is (Bottom-right box with event, condition and action), right-click the part you want to copy and select "Copy as Text" then paste on here with the code button (Between Quote and List under the subject name)
Code: Select all
Melee Initialization <--- Right-click on this part, or any specific one you want)
Events
Map initialization
Conditions
Actions
Melee Game - Use melee time of day (for all players)
Melee Game - Limit Heroes to 1 per Hero-type (for all players)
Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
Melee Game - Set starting resources (for all players)
Melee Game - Remove creeps and critters from used start locations (for all players)
Melee Game - Create starting units (for all players)
Melee Game - Run melee AI scripts (for computer players)
Melee Game - Enforce victory/defeat conditions (for all players)

-
- Newcomer
- Posts: 3
- Joined: March 7th, 2009, 11:40 pm
Re: I need help with a few triggers
Ok this is what i got and i tested map no gold tell me if i did anything wrong
Code: Select all
Gold to player
Events
Map initialization
Conditions
Actions
Set team1 = (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) is in (All allies of Player 1 (Red))) Equal to True)))
Set team2 = (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) is in (All allies of Player 6 (Orange))) Equal to True)))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of players in team1) Equal to 1
Then - Actions
Player Group - Pick every player in team1 and do (Player - Set (Picked player) Current gold to 3500)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of players in team2) Equal to 1
Then - Actions
Player Group - Pick every player in team2 and do (Player - Set (Picked player) Current gold to 3500)
Else - Actions
-
- Forum Staff
- Posts: 506
- Joined: November 17th, 2008, 3:49 pm
Re: I need help with a few triggers
Yeah, i noticed that something doesnt quite seem right with your trigger. Its the team part. What you need to do is change this part. This, is implying that its in a player group. What you need to do for this is Boolean Comparison. Then Player - Player Is An Ally of Player. That should fix it.
But, you will also need to do another thing. I noticed that when testing..it doesnt quite work..lol well its a simple fix and it works perfect. First of all..Team 1, and Team 2, i noticed they cant be on the same trigger. So just after finishing the first one, copy it and paste it for team 2. Also you need to add one more simple thing.. You need to, after it gives gold, add the Skip Remaining Actions part..if you make these simple changes, it should work fine! So..for a short example it should turn out like this.. Of course, you will need to copy that for each number of player you want..
Code: Select all
(((Matching player) is in (All allies of Player 1 (Red))) Equal to True)))
But, you will also need to do another thing. I noticed that when testing..it doesnt quite work..lol well its a simple fix and it works perfect. First of all..Team 1, and Team 2, i noticed they cant be on the same trigger. So just after finishing the first one, copy it and paste it for team 2. Also you need to add one more simple thing..
Code: Select all
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of players in Team1) Equal to 1
Then - Actions
Player Group - Pick every player in Team1 and do (Player - Set (Picked player) Current gold to (((Picked player) Current gold) + 3500))
Skip remaining actions
Else - Actions
Code: Select all
Untitled Trigger 010
Events
Time - Elapsed game time is 5.00 seconds
Conditions
Actions
Set Team1 = (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) is an ally of Player 1 (Red)) Equal to True)))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of players in Team1) Equal to 1
Then - Actions
Player Group - Pick every player in Team1 and do (Player - Set (Picked player) Current gold to (((Picked player) Current gold) + 3500))
Skip remaining actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of players in Team1) Equal to 2
Then - Actions
Player Group - Pick every player in Team1 and do (Player - Set (Picked player) Current gold to (((Picked player) Current gold) + 3000))
Skip remaining actions
Else - Actions
