Enemy randomly drop items
charliehgreen
ArizonaMember Posts: 233
Hello,
Can anyone tell me how to create this?
Once an enemy has been defeated, there's a random chance he will drop the item I've created.
kind of like how on other games when you hunt enemies for let's say a "potion" and after killing that enemy like 5-10 times then he drops it.
Thanks,
Can anyone tell me how to create this?
Once an enemy has been defeated, there's a random chance he will drop the item I've created.
kind of like how on other games when you hunt enemies for let's say a "potion" and after killing that enemy like 5-10 times then he drops it.
Thanks,
Comments
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
And then as suggested above, use the Random Function with a minimum of 1 and maximum of X, and pick the corresponding Cell from the Table.
OR
You can create a Table with just enough Cells to fit in all your possible item drops (no more empty cells).
Then randomize from 1 to 10, and if say 1 is picked then randomize within the Table to choose an item to drop.
Both should work