I can't really picture how that would work - once you let go in drag-and-drop mode, that deselects the item before a click is possible. Can you elaborate on what it is exactly you're after?
It is certainly possible to change between the two modes at any time through script.
When a player clicks on the inventory item it should become selected and ready to use wherever on the scene through click&click mode. But if a player starts to drag the item from the inventory it should glue to the cursor and be ready for implementation on the scene through drag&drop mode.
We are trying to switch between the two modes through the script, but no luck.
This technique works great in our casual adventures.
Indeed, it'd be very difficult to do by modifying the code - but I think you should have luck using custom events.
With events, you can enable drag-and-drop when you first hover over the inventory, and then - if the player combines an item with itself (i.e. single clicks an item), disable dnd and force-select the item.
Hope it's okay to resurrect an old thread like this.
Would it be possible to re-post this code?
And now we're at it - I've found several interesting code bits from the past on this forum that I wanted to explore, but they're all from Pasteall and these links don't work anymore.
It would be great to have these updated so the code-bits were accessible again.
There's probably a lot of goodies there that people searching the forum now cannot access...
Comments
It is certainly possible to change between the two modes at any time through script.
When a player clicks on the inventory item it should become selected and ready to use wherever on the scene through click&click mode.
But if a player starts to drag the item from the inventory it should glue to the cursor and be ready for implementation on the scene through drag&drop mode.
We are trying to switch between the two modes through the script, but no luck.
This technique works great in our casual adventures.
With events, you can enable drag-and-drop when you first hover over the inventory, and then - if the player combines an item with itself (i.e. single clicks an item), disable dnd and force-select the item.
Try this:
http://pasteall.org/953919/csharp
Hi
Hope it's okay to resurrect an old thread like this.
Would it be possible to re-post this code?
And now we're at it - I've found several interesting code bits from the past on this forum that I wanted to explore, but they're all from Pasteall and these links don't work anymore.
It would be great to have these updated so the code-bits were accessible again.
There's probably a lot of goodies there that people searching the forum now cannot access...
I don't have it to hand, but I've tried to re-write what it likely was here:
For a repository of handy scripts, check the wiki: https://adventure-creator.fandom.com/wiki/Category:General
Hi Chris
Thanks for such a quick reply on a holy Sunday :-)
Yes, the wiki is a great place for scipting clues - I go there often!