frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

How to make enemys drop items

so, this is pretty self explanatory I want the enemys to drop items when killed but, I don't know where to start! here is a link to my game if anyone knows please tell me https://flowlab.io/game/play/1312591

Comments

  • Do you want it to make it so when they die they always drop an item? Make it so when the zombie collides with a bullet link it to the emit behavior. Change it to the item you want, hit the box that says "don't expire objects" and make the force and angle 0. If you want it so they only sometimes drop items message me back.
  • edited January 11
    I do want it so they only sometimes drop items! there are so many zombies you would just end up having way too many items!
  • Ok. So make it when the zombie collides with a bullet, it activates the random behavior. Make the max value 10 and the min value 1. Then make the result of that go into a filter. Then you can make the chance whatever you want. If it is less than or equal to 5, it's a 50% chance to drop. If it's less than or equal to 3, it's a 30% chance. After you decide that, make the result to the emitter from the first comment.
  • I know I'm asking a lot but can you send an image or preferably an example game using that mechanic I think it would be easier for me to understand
  • Demo
    This might help. I don't know how to take screenshots so I made it in ms paint
  • Screenshot 2020-01-11 at 12.58.27 PM
    this is how to take a screenshot
  • edited January 12
    Demo2
    Make the random 1-10, make the filter less than or equal to 3, and change the item to what you want with the emmiter.
  • it won't work if destroy isn't first but if it is last it takes way to long!
  • okay I think i figured it out that last question was stupid sorry
  • thank you for the help @Biscuit Butter I really appreciate it
  • BOOM BOOM UPDATED YEAH!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Sign In or Register to comment.

flowlab.io

| make games in your browser
@ 2017 Flowlab.io, All rights reserved.

Contact us

Get In Touch