Page 1 of 1

OnEquipped() Wierdness

PostPosted: Thu Jun 21, 2012 6:56 pm
by Greg Swan
So, I have run into a very strange problem: I have a MiscObject I have attached a Script to checking for an OnEquipped() Event, but for whatever reason, when I quit to desktop and reload, the Event fails to trigger until I remove the object from my inventory and pick it up again.

Anyone have any idea what the deal is here? I've attached OnEquipped() scripts to MiscObjects before and never encountered this.

EDIT: It would appear the issue was the objects being stacked. Having just one of the items in my inventory when I quit and reloaded stopped this from occurring. Which would mean that the event is bugged, as it does not trigger properly if you have multiple instances of the object in your inventory when you initially load the game.

OnEquipped() Wierdness

PostPosted: Thu Jun 21, 2012 10:37 am
by Nana Samboy
I wish someone would compile all the info on this stuff into an article and post it up on the wiki.

http://www.gamesas.com/topic/1358006-scripted-objects-in-inventory/
http://www.gamesas.com/topic/1349382-event-in-script-attached-to-misc-item-only-firing-once/