| 03-03-2006, 01:44 AM | #1 |
How can i make it where when an item of a certain class drops players must roll for it? when i mean roll, players are given the option to roll (random 1 - 100), Greed roll (same as roll but only counts if no one does a roll), and pass on the item(becomes free for all if no one rolls or greed rolls. |
| 03-03-2006, 03:20 AM | #2 | |
Quote:
So if the item has a 90% of dropping then it would be Random NUMBER <= 90 |
| 03-03-2006, 04:00 AM | #3 |
not a random drop Example: Unit drops item of class A then Have players pick roll, greed roll, or pass. if see if anyone picked roll if so get highest roll then give item to that player. if no rollers the get highest greed roller, then give item to that player, if no greed roller, then allow item to be picked up by anyone. |
| 03-03-2006, 10:47 AM | #4 |
I made a function -roll in my map. I tried to find a way to redistribute the item to the higher roll, but didn't work. So I had to count on the fairplay of my players. Maybe is it possible, but I think it's really, really hard :/. You can stille try with "Unit - A unit loses an item", then make a panel that asks everybody for "roll, passes, etc...". And the loses item event is a little buggy, I think you have to wait a small time before continue actions, else it won't work correctly :/. Anyway, Good luck with your trigger. If you need help making the panel and the selection, ask me ;). |
| 03-03-2006, 10:53 AM | #5 |
sounds like WoW =p i'm pretty sure in you check in the download section of Wc3sear there is a rolling trigger. i'll take a look for you |
| 03-03-2006, 12:35 PM | #6 |
I made one for you :)..... But it has only three problems : - If another item is dropped before players have rolled, it may not work correctly. - It doesn't support Greed Roll (it would have been really, really more complicate). - If the unit drop more than one item, I really dunno what may happen :s. Do not forget to read the manual, and to configure it properly for your map :). Hope I helped you. |
| 03-03-2006, 06:54 PM | #7 |
I can't use dialog boxes, as the players may become under attack while choosing what they do, and i need it to work with multiple items, as more then 1 item that must be rolled on can drop, also its based on the item's class. |
| 03-03-2006, 07:21 PM | #8 |
remember me linera, i tested a map of yours in custom games. i was the guy asking how u got the chat to be like that.... is this for the same map? |
| 03-03-2006, 08:09 PM | #9 |
I don't see what's the point of greed roll, since normal roll always owns it. |
| 03-03-2006, 09:45 PM | #10 |
Well... About a player becoming attacked, simply add a "pause all units", and"unpause all units", when the roll is finished..... Also, this same system would prevent the multiple items..... But then, it's like you want, but this could be the best solution to the two probs/ |
| 03-03-2006, 09:49 PM | #11 |
The reason for greed rolls, is for say you don't need the item but you want it for selling, you pick greed and if no one rolled a need roll then you have a chance of rolling a high greed roll and getting it from others who rolled greed. RaptorTeak, I'll accept jass. evilmapcreator, yes i remember you. yes same map. |
| 03-03-2006, 11:18 PM | #12 |
Can't you just do some kind of thing with -rollgreed, -rollneed, -pass? -First, create an item array. The bottom item in the array (0) will be the current item being rolled on, then as one is rolled on simply move them down. -I'm not sure if you can hide items or not (I don't have WE on this comp), but if not just move the item to an inaccessible corner of the map until rolling is finished. -Start a timer for 45 seconds or something. -When someone types -rollgreed or -rollneed, create a random integer between 1-100, tell them what they rolled, then store a boolean value saying that they already rolled. If they typed -rollgreed, set their -rollneed integer value to 0, and if they typed -rollneed, set their -rollgreed integer value to 0 to keep track. -If they type pass just set the boolean value but not the integer. -When either everyone's boolean value is set to true, or the countdown timer expires (in which case the boolean of remaining people will automatically be set to true), then check for any need rolls, and get the highest one. If no need rolls, check for the highest greed roll (I think you're going to just have to do a few if statements for that). Then if no need or greed (check that by seeing if their value for it is 0), then simply replace the item where it dropped from the corner of the map you moved it to (or unhide it if that's possible). -Now, give the item to the hero of the according player (if more than 1 find the closest hero owned by that player and give it to them). Then, move all items in your item array down 1, and check to see if ItemArray[0] = null or not. -Reset all need rolls to 0, all greed rolls to 0, and all boolean rolled or not values to false. You should also have a boolean that determines whether item rolling is going on or not. Set that to false. -Now, if ItemArray[0] isn't null, start this whole process again but with the new item. Variables Required: integer array NeedRoll[Number of players], integer array GreedRoll[Number of players], boolean ItemRolling, boolean array Rolled[Number of players], timer RollCountdown. Now, I think you could have thought of all that on your own but hopefully that will help out to get you started. I'm not gonna post all the code but you should be able to figure it out ; ). If you have any questions about specifics let me know and I'll see what I can do. |
| 03-04-2006, 11:59 AM | #13 |
Well, Linera, I edited my post. Relook it. I suggest to add a "pause all units" and "unpause all units" once the roll is finished... (after everybody rolled or passed). About the item class, I can just add a matching condition in the picking :) . Those simple things would fix all your pb I think. Oh also, I prefer chat dialogs, finding them more intuitive, and everybody MUST click on something. i find -roll -pass etc... not really intuitive, and i think that lot of persons wouldn't see the' message "type -roll for roll, etc..." and wouldn't understand what to do. That's my opinion. So, if you accept those "pause units", "unpause units", and adding a matching for item classes, then it's ok, I can do it... |
| 03-09-2006, 03:04 PM | #14 |
Erm.... Linera, it's like if all your posts were half-finished. You post a new topic a day, and you can't finish all of them -_-'. I've proposed a solution, but seems you don't care. Also, a pm box exists, didn't you know that ? Or maybe don't you simply care of me :/. The solution I said a the post before this one would resolve all your probs.... Please get an answer, or simple say you don't need it, but don't make me do useless work please.... |
| 03-09-2006, 04:37 PM | #15 |
I already told you that pausing all units for each roll won't work for me, as I need to allow players to continue fighting, plus pausing all units for each roll would make players made and in turn not play my map. |
