Seannny
Why GUI when you can Jass?
- Reaction score
- 46
Ive looked all over this trigger, so has my friend and we cant seem to find the problem.
What its supposed to do is create a dialog box for the player who typed -new. Originally i had all players in one trigger. But it only worked for player one for some reason. Now i seperated them all into their own triggers, but it still only works for player one. Its not so much what comes after the dialog thats the problem, but actually having it show.
Blue, teal and purple are identical, except for the arrays on the variables. (same as player number)
My second problem is a problem with a spell, Pickpocket. i dont even know whats wrong with it. How it SHOULD work, is a spell that works only from behind, your agility x 2 needs to be greater than a random roll between 1 and 50. if it is, its a success, if not, its a failure. However the units never seem to be behind the the target, no matter what.
BUT
Sometimes its still a success... never in front, but sometimes from the back it works. if i just spam the spell, 2 out of 10 times it works. others say "Must be behind target!"
+rep if you can crack it!
What its supposed to do is create a dialog box for the player who typed -new. Originally i had all players in one trigger. But it only worked for player one for some reason. Now i seperated them all into their own triggers, but it still only works for player one. Its not so much what comes after the dialog thats the problem, but actually having it show.
Blue, teal and purple are identical, except for the arrays on the variables. (same as player number)
Code:
Race Pick Copy 2
Events
Player - Player 2 (Blue) types a chat message containing -new as An exact match
Conditions
Actions
Dialog - Clear Dialog[2]
Dialog - Change the title of Dialog[2] to Races
Dialog - Create a dialog button for Dialog[2] labelled Nord
Set DBNord[2] = (Last created dialog Button)
Dialog - Create a dialog button for Dialog[2] labelled Imperial
Set DBImperial[2] = (Last created dialog Button)
Dialog - Create a dialog button for Dialog[2] labelled Redgaurd
Set DBRedgaurd[2] = (Last created dialog Button)
Dialog - Create a dialog button for Dialog[2] labelled Dark Elf
Set DBDarkElf[2] = (Last created dialog Button)
Dialog - Create a dialog button for Dialog[2] labelled Wood Elf
Set DBWoodElf[2] = (Last created dialog Button)
Dialog - Create a dialog button for Dialog[2] labelled Breton
Set DBBreton[2] = (Last created dialog Button)
Dialog - Create a dialog button for Dialog[2] labelled Khajiit
Set DBKahjiit[2] = (Last created dialog Button)
Dialog - Create a dialog button for Dialog[2] labelled Orc
Set DBOrc[2] = (Last created dialog Button)
Dialog - Create a dialog button for Dialog[2] labelled High Elf
Set DBHighElf[2] = (Last created dialog Button)
Dialog - Create a dialog button for Dialog[2] labelled Argonian
Set DBArgonian[2] = (Last created dialog Button)
Dialog - Show Dialog[2] for Player 2 (Blue)
Trigger - Turn off (This trigger)
My second problem is a problem with a spell, Pickpocket. i dont even know whats wrong with it. How it SHOULD work, is a spell that works only from behind, your agility x 2 needs to be greater than a random roll between 1 and 50. if it is, its a success, if not, its a failure. However the units never seem to be behind the the target, no matter what.
BUT
Sometimes its still a success... never in front, but sometimes from the back it works. if i just spam the spell, 2 out of 10 times it works. others say "Must be behind target!"
Code:
Pickpocket VIllagers
Events
Unit - A unit Begins channeling an ability
Conditions
And - All (Conditions) are true
Conditions
Or - Any (Conditions) are true
Conditions
((Target unit of ability being cast) is in (Units owned by Player 1 (Red))) Equal to False
((Target unit of ability being cast) is in (Units owned by Player 2 (Blue))) Equal to False
((Target unit of ability being cast) is in (Units owned by Player 3 (Teal))) Equal to False
((Target unit of ability being cast) is in (Units owned by Player 4 (Purple))) Equal to False
(Ability being cast) Equal to PickPocket
Actions
Unit - Make (Triggering unit) face (Target unit of ability being cast) over 0.10 seconds
Set Temp = (Position of (Triggering unit))
Set Temp2 = (Position of (Target unit of ability being cast))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Angle from Temp to Temp2) Greater than ((Facing of (Target unit of ability being cast)) + 120.00)
(Angle from Temp to Temp2) Less than ((Facing of (Target unit of ability being cast)) - 240.00)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 50) Less than or equal to ((Agility of (Triggering unit) (Include bonuses)) x 2)
Then - Actions
Player - Add (Random integer number between 1 and 5) to (Owner of (Triggering unit)) Current gold
Floating Text - Create floating text that reads Success! above (Triggering unit) with Z offset 0.00, using font size 7.00, color (100.00%, 100.00%, 100.00%), and 50.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Else - Actions
Set PPfail = (Random integer number between 1 and 5)
Player - Set (Owner of (Triggering unit)) Current gold to ((Player 1 (Red) Current gold) - PPfail)
Floating Text - Create floating text that reads ( |cffE62129Failure! The target takes some of your money + ( You have lost + ((String(PPfail)) + Drakes!))) above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 50.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Else - Actions
Floating Text - Create floating text that reads Must be Behind targ... above (Triggering unit) with Z offset 0.00, using font size 7.00, color (100.00%, 100.00%, 100.00%), and 50.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Custom script: call RemoveLocation (udg_Temp)
Custom script: call RemoveLocation (udg_Temp2)
+rep if you can crack it!