Welcome Forums Requests Let us disable pickup for pickup-items Reply To: Let us disable pickup for pickup-items


So first I’ll give you a way to do this now, and then how in the future this will be handled.

How to do that now is to put a pickup and inactive the pickup behavior. Then place an invisible floor switch below it. Use the floor switch to test if the hero can pick up the item. If not, do nothing, if so, enable the pickup behavior.

While saying this, I just realized you can inactivate the pickup itself, but not the behavior :(. I added a new task for that so that you can do the above: https://trello.com/c/MVxGleXf

In the future, it can be handled differently. Once actions become more powerful, you will be able to write your own behaviors. Right now the pickup has a “pickup behavior”. Right now that is hard-coded. But it’s actually a really simple implementation:

  • attach to the “on touch” event of the actor, and so “on touch”:
    • increase hero health with 20
    • pickup becomes inactive
    • call “after pick up” custom actions

And that’s basically it. So in the future, such behaviors won’t be hard coded, but custom made with actions (possibly using variables). And so you could create or modify the behaviors and use actions to do whatever you want. Cool thing is that you can also easily reuse it.

I’ll see if I can allow access to the pickup behavior in one of the next updates.