"can't drop this" why not.

Jennifer Wren
20 Aug 2022, 05:01

I can't drop this object. On the inventory page, I checked "can be dropped". I had it set to default behaviour and ticked "can be dropped. I attached a script to after dropping. The menu on inventory included the verb "Drop". I test played it. The message sAID you can't drop this. So I went to the inventory page and changed "default behaviour" to "run script" and moved the script from "run after dropping" to the "run script" instead. I test played it and it said "you can not drop this.
What's going on?
I know it isn't anything about the way it is set up.
Why can't I drop this object and run the ondrop script?

if (game.pov.parent = Upon Altar) {
if (Got(Stick)) {
MoveObject (Stick, room)
AddToInventory (Smoke Stick)
}
else {
firsttime {
ClearScreen
picture ("")
picture ("")
PrintCentered ("")
SetTimeout (6) {
ClearScreen
}
}
otherwise {
MoveObject (player, somewhere)
}
}
}
else {
MoveObject (player, somewhere)
}


mrangel
20 Aug 2022, 08:10

The "can't drop it" message should only appear if the object's drop attribute is false.
As you say you've already ticked "can be dropped" (which sets the drop attribute), I wonder if one of your other scripts is using the drop attribute for something.

If not, I think we might need to take a look at your game to see what is going on.


Jennifer Wren
20 Aug 2022, 22:46

What I did to get around it, is changed the necessary verb from drop to cast, which is okay. What I think happened is that objects dropped there go someplace, but the drop verb on that object also has instructions to go someplace. It's too bad one couldn't override the other. Maybe if the box "items dropped here" could take "if" statements, too. I wonder why the "after dropping" script would not run after the dropped item first went to the place where "items dropped here go".


Jennifer Wren
02 Sept 2022, 16:55

I have it published. It seems to work now, and everything. It's a horror, so it might not be everyone's cup of tea, and it has a lot of big blocks of writing and not many people like to read, and the music, creepy as it is, was better when I first started working, but it is still fun for me, and not only horror but also fantasy.