Licence od 75 € Přihlásit se
DE EN FR ES IT CZ

Drag and drop objects for make a puzzle

Toto téma je několik let staré. Některé údaje se mohou týkat starší verze Visionaire Studia. Aktuální návody

  1. · 9 years ago
    Hi

    I want make a puzzle scene with some piece of papers. But I don't know how can I make drag and drop objects. Is it possible? I couldn't find lua command in data structure.

    I appreciate for any suggestions
  2. Pracujete na hře?

    Bezplatná verze umožňuje až 25 scén na projekt. Pro více scén a pro prodej hry potřebujete licenci.

    Zobrazit licence Vyzkoušet zdarma
  3. · 9 years ago
    Simplest solution would be to use the inventory system with dragging enabled so that you change the mouse cursor image to the item you are currently holding.

    I actually did some freelance a little while back for someone wanting the same kind of puzzle. I don't remember the details too well of what I did (just woke up a few minutes ago), but I know I didn't use the system I mentioned above. I believe I used a bit of Lua & some custom mouse cursors & an interface overlay to create an actual drag & drop system where you literally held the mouse & the paper piece you were holding dropped wherever you let go of the mouse. If you dropped the piece of paper anywhere inside of the correct slot then it would automatically slide to the correct position else it would remain in the position that you dropped it.

    I think I did actually intend on creating a tutorial for it at some point, but I probably got sidetracked & forgot all about it.
  4. · 9 years ago
    Thanks. The inventory system is a nice idea. How can I put the pice of papers in random around the slots?
    Sorry my Lua programming is not good.
  5. · 9 years ago
    Just use regular scene objects. You can hide them using conditions or values.

    You could also use characters too if you wanted or drag around animations or scene objects. There's lots of different ways you could go about sorting this puzzle out.

    Quick note: you don't actually need an item in your inventory to be able to assign it as an held item.
  6. · 9 years ago
    Great!!. Got it. Thanks a lot. I'll write here if had another question.
  7. · 9 years ago
    Sorry for old topic
    How can I make a drag and drop items  in  inventory slots?With suppose we have 32X32 slots
  8. · 9 years ago
    i don´t know if it is the best solution, but i would replace Mouse cursor if you click on it in the scene and do add Item on "leftclick" action on the slot. Then using the normal drag and drop for the other way around.
  9. · 9 years ago
    what do you plan here? should the dragged item replace an item in the inventory and replace the old slot with the clicked item. So that they swap places? 
  10. · 9 years ago
    In first post said that want make a puzzle. @ AFRLme said make inventory for it.
    My question is : How can I drag drop items on empty slots? Similar to inventory in "The Dig" game
  11. · 9 years ago
    In first post said that want make a puzzle. @ AFRLme said make inventory for it.
    My question is : How can I drag drop items on empty slots? Similar to inventory in "The Dig" game
    Never played the dig, but i guess you need to fake the empty slot but having placeholder items with no graphic. Then you can swap items out via lua. When clicking on an item, it gets dragged. therefore you can iterate through all inventory items via a lua loop and when the item in your hand is the same as on the field, set this field to another item with "nothing" as graphic.
    When having an item in hour hand and clicking on an "empty" slot, swap them out again.
  12. · 9 years ago
    How can write a drag item out of slots with lua? Sorry I'm not good programmer

Toto téma je uzavřené, protože tu přes rok nikdo neodpověděl. Svůj dotaz můžete položit v novém tématu.

Nové téma

Opravdu smazat tento příspěvek?