NEED HELP with - Chance of hit and miss
Forcing
Member Posts: 93
Hello community, i need help at
How to make a per centual actor,
example: i want to attack someone, i use a attack called for example kick
i want to make the attack (kick) so, that i have a chance of 83 % to hit him and 17% to miss
i know already one method how to make that, but its to sh*tty and it´s not per centual and very ressource-eater!
i would be very thankfull!
How to make a per centual actor,
example: i want to attack someone, i use a attack called for example kick
i want to make the attack (kick) so, that i have a chance of 83 % to hit him and 17% to miss
i know already one method how to make that, but its to sh*tty and it´s not per centual and very ressource-eater!
i would be very thankfull!
Comments
add an attribute (integer type) called Random (or whatever)
Rule when
Actor receives event [ touch ] is [ pressed ]
--changeAttribute ... self.Random To: [ random(1,100) ]
----Rule when
----Attribute [ self.Random] > [ 17 ]
----do the hit sequence
as 17% is not a large number of choices...it might help to view random#
add another actor on scene to Display Text... of the kicker's Random Attribute
(make an actor...drag on to screen ...click on that instance... unlock ... add Display Text and replace "Hello World!" with the expression >Current scene>layers>whatever layer the kicker is on > kicker>Random)
MH