ID:147106
 
I have no problem with the prob proc but what i am having a problem with is adding a var in.
obj/Card2
icon='Cards.dmi'
icon_state="b"
Click()
usr<< pick(
prob(65)
"You lose!"
usr.losr+=1,

This is basically what I want.
CodingSkillz2 wrote:
I have no problem with the prob proc but what i am having a problem with is adding a var in.
> obj/Card2
> icon='Cards.dmi'
> icon_state="b"
> Click()
> usr<< pick(
> prob(65)
> "You lose!"
> usr.losr+=1,
>

This is basically what I want.

very simple, I think this should do it...

obj/Card2
icon='Cards.dmi'
icon_state="b"
Click()
var/chance = rand(1,5)//1 out of 5 chance
if(chance!=1)
usr <<"You lose!"
usr.losr+=1
else
//if chanced correctly
In response to Hanns
Oh ok thanks.I did'nt find this one in the reference.