Aller au contenu

Photo

EVENT_TYPE_MODULE_LOAD doesn't seem to be firing


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

#1
invalidCRC

invalidCRC
  • Members
  • 1 messages
Hi!  I created the following module event script below for a test add-in module I'm playing around with, and it seems to add items to the player character, but only because I test against EVENT_TYPE_CHARGEN_END.  When I test against EVENT_TYPE_MODULE_LOAD, nothing happens.  I've searched everywhere and testing against the module load event seems to work for everyone else, so I'm honestly stumped :pinched:.  Any help would be most appreciated.  Thanks!

#include "log_h"
#include "utility_h"
#include "wrappers_h"
#include "events_h"
#include "scr_quickitems_h"

void main()
{
    event ev = GetCurrentEvent();
    int nEventType = GetEventType(ev);
    Log_Events("", ev);
    switch(nEventType)
    {
        case EVENT_TYPE_CHARGEN_END:
        {
            AddQuickItemsToInventory();
            break;
        }
    }
}

Modifié par invalidCRC, 07 janvier 2010 - 06:44 .


#2
anakin5

anakin5
  • Members
  • 258 messages
what are the properties of your module ?

#3
AnnoyingDisplayName

AnnoyingDisplayName
  • Members
  • 53 messages
For me, it fires every single time I load the save game. That's a problem that you might have if you are not careful. I have to sell my items to keep my inventory usable. So take a caution!

#4
Proleric

Proleric
  • Members
  • 2 354 messages
EVENT_TYPE_MODULE_LOAD only happens when you load from a saved game. The event which is often used for equipping a character at the start of a new game is EVENT_TYPE_MODULE_START. See wiki.