Programatically trigger a specific npc event

Alayne

New member
Messages
345
Points
0
Hi peoples,

I'd like to programatically trigger a specific event of a specific npc.

I'm really newb to code sourcing, so if anybody can tell me how to do that, I'd be greatly thankfull ^^

Here's the name of the npc and event to call:

alapcusk for the npc unique name, and OnEventTriggered for the event!

I guess it should be something like "npc->event(sd, "alapcusk::OnEventTriggered", 0)", but it didn't worked...

Thanks!

 
Last edited by a moderator:
i think what you mean is "Automated" instead of programatically, try searching for automated events and you'll see their script containing timings for them to trigger. (something like OnClock, OnMinute) just get the Idea if you want to learn for yourself, or you can post the whole script of yours and request for modification making it automated.

 
Finally I've figured what failed: I simply forgot to add the npc.h include...Which bring the error when calling npc->event...My bad for all this lost time, everything's good now ^^

 
Back
Top