Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Add functionality to Game.TakeItem  (Read 2319 times)

0 Members and 1 Guest are viewing this topic.

Kaz

  • Arberth Studios
  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 228
  • The story is the game
    • View Profile
    • Info on 'Rhiannon' & 'Coven'
Add functionality to Game.TakeItem
« 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
Logged
\"Fans of popular horror adventures like Scratches and Barrow Hill should start bracing themselves for another haunting experience, as independent developer Arberth Studios has announced production on its debut title Rhiannon - Curse of the Four Branches.\" - AdventureGamers.com

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5679
    • View Profile
    • Dead:Code Site
Re: Add functionality to Game.TakeItem
« Reply #1 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
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Kaz

  • Arberth Studios
  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 228
  • The story is the game
    • View Profile
    • Info on 'Rhiannon' & 'Coven'
Re: Add functionality to Game.TakeItem
« Reply #2 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
Logged
\"Fans of popular horror adventures like Scratches and Barrow Hill should start bracing themselves for another haunting experience, as independent developer Arberth Studios has announced production on its debut title Rhiannon - Curse of the Four Branches.\" - AdventureGamers.com
 

Page created in 0.162 seconds with 23 queries.