Hello,
It's been a long time since I've touched inventories in AC.
When the player clicks an item with the left mouse button, and then starts to drag it, I want to throw up some text at the bottom of the menu. If the player then drags the item over another, I want to complete the sentence.
Basically, I want some text appearing describing the interaction as it unfolds.
Here's a mock-up of what I want to achieve:
And here are my current inventory settings:
Can AC achieve this, or will it require custom scripting?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
You'll need to use scripting, since your mockup effectively has two Hotspot labels - one under the cursor showing the item's name, the other for the "Combine X with Y" sentence.
The "..." in this sentence that only shows when the cursor isn't over another item makes it the best candidate to be handled through script.
Here's a function you can use to generate the mock-up sentence based on the selected inventory:
This'll work for your game's default language, but can be adapted for translations without much hassle.
AC support at 8am on a Sunday. Chris, you wonderful wonderful person. I do hope you take days off.
Sorry Chris, I need to get better at scripting. I still trip over how to properly use AC stuff in script, however regarding that script you outlined, VS is saying:
Oh! Was it just a case of saying
if (AC.KickStarter.runtimeInventory.SelectedItem != null)
?Quite right - I've corrected the above for future reference.
Works great. I added an extra check in the script so selected items can't be used with themselves.