Welcome Forums Requests Let us disable pickup for pickup-items

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #56180
    Marby
    Moderator

    I tried to make the hero to pickup an item as soon as some conditions met, but not earlier. To just make the item active again by using screenplay unfortunately does not work as a workaround – at least not in the “OnAfterPickup”-event. How do you think about a property to enable/disable the pickup behavior using the designer and/or by screenplay?

    If we additionally had an “OnTouch”-event for pickup-items, we even could enable its pickup-ability while touching it and more.

     

     

    #56181
    Marby
    Moderator

    Thinking about this:
    If we had such a functionality we even could disable the pick-up functionality whenever the “hero’s inventory” is full.

    #56223
    deWiTTERS
    Keymaster

    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.

    #56231
    Llamamon go
    Participant

    Ok Thanks for the help i’ll make sure to try it in one of my future ganes!

    #56270
    Marby
    Moderator

    @deWITTERS
    You forgot the pickup sound in your on touch screenplay. 😉

    But yes, it would be great if pickups and all the other stuff just inserts default code templates like this.

    Your invisible switch thing is indeed a good idea as a workaround. I could have come up with such an idea myself. (Oh Marby! Just think a little more careful before asking such silly questions. 😀 )
    …but as you already noticed there is no chance to access the pickup behavior for us. So we have to wait.

    One thing I really miss in connection with pickups are user defined functions. Up to now we have to copy code over and over for our pickups. That is not really a good thing to do.

    Because you mentioned it…
    When do you think we’ll have full coding power? Will it happen even this year or rather the next?

    Anyway, I wish you good success and can’t wait to see how much RPG Playground will grow until the end of this year.

    #56291
    deWiTTERS
    Keymaster

    Ah yes, I forgot the sound! :). A programmers code can never be correct on the first try ;).

    I hope to have functions and variables ready this year. I was already doing some analysis work for that, and I kind of figured out how I’m going to implement it. I’m excited too about that functionality, and how far you guys will be able to push the engine once it becomes available.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Requests’ is closed to new topics and replies.