About items

  • #10, by sebastianSunday, 26. November 2017, 21:10 6 years ago
    The builtin drag&drop system will overwrite the current command. You will have the item in your hand until right clicking to lay it back. You cant shuffle through the commands with an item in your hand to switch back to another command and arrive to the hold item after some time like in the old sierra adventure games.

    Either have commands to shuffle through (by rightclick or another interface type) or hold an item with the drag&drop. No mixing with this system tp have the item as a specific command.

    Thread Captain

    2346 Posts


  • #11, by JorkzSunday, 26. November 2017, 21:48 6 years ago
    Uh ! I'm so disappointed...

    But i'm not sure I understood your last sentence.
    If the drag&drop system is totally ignored (it doesn't interest me for my project), can I still "simulate" a old sierra interface with actions, conditions etc... ?
    Even with a script ?

    Newbie

    90 Posts

  • #12, by sebastianSunday, 26. November 2017, 22:00 6 years ago
    Uh ! I'm so disappointed...

    But i'm not sure I understood your last sentence.
    If the drag&drop system is totally ignored (it doesn't interest me for my project), can I still "simulate" a old sierra interface with actions, conditions etc... ?
    Even with a script ?
    yes, you could code your own. 
    this would may include an dummy command "drag_item" which sets the cursor to the item you have currently activated. When shuffling through your items you can call an action / lua script which sets the cursor back to its look depending on the "hold" item when the "drag_item" command is active. Its a bit more advanced stuff (would contain some lua), but should be doable.

    Thread Captain

    2346 Posts

  • #13, by JorkzSunday, 26. November 2017, 22:18 6 years ago
    Ok, thanks.

    too advanced stuff for me. I just started with the soft... I don't know lua script

    It's still a pity that the drag n drop system in VS not include an active and inactive picture, like the cursors

    Newbie

    90 Posts

  • #14, by sebastianSunday, 26. November 2017, 22:36 6 years ago
    Ok, thanks.

    too advanced stuff for me. I just started with the soft... I don't know lua script

    It's still a pity that the drag n drop system in VS not include an active and inactive picture, like the cursors

    everything besides the "dynamic item cursor" like in Sierra games is doable without lua. Basically its a scumm interface like in LucasArts games. There are some tutorials about that around here.

    Thread Captain

    2346 Posts

  • #15, by JorkzMonday, 27. November 2017, 08:36 6 years ago
    I've already watched your "SCUMM Interface" tutorial but it's not that I want for my game.

    Here is my setting...

    At begin start following action:
    http://zupimages.net/up/17/48/4yf8.png

    In the mouse properties:
    http://zupimages.net/up/17/48/1kpi.png
    http://zupimages.net/up/17/48/3fjd.png

    (cursor and command "clé" are attached to the item (this is a key), and others are actions (go to; watch; take; talk...). Left click it's the current action and right is to choose actions

    For more précisions, here is the setting in the "interface panel"

    http://zupimages.net/up/17/48/khy7.png
    http://zupimages.net/up/17/48/oz5j.png

    I don't do the captures of that is following. It's the same: left click i fix the command and riht click I fix the next...

    And a special interface just for items

    http://zupimages.net/up/17/48/zrha.png

    ...I will do: with left click the key command and right click= return to command and cursor "take"

    But even at this stage it's not working... However I don't use the drag n drop system, and the cursor for the "clé" is not yet fixed. It's blocked on the "go to" command with my arrow png.
    And the active and inactive function is working. But right click: nothing.

    Please.... What's wrong ???

    Newbie

    90 Posts

  • #16, by JorkzMonday, 27. November 2017, 08:54 6 years ago
    Oh sorry... I'm understanding your last sentence just at the moment.
    "besides" is not "about"... problem of translation

    Newbie

    90 Posts

  • #17, by JorkzMonday, 27. November 2017, 09:00 6 years ago
    Anyway... Where can I start for fix the script ?

    yes, you could code your own.

    this would may include an dummy command "drag_item" which sets the cursor to the item you have currently activated. When shuffling through your items you can call an action / lua script which sets the cursor back to its look depending on the "hold" item when the "drag_item" command is active. Its a bit more advanced stuff (would contain some lua), but should be doable.




    Newbie

    90 Posts

  • #18, by afrlmeMonday, 27. November 2017, 12:03 6 years ago
    1. all commands should be in a single interface, not spread about multiple interfaces.

    2. in this screenshot you posted (below), you have multiple if queries that are checking if x command is the current command & if it is then you are setting a new command.

    http://zupimages.net/up/17/48/1kpi.png

    There's a problem here because Visionaire iterates through the action list line by line, block by block, which means if you checked if "alle vers" was the current command & then change the current command to "regarder" & then the next if query block is checking if "regarder" is the current command... I think you get my point? You either need to mix them up a bit so the following if query is not the same as the command you just set or add a quit current action action part just before each end if action part.

    Quick note: you don't need to set the cursor. You can assign the default cursor for each command in the command properties tab for each button.

    3. I'm not really sure what system you are trying to achieve. If you are just wanting to remove the item command & reset back to the default command on right click, then there are much easier ways to go about it. If the commands in the interface only contain your main commands (use, look, take, etc) & you are just wanting to cycle through them with right click then you could just use the next command option in the set command action part.

    Imperator

    7278 Posts

  • #19, by JorkzMonday, 27. November 2017, 13:37 6 years ago
    In fact, I understand (and almost knew) all the points you say.
    But I am looking for solutions to my problem by trying to get around the logic of the software...

    I simply want a Sam&Max cursor (left click=a command; right click=scroll commands).
    Apparently VS can fix it, I know that smile ...

    But after that, I wish the item in the inventory don't be the same .png when I take it (especially because there is no solution to have it "active" and "inactive" while the game). If possible, I also want the item in the inventory disapear when I take it... to become a special cursor. (or an another stuff... but I think a cursor is rather appropriate. )

    Why ?

    My inventory is big enough... and items attached too. When I use t VS's dragndrop the item taken is too big and when it takes place of the mouse it's graphicly very very ugly.
    And my inventory, itself, is ugly too when I scale it smaller... And for example I imagine the following stages of the game with a origami item in the inventory what is torn up when you take it.

    PS: Now I am in the version 5 wink

    Thank you so much for your replies !!

    Newbie

    90 Posts

  • #20, by afrlmeMonday, 27. November 2017, 14:18 6 years ago
    The reason you specified is why I dislike the dragged item system. The images are the same size as in your inventory & the interaction position that detects when a scene object, character or item is below the cursor image is in the center of the image sprite rather than the top left.

    I highly recommend using a command based inventory system.

    1. create a custom cursor for each command & inventory item. This way you can have both an active & inactive image/animation for each command & held item that's also different from the image of the inventory item.

    2. create all of your commands inside of a single interface. This includes both general commands (use, take, examine, walk to, etc) & also a command for each & every single inventory item. It's a lot of work sure, but it's worth it in the end.

    3. inside of the command properties tab for each of the command buttons types you have just created, assign a cursor & set the "command can be used on" option to objects & characters. This is so that the cursor will automatically be set to the relevant cursor each time you change to a new command. Saves a lot of time in the long run. The other option is so that you can use the command on both objects (scene objects, items) & characters.

    4. Now go to the items tab & create all of your items if you haven't already done so, assign an image or animation (animation if you want to hide the image when the player is holding the item in hand) to each one. Now inside of the actions tab for each item create an executed command (immediate) take/use (or whatever command you want it to be for setting the item to hand) & now create an action part to change the current command to that of the relevant item command. In-game it should now change to that command & show the custom item cursor you created.

    5. Inside of actions tab for scene objects/characters you can now create execute command (at destination) which you can set as one of the item commands you have created.

    I admit it probably sounds a bit complicated with text only, but I highly recommend using this method as it allows you to customize easily & looks great.

    In regards to hiding the image in the inventory, you could create a 2 frame animation for each item. The first frame would contain the item image, the second frame should be a transparent image with the same size canvas as the frame with the item image. What you would need to do is edit each frame to open up the edit dialog window & then you would create some custom actions for each frame. In the first frame you would create an execute a script action part & then you should add something along the lines of this to it...
    if game.CurrentCommand:getName() == "carrot" then
     ActiveAnimations["itm_carrot"].AnimationFirstFrame = 2
     ActiveAnimations["itm_carrot"].AnimationLastFrame = 2
    else
     ActiveAnimations["itm_carrot"].AnimationFirstFrame = 1
     ActiveAnimations["itm_carrot"].AnimationLastFrame = 1
    end

    Obviously you will need to replace carrot with the actual name of the relevant command & itm_carrot with the name of the item whose frames you are currently editing. Quick note: names are case sensitive.

    For the second frame you would do the exact same thing except you will change the script slightly so that it forces the frame back to frame 1.
    if game.CurrentCommand:getName() == "carrot" then
     ActiveAnimations["itm_carrot"].AnimationFirstFrame = 1
     ActiveAnimations["itm_carrot"].AnimationLastFrame = 1
    else
     ActiveAnimations["itm_carrot"].AnimationFirstFrame = 2
     ActiveAnimations["itm_carrot"].AnimationLastFrame = 2
    end

    Anyway, hopefully this massive wall of horrible text will be of some help to you. Normally, I'd share some screenshots, but I have nothing at hand at the minute. Though I've posted images in the past of how I setup a command based inventory system. They are floating about on the forum somewhere.

    P.S: I recommend using Lua script for the command cycle interface. Would make much less work, however you mentioned that you have no clue how to script with Lua. Instead what you could do when you take an item from the inventory is set a condition to true then when you drop the item set the condition back to false. In the global right mouse button actions you need to wrap all of the action parts inside of an if query that checks if an item is held or not. So that on right click you either cycle through the commands or you drop the current item instead & change back to the default command.

    Imperator

    7278 Posts