Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Azrael on April 04, 2009, 06:39:48 PM

Title: Overwrite Game Methods
Post by: Azrael on April 04, 2009, 06:39:48 PM
It's possible to overwrite "Game." methods?

I know it's possible to overwrite others methods (like actor methods), but now i would like to overwrite the "Game.TakeItem" method and, if yes, in which file should i put the new method?

I try something but none works  :-\

Tnx :)
Title: Re: Overwrite Game Methods
Post by: Mnemonic on April 04, 2009, 09:48:34 PM
You want to override Game methods, therefore you need to put your custom methods into some script attached to Game (typically scripts\game.script, but you can create a new script and attach it).
Title: Re: Overwrite Game Methods
Post by: Azrael on April 05, 2009, 07:37:22 AM
Tnx Mnemonic, i tried some times ago but without results. Maybe i made some mistakes :P

I try again, tnx :)
Title: Re: Overwrite Game Methods
Post by: Azrael on April 05, 2009, 12:46:10 PM
Tnx it works!  ;)

I don't what was wrong the last time, but now it works  :)