Aller au contenu

Photo

Command Complete event


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
FergusM

FergusM
  • Members
  • 460 messages
I can't get anything to fire off of the command complete event. For example, I set a creature (or party member) to have this script:

void main()
{
    event ev = GetCurrentEvent();
    int type = GetEventType(ev);
    switch (type)
    {
        case EVENT_TYPE_COMMAND_COMPLETE:
        {
            PrintToLog("COMMAND COMPLETED HERE");
            break;
        }
    }
    HandleEvent(ev,R"player_core.ncs");
}

but the print to log never happens. This event is used to handle several things in rules_core, but I can't get it to do anything. What gives?

#2
_L_o_B_o_

_L_o_B_o_
  • Members
  • 117 messages
I found the following quote from Craig in an older thread...

A few quick notes:
EVENT_TYPE_COMMAND_COMPLETE and EVENT_TYPE_COMMAND_PENDING are routed to rules_core.nss in events.xls.
To work with the queue outside of combat use EVENT_TYPE_CUSTOM_COMMAND_COMPLETE in your creature script. Use EVENT_TYPE_HANDLE_CUSTOM_AI inside of combat and set local variable AI_CUSTOM_AI_ACTIVE to a positive number in either case.


It might help you.

Modifié par _L_o_B_o_, 24 novembre 2010 - 10:31 .


#3
FergusM

FergusM
  • Members
  • 460 messages
Very helpful. I think I'll probably just edit the events 2DA to send it to the creature script.

Stupid misleading ASCII diagram in rules_core. :P

Modifié par FergusM, 24 novembre 2010 - 09:07 .