send mouseUp to button "buttonxy" with random chance
Posted: Mon May 16, 2016 8:44 am
Hello,
I am trying to implement an old pokemon game with live code. I can attack the enemy but he can't attack me.
I have a button "Attack1" which attacks the enemy and subtracts 45 from his lifebar.
I tried to implement it so, that i have "send mouseUp to button "bossAttack1" in the script of "Attack1". This works. I attack the enemy and then he attacks me back.
Now the thing is, that it is always the same attacks and same order. Therefore I want to implement it so, that when i click my "Attack1" and damage the enemy
the "send mouseUp to button "bossAttack1" should be with a random chance, for example 33,3% and maybe with a 33,3% change to call "bossAttack2" or "bossAttack3".
But I don't know how to implement it that way.
I hope I could describe my problem well and that you can help me.
Best
Mark
I am trying to implement an old pokemon game with live code. I can attack the enemy but he can't attack me.
I have a button "Attack1" which attacks the enemy and subtracts 45 from his lifebar.
I tried to implement it so, that i have "send mouseUp to button "bossAttack1" in the script of "Attack1". This works. I attack the enemy and then he attacks me back.
Now the thing is, that it is always the same attacks and same order. Therefore I want to implement it so, that when i click my "Attack1" and damage the enemy
the "send mouseUp to button "bossAttack1" should be with a random chance, for example 33,3% and maybe with a 33,3% change to call "bossAttack2" or "bossAttack3".
But I don't know how to implement it that way.
I hope I could describe my problem well and that you can help me.
Best
Mark