Guys, I need to make a GUI trigger as follows. I tried for hrs but still cant get it right so i guess if someone here knows how, please teach me.
Random Gold
Player 1 types this command "-gold xxxx" where "xxxx" equals to any number the player type and set the gold with respect to the number.
Eg. I type "-gold 1000" and my gold sets to 1000.
Any suggestion as to how to do this trigger?
Trigger a unit that is being clicked
Player 2 select a footmen in the game and type "-kill" and the footmen that is being selected is killed.
Eg. I selects my townhall and type "-destroy" and the townhall is destroyed immediately.
Any suggestion as to how to do this trigger?
Place objects on the mouse.
This trigger may not be possible to do with my experience.
Player 3 move his mouse to a place on the game and he types "-plant a b" where a = the name of object, b = how many of that object and the number of the obect said is place on where the mouse is.
Any suggestion as to how to do this trigger?
Please help me if you know how to do it. thanks!
Any help is greatly appreciated.
xD
Request GUI Trigger.
Moderator: Cheaters
-
- S.M.B. Creator
- Posts: 84
- Joined: January 20th, 2007, 11:32 am
- Location: Germany
At the first Question:
Event:
- (Player 1) types a chat message containing "-gold" as Substring
Condition:
[you said nothing...]
Aktion:
- Set (Player 1)'s gold to (Entered Chat String, 7, 10)
At the second Question:
Event:
(Player 2) types a chat message containing "-kill" as Exactly Accord
Condition
[No Conditions...]
Aktion
- [Unit - Kill]
Kill (Unit selected by (player 2))
At the third Question:
You cannot trigger this. You can only do this with a Unit that is at the Postion but not with the mouse because the Game doesn't "say" where the Mouse of any player is...
So if its no Problem for you i can do this with a unit position...
I hope that this helps you
Event:
- (Player 1) types a chat message containing "-gold" as Substring
Condition:
[you said nothing...]
Aktion:
- Set (Player 1)'s gold to (Entered Chat String, 7, 10)
At the second Question:
Event:
(Player 2) types a chat message containing "-kill" as Exactly Accord
Condition
[No Conditions...]
Aktion
- [Unit - Kill]
Kill (Unit selected by (player 2))
At the third Question:
You cannot trigger this. You can only do this with a Unit that is at the Postion but not with the mouse because the Game doesn't "say" where the Mouse of any player is...
So if its no Problem for you i can do this with a unit position...
I hope that this helps you
-
- Newcomer
- Posts: 4
- Joined: February 12th, 2007, 9:52 am
-
- Junior Member
- Posts: 49
- Joined: January 17th, 2007, 6:55 pm
- Location: N Autriche
im not totally sure but i think you have to do it with jass....
edit* sry my mistake.. havent mapped and triggerd for some time
edit* sry my mistake.. havent mapped and triggerd for some time
Last edited by abraxxas on February 12th, 2007, 11:46 pm, edited 1 time in total.
If God had really intended men to fly, he'd make it easier to get to the airport.
George Winters
-
- Forum Drunk
- Posts: 2899
- Joined: January 17th, 2007, 4:22 pm
- Has thanked: 1 time
- Been thanked: 1 time
Code: Select all
If ((Substring((Entered chat string), 1, 5)) Equal to -gold) then do
(Player - Add (Integer((Substring((Entered chat string), 6, 20)))) to
(Triggering player) Current gold) else do (Do nothing)
greets Dekar
Don't pm me with Warcraft questions, this is a forum so just make a post!
In the world of thinking we are all immigrants. -Robert Nozick
-
- Newcomer
- Posts: 4
- Joined: February 12th, 2007, 9:52 am
-
- Forum Drunk
- Posts: 2899
- Joined: January 17th, 2007, 4:22 pm
- Has thanked: 1 time
- Been thanked: 1 time
Code: Select all
If ((Substring((Entered chat string), 1, 5)) Equal to -kill) then do
(Unit Group - Pick every unit in (Units currently selected by Player 2 (Blue))
and do (Unit - Kill (Picked unit))) else do (Do nothing)
greets Dekar
Don't pm me with Warcraft questions, this is a forum so just make a post!
In the world of thinking we are all immigrants. -Robert Nozick
-
- Newcomer
- Posts: 4
- Joined: February 12th, 2007, 9:52 am
hey this is what i did.
why is this so ? without the others sub-trigger i did in there, a is workable. but after i add in all the other sub-triggers, it dosnt work anymore. any ideas ?
thanks xD
now the a is not workable.Trigger1
Events
Player - Player 1 (Red) types a chat message containing infoz as An exact match
Player - Player 1 (Red) types a chat message containing a as A substring
Player - Player 1 (Red) types a chat message containing b as An exact match
Player - Player 1 (Red) types a chat message containing c as An exact match
Player - Player 1 (Red) types a chat message containing d as An exact match
Player - Player 1 (Red) types a chat message containing e as An exact match
Player - Player 1 (Red) types a chat message containing f as An exact match
Player - Player 1 (Red) types a chat message containing g as An exact match
Conditions
[Nothing]
Actions
If ((Substring((Entered chat string), 1, 5)) Equal to infoz) then do (Game - Display to (All players controlled by a ((Triggering player) controller) player) for 30.00 seconds the text: blablabla) else do (Do nothing)
If ((Substring((Entered chat string), 1, 5)) Equal to a) then do (Player - Set (Triggering player) Current gold to (Integer((Substring((Entered chat string), 1, 5))))) else do (Do nothing)
If ((Substring((Entered chat string), 6, 20)) Equal to b ) then do (Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Unit - Kill (Picked unit))) else do (Do nothing)
If ((Substring((Entered chat string), 1, 5)) Equal to c ) then do (Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Unit - Reset ability cooldowns for (Picked unit))) else do (Do nothing)
If ((Substring((Entered chat string), 1, 5)) Equal to d ) then do (Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Unit - Change ownership of (Picked unit) to (Triggering player) and Change color)) else do (Do nothing)
If ((Substring((Entered chat string), 1, 5)) Equal to e ) then do (Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Unit - Make (Picked unit) Invulnerable)) else do (Do nothing)
If ((Substring((Entered chat string), 1, 5)) Equal to f ) then do (Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Unit - Make (Picked unit) Vulnerable)) else do (Do nothing)
If ((Substring((Entered chat string), 1, 5)) Equal to g ) then do (Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Unit - Create 1 (Unit-type of (Picked unit)) for (Triggering player) at (Position of (Picked unit)) facing 0.00 degrees)) else do (Do nothing)
why is this so ? without the others sub-trigger i did in there, a is workable. but after i add in all the other sub-triggers, it dosnt work anymore. any ideas ?
thanks xD
-
- S.M.B. Creator
- Posts: 84
- Joined: January 20th, 2007, 11:32 am
- Location: Germany
the red code is wrong.slynne wrote:hey this is what i did.
now the a is not workable.Trigger1
Events
Player - Player 1 (Red) types a chat message containing infoz as An exact match
Player - Player 1 (Red) types a chat message containing a as A substring
Player - Player 1 (Red) types a chat message containing b as An exact match
Player - Player 1 (Red) types a chat message containing c as An exact match
Player - Player 1 (Red) types a chat message containing d as An exact match
Player - Player 1 (Red) types a chat message containing e as An exact match
Player - Player 1 (Red) types a chat message containing f as An exact match
Player - Player 1 (Red) types a chat message containing g as An exact match
Conditions
[Nothing]
Actions
If ((Substring((Entered chat string), 1, 5)) Equal to infoz) then do (Game - Display to (All players controlled by a ((Triggering player) controller) player) for 30.00 seconds the text: blablabla) else do (Do nothing)
If ((Substring((Entered chat string), 1, 5)) Equal to a) then do (Player - Set (Triggering player) Current gold to (Integer((Substring((Entered chat string), 1, 5))))) else do (Do nothing)
If ((Substring((Entered chat string), 6, 20)) Equal to b ) then do (Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Unit - Kill (Picked unit))) else do (Do nothing)
If ((Substring((Entered chat string), 1, 5)) Equal to c ) then do (Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Unit - Reset ability cooldowns for (Picked unit))) else do (Do nothing)
If ((Substring((Entered chat string), 1, 5)) Equal to d ) then do (Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Unit - Change ownership of (Picked unit) to (Triggering player) and Change color)) else do (Do nothing)
If ((Substring((Entered chat string), 1, 5)) Equal to e ) then do (Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Unit - Make (Picked unit) Invulnerable)) else do (Do nothing)
If ((Substring((Entered chat string), 1, 5)) Equal to f ) then do (Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Unit - Make (Picked unit) Vulnerable)) else do (Do nothing)
If ((Substring((Entered chat string), 1, 5)) Equal to g ) then do (Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Unit - Create 1 (Unit-type of (Picked unit)) for (Triggering player) at (Position of (Picked unit)) facing 0.00 degrees)) else do (Do nothing)
why is this so ? without the others sub-trigger i did in there, a is workable. but after i add in all the other sub-triggers, it dosnt work anymore. any ideas ?
thanks xD
It must be like this:
You must correct the red ones.If ((Substring((Entered chat string), 1, 1)) Equal to a) then do (Player - Set (Triggering player) Current gold to (Integer((Substring((Entered chat string), 3, 10))))) else do (Do nothing)