Usable Item question

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
User avatar
Blichew
Posts: 157
Joined: Thu Sep 27, 2012 12:39 am

Usable Item question

Post by Blichew »

Hi there,

I was wondering if anyone found an option to make item with class UsableItem not disappear after use ? I'm thinking about something in the lines of boots of jumping, etc.
You click the boots and it moves party either: 1up-1forward or 2-forward.

I guess some kind of workaround would be setting emptyItem = main item.

On a side note - does anyone have experience with designing funny/interesting items that one wants to share :)? Just ideas, not exact scripts/definitions.
User avatar
Prozail
Posts: 158
Joined: Mon Oct 27, 2014 3:36 pm

Re: Usable Item question

Post by Prozail »

if you simply return false from the onUseItem function, the object will not be removed.
User avatar
Blichew
Posts: 157
Joined: Thu Sep 27, 2012 12:39 am

Re: Usable Item question

Post by Blichew »

But I still can actually script the item effect on use, just return false in the end, right ?
User avatar
Prozail
Posts: 158
Joined: Mon Oct 27, 2014 3:36 pm

Re: Usable Item question

Post by Prozail »

Yup, the whole script will still run, but the engine will think the onUse was blocked.
Post Reply