wc3edit.net https://forum.wc3edit.net/ |
|
Request GUI Trigger. http://forum.wc3edit.net/broken-fulfilled-f74/request-gui-trigger-t134.html |
Page 1 of 1 |
Author: | slynne [ February 12th, 2007, 10:10 am ] |
Post subject: | Request GUI Trigger. |
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 |
Author: | Totti_8 [ February 12th, 2007, 2:18 pm ] |
Post subject: | |
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 |
Author: | slynne [ February 12th, 2007, 4:44 pm ] |
Post subject: | |
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 |
Author: | abraxxas [ February 12th, 2007, 10:38 pm ] |
Post subject: | |
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 |
Author: | Dekar [ February 12th, 2007, 11:18 pm ] |
Post subject: | |
Code: 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 |
Author: | slynne [ February 13th, 2007, 7:40 am ] |
Post subject: | |
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 |
Author: | Dekar [ February 13th, 2007, 8:04 am ] |
Post subject: | |
Code: 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 |
Author: | slynne [ February 13th, 2007, 9:28 am ] |
Post subject: | |
hey this is what i did. Quote: 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 |
Author: | Totti_8 [ February 13th, 2007, 1:42 pm ] |
Post subject: | |
slynne wrote: hey this is what i did. Quote: 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: Quote: 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. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |