Random health buff drop upon death of an ai

Anyone know hot to code this? So that there is a random chance of an ai dropping an additional life. Then when you walk over it you gain an additional one?

Eh, its highly related to your previous question (Wanting to make a powerup... - Unity Engine - Unity Discussions)

Can you explain what exactly u want to do?
Just gain one health or increase the max health?

Yeah it is the same but reworded Max lifes are 3 so if your on 2 lifes and pick uo the extra life you’ll have max lifes however if you already have max lifes when you pick it up it just dissapears

So, do you still need help here or did the other topic explain enough? If you need help: What exactly is the problem?

I haven’t tried coding it yet so I’ll follow what you said in the other one, and if I get stuck I’ll screenshot the coding and hopefully you’ll be able to help me

1 Like