| 01-06-2006, 12:32 PM | #1 |
Been a while since I opened WE, was wandering what the actions were for adding a random chance to something? Example: -Event- --Unit Dies... etc. -Conditions- --Something... etc. -Actions- (Here is where I need a random chance for the bottom action, maybe a 1 in 2 chance or something like that of the modify attribute happening? I re-call doing this before but forgot how too.) --Modify Triggering Units Attributes to... etc. |
| 01-06-2006, 12:45 PM | #2 |
Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 2) Less than or equal to 1
Then - Actions
Do - Actions
Else - Actions |
| 01-06-2006, 12:51 PM | #3 |
Yeah it was something like that when I did it before, I'll look around in one of my maps to try and find it again. Thanks. |
| 01-06-2006, 05:16 PM | #4 | |
Quote:
random integers give you random chances. a random integer between 1 and 100 has a 1% change of being 1, theirfore if you make the number to seek 1, you have a 1/100 likelyhood that the if statement will resolve to true. (heck, if you make the number anything between 1 and 100 (inclusive) then you have a 1% change the if statement will resolve to true!) |
