Thread: gs2 obstacles
View Single Post
  #8  
Old 10-15-2005, 03:01 AM
ChibiChibiLuc ChibiChibiLuc is offline
Cookie Monster. :3
Join Date: Jan 2005
Location: Nova Scotia, Canada
Posts: 111
ChibiChibiLuc is on a distinguished road
Send a message via AIM to ChibiChibiLuc Send a message via MSN to ChibiChibiLuc
object.catchevent(name,event,newevent);

It calls 'newevent' every time 'event' is called.
It's main use is in GUI Controls, when you use a for() to create multiple buttons. You can use a catchevent to make clicking each button call the same event.

npc.catchevent(#N,"onPlayerEnters","onCreated");
This calls 'onCreated' each time 'onPlayerEnters' is called.

By the way, I only think npc. is required when it's used in an NPC Weapon. I don't know for sure, as I haven't tried it without the npc. prefix.
Reply With Quote