Request GUI Trigger.

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

slynne
Newcomer
Posts: 4
Joined: February 12th, 2007, 9:52 am

Request GUI Trigger.

Post by slynne »

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
User avatar
Totti_8
S.M.B. Creator
Posts: 84
Joined: January 20th, 2007, 11:32 am
Location: Germany

Post by Totti_8 »

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 ;)
slynne
Newcomer
Posts: 4
Joined: February 12th, 2007, 9:52 am

Post by slynne »

Hey thanks for teh help =)

but what do u actually mean...

Aktion:

- Set (Player 1)'s gold to (Entered Chat String, 7, 10)

for the 1st question ?

i cant figure out how do u get the: (Entered Chat String, 7, 10)

thanks xD
User avatar
abraxxas
Junior Member
Posts: 49
Joined: January 17th, 2007, 6:55 pm
Location: N Autriche

Post by abraxxas »

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
Last edited by abraxxas on February 12th, 2007, 11:46 pm, edited 1 time in total.
Image
If God had really intended men to fly, he'd make it easier to get to the airport.

George Winters
User avatar
Dekar
Forum Drunk
Posts: 2899
Joined: January 17th, 2007, 4:22 pm
Has thanked: 1 time
Been thanked: 1 time

Post by Dekar »

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)
no jass needed

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
slynne
Newcomer
Posts: 4
Joined: February 12th, 2007, 9:52 am

Post by slynne »

Hey thanks for teh help again =)

another question =(

about question 2.

how do u do


------------------
Aktion

- [Unit - Kill]
Kill (Unit selected by (player 2))
------------------

i cant find the (unit selected by (player 2)).

cheers xD
User avatar
Dekar
Forum Drunk
Posts: 2899
Joined: January 17th, 2007, 4:22 pm
Has thanked: 1 time
Been thanked: 1 time

Post by Dekar »

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)
i think you cant kill them directly, but you can just pick them first ;)

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
slynne
Newcomer
Posts: 4
Joined: February 12th, 2007, 9:52 am

Post by slynne »

hey this is what i did.
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)
now the a is not workable.

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
User avatar
Totti_8
S.M.B. Creator
Posts: 84
Joined: January 20th, 2007, 11:32 am
Location: Germany

Post by Totti_8 »

slynne wrote:hey this is what i did.
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)
now the a is not workable.

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
the red code is wrong.


It must be like this:
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)
You must correct the red ones. ;)