Aller au contenu

Photo

Need to override EVENT_TYPE_UNEQUIP but don't want to touch player_core


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

#1
JackFuzz

JackFuzz
  • Members
  • 408 messages
The following script is not working.  Basically when the player unequips I need to perform some script actions. But this script won't work.  Basically after the core is done, I need to do my stuff.

I got this script sample straight out of the WIKI. Just so you know  EVENT_MODULE_LOAD works just fine. So I know the module does work.

#include "utility_h"
#include "wrappers_h"
#include "events_h"
 
void main()
{
    event ev = GetCurrentEvent();
    int nEventType = GetEventType(ev);
    string sDebug;    
    object oPC = GetHero();
    object oParty = GetParty(oPC);  
    int nEventHandled = FALSE;
 
    switch(nEventType)
    {
         case EVENT_TYPE_UNEQUIP:
         {
            PrintToLog("WTF");
           
             nEventHandled = TRUE; //set this if no further action is required for this event
             break;
         }
    }
    if (!nEventHandled) //If this event wasn't handled by this script, let the core script try
    {
        HandleEvent(ev, RESOURCE_SCRIPT_RULES_CORE);
    }
}

Modifié par JackFuzz, 16 janvier 2010 - 10:51 .


#2
JackFuzz

JackFuzz
  • Members
  • 408 messages
I finally figured it out.

GDA: engineevents_my.gda

Make sure the ID of the event you want to override is the same as in the engineevents.gda

Use GDapp to make the GDA.

In this tutorial they call a GDA a 2DA. Very confusing.

2DA's are  GDA's!! Always know that.

http://social.biowar.../Event_override

#3
fluffyamoeba

fluffyamoeba
  • Members
  • 264 messages
because they are 2das? GDA files are just compiled 2das.