Left click clears dragged item

  • #1, by stered86Monday, 05. March, 09:58 3 months ago
    Hi, everybody,
    I'm trying to solve this issue but to no avail.  I've already mentioned this in another thread, but I decided to open a specific thread for it.

    When I use an item on an object, the dragged item is automatically cleared. I'd like the used item to remain dragged if the interaction didn't produce any result, so that the player can try and use it over other scene objects without having to access the inventory again. 

    Basically what I did is creating an action with random sentences the character will pronounce on "fake" interactions, but I need to add this kind of logic:

    1- The engine should save the currently held item in memory;
    2- The random text should be displayed;
    3- The engine should set back the previously held item.

    I need this logic to be active during bad interactions only, because I wouldn't want the engine to keep the dragged item after a successfull execution.

    This is lua work and, let me tell you, I usually end when lua begins. Any suggestions?

    Newbie

    33 Posts


  • #2, by stothewTuesday, 06. March, 13:26 3 months ago
    for me this is the default behavior of the engine. Did you solve the random tex thing with comment sets?

    normally it is like this:
    If the "dragged item" execute any matching action on the Object it drops.
    if there is no matching action a random text from the comment group is triggered and the draggable item stays as "in hand".

    isn´t that what you want?

    So i see the problem here:
    Basically what I did is creating an action with random sentences the character will pronounce on "fake" interactions

    this part should be done with the "coment sets" in the Character menu. if the random text is from there the Item will not be droped.

     

    Newbie

    69 Posts

  • #3, by sebastianTuesday, 06. March, 13:28 3 months ago
    in the main game settings there is a dropdown where you can choose what haopens after an item drop

    Thread Captain

    2162 Posts

  • #4, by stothewTuesday, 06. March, 13:32 3 months ago
    in the main game settings there is a dropdown where you can choose what haopens after an item drop

    oh, yes i forgot about that.
    Thanks!

     it is like i descriped if "Only after successful execution" is selected in the game settings.

    Newbie

    69 Posts

  • #5, by stered86Tuesday, 06. March, 14:11 3 months ago
    I'm sorry, I forgot to mention that in my case the actor who comments the interactions is not the same actor that makes the actions. 
    Basically when my main actor interacts with something, the player can hear his thoughts via an interface at the bottom of the screen. Therefore, the text is not pronounced by the actor himself, but I use the "display narration text" actionpart. 
    That's why I can't use the comment sets!

    Newbie

    33 Posts

  • #6, by stothewTuesday, 06. March, 17:59 3 months ago
    mhh i don´t know how far your project is.. if you have many "item droped" actions already implemented it is may a bit painful.. but it would be a soulution...

    sebastian was very kind and did a tutorial to achieve a custom Drag & Drop system with way more flexibility. You should be able to adopt it to your needs.

    Thanks again to sebastian for his wonderfull work!




    Newbie

    69 Posts

  • #7, by stered86Wednesday, 07. March, 11:56 3 months ago
    My game is closed to the alpha version, so I'm trying to change as less as possible to avoid problems. I'll give a look at Sebastian's video anyway, even if I'm still sticking to Visionaire 4!

    As for now, I thought about a different approach and I'll share it with you (maybe it can help somebody with my same problem). It's a bit of a pain but it looks like it could work: 

    1-In the main settings I've set the "activate standard command" to NEVER;
    2-In EVERY interactive scene object I put an "item dropped/any" command calling the random sentence action. This action only contains a randomly set value and a series of sentences the "narrator" will say;
    3-In the successfull execution actions there are two possibilities:
     a) The action will eventually remove the item from the character. In this case you don't have to do anything;
     b) The item won't be removed from the inventory. In this case you may want the item to stop being dragged, but you can achieve it simply by adding a "set item/empty" action part.

    As I mentioned it is a bit of a pain because you have to insert an "item dropped/any" command in every single interactive object, but then again, it seems to work fine.

    Newbie

    33 Posts

Write post