Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Kaz on May 09, 2008, 10:13:34 AM

Title: Add functionality to Game.TakeItem
Post by: Kaz on May 09, 2008, 10:13:34 AM
Hi,

I'd like to add some functionality to 'Game.TakeItem' so as to call the inventory window briefly when an item is added to it, to show that the inventory has been invoked. I'd like to do this once in the main TakeItem, rather that have to go though each of the TakeItem's I've already written and add code to them.

Is there any way to edit the core Game.TakeItem method?

Thanks
Title: Re: Add functionality to Game.TakeItem
Post by: Mnemonic on May 09, 2008, 10:33:49 AM
Yes, WME allows you to override the built-in methods.
See this thread: http://forum.dead-code.org/index.php?topic=638.0
Title: Re: Add functionality to Game.TakeItem
Post by: Kaz on May 17, 2008, 08:18:52 AM
Thanks Mnemonic, worked perfectly. Like your earlier poster, I'm both trying to add something at the beginning of the game and having the inventory announce when it's received something. I used your idea for two variables.

Cheers