[Solved] Help tin Trigger

Status
Not open for further replies.
Level 6
Joined
Aug 10, 2010
Messages
77
Guys is possible to create this?.....

If Hero by player 1 kill for example golem....Reward cahnce will be: 25%-Fire item
25%-Ice item 25%-Plant Item 25%-Thunder Item. this is just example....
Or If unit enters region.Player 1 recieve reward:50% chance to legendary item 50%-receive nothing... This is just example :) ... I really need this in my maps... can someone help me? :) ...
 
Last edited:
if( random integer between 1 and 100 = 1) then do actions....
..ifelse( random integer between 1 and 100 <= 24) then do actions...
....ifelse( random integer between 1 and 100 <= 25) then do actions...
......if( random integer between 1 and 2 = 1) then do actions...(1st 25%)
........ifelse( random integer between 1 and 2 = 2) then do actions...(2nd 25%)
......else run this trigger again (or not)
 
Last edited:
you should save the random integer to some variable so the value stays consistant, because if you generate new number every if block, you may generate 54 in the first one but 14 in the second one and while you really would get 54 so the third if block would run, in reality in this case nothing would run because there is nothing for <= 25
 
you should save the random integer to some variable so the value stays consistant*, because if you generate new number every if block, you may generate 54 in the first one but 14 in the second one and while you really would get 54 so the third if block would run, in reality in this case nothing would run because there is nothing for <= 25
*Constant. Yes, true
 
Status
Not open for further replies.
Back
Top