How can i make a sell trigger that when people sell the tower it picks a Random % between 0 and 120 of the point value to return to the player? I would also like the trigger to tell the player the % that was returned to them. Please help me make this trigger...
Also what spell should i use to make the Sell Tower spell... I tryed avatar but it makes your towers bigger before there sold...
Random Sell Trigger Help
Moderator: Cheaters
-
- Forum Fanatic
- Posts: 315
- Joined: October 16th, 2007, 7:32 pm
-
- Member
- Posts: 77
- Joined: May 27th, 2008, 9:08 pm
Re: Random Sell Trigger Help
hmm i had a quick shot at this and im wondering why warcraft cant multiply by a real value...
o and why it rounds down everything..
o and why it rounds down everything..
-
- Forum Staff
- Posts: 506
- Joined: August 5th, 2007, 1:38 pm
- Title: Gui Expert
- Location: *Unknown*
Re: Random Sell Trigger Help
Instead of an ability, Make it a researchable
Sell Ability Trigger
Sell Ability Trigger
Spoiler:
You do not have the required permissions to view the files attached to this post.
-
- Forum Fanatic
- Posts: 315
- Joined: October 16th, 2007, 7:32 pm
Re: Random Sell Trigger Help
There are only 2 problems with the trigger you made.
1) It always gives the same amount. I want the trigger to give a random amount back from what you payed. Forexample, there are 5 towers costing from 10, 20, 30,40, and 50g. When you sell the one for 10g you should have the chance of getting anywhere from 0 to 12g back.
2) The other problem with it being a research is when you sell the tower you cant sell the next tower, you can only sell one tower.
1) It always gives the same amount. I want the trigger to give a random amount back from what you payed. Forexample, there are 5 towers costing from 10, 20, 30,40, and 50g. When you sell the one for 10g you should have the chance of getting anywhere from 0 to 12g back.
2) The other problem with it being a research is when you sell the tower you cant sell the next tower, you can only sell one tower.
-
- Forum Staff
- Posts: 506
- Joined: August 5th, 2007, 1:38 pm
- Title: Gui Expert
- Location: *Unknown*
Re: Random Sell Trigger Help
Ok you can do it a different way when using an ability when you just swap out a couple things in my tigger and use point value.
Btw, the reason it only picks 1 number is beacuse the random integer is set to 120-120, so it always choses 120%...Its not the triggers fault I was testing something.
Fixed Trigger
Btw, the reason it only picks 1 number is beacuse the random integer is set to 120-120, so it always choses 120%...Its not the triggers fault I was testing something.
Fixed Trigger
Spoiler:
-
- Member
- Posts: 77
- Joined: May 27th, 2008, 9:08 pm
Re: Random Sell Trigger Help
to answer your other question i chose to use thunderclap and i made this map yesterday
You do not have the required permissions to view the files attached to this post.
-
- Forum Fanatic
- Posts: 315
- Joined: October 16th, 2007, 7:32 pm
Re: Random Sell Trigger Help
Thanks, that was a hard trigger. Thanks Arabidnun your second trigger worked great, i did alittle editing, there was a problem with your rich if it was under 100% you didnt get gold.
Now im having a different problem this one will be a piece of cake for you guys, but no mater what i try it dosnt work for somereason, its sapost to remove all the units of the nonplaying people, (Computer and so forth)
My first one was really simple and i though it would work.
This is what i got after reworking the trigger 10 times!
AND IT STILL DOSNT WORK PLEASE HELP ME.... This is the last bug in my game... and its a big one.
Now im having a different problem this one will be a piece of cake for you guys, but no mater what i try it dosnt work for somereason, its sapost to remove all the units of the nonplaying people, (Computer and so forth)
My first one was really simple and i though it would work.
Spoiler:
Spoiler:
-
- Tyrannical Drama Queen
- Posts: 4430
- Joined: November 19th, 2007, 5:05 am
- Been thanked: 2 times
Re: Random Sell Trigger Help
Changed units owned by (player) to Units In Region, (Playable Map Area) Owned by (Player). The way you're doing it right now makes it not select anything at all.
-
- Forum Staff
- Posts: 506
- Joined: August 5th, 2007, 1:38 pm
- Title: Gui Expert
- Location: *Unknown*
Re: Random Sell Trigger Help
This trigger is very easily fixed. Basically It should look like this:
VariableCondition
Remove Unused
Events
Map initialization
Conditions
Actions
Wait 2.00 seconds
Set Temp_Player_Group = (All players)
Player Group - Pick every player in Temp_Player_Group and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
((Picked player) slot status) Equal to Is unused
((Picked player) controller) Equal to Computer
((Picked player) controller) Equal to None
Then - Actions
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Picked player)) and do (Actions)
Loop - Actions
Unit - Remove (Picked unit) from the game
Else - Actions
Do nothing
Custom script: call DestroyForce (udg_Temp_Player_Group)
[blinking]
VariableCondition
Remove Unused
Events
Map initialization
Conditions
Actions
Wait 2.00 seconds
Set Temp_Player_Group = (All players)
Player Group - Pick every player in Temp_Player_Group and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
((Picked player) slot status) Equal to Is unused
((Picked player) controller) Equal to Computer
((Picked player) controller) Equal to None
Then - Actions
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Picked player)) and do (Actions)
Loop - Actions
Unit - Remove (Picked unit) from the game
Else - Actions
Do nothing
Custom script: call DestroyForce (udg_Temp_Player_Group)
[blinking]
Trigger For When Player Leaves/Defeated
[/blinking]
Spoiler: