hi guys. just a quick question. i am following this guide to make a follower
http://social.biowar...llower_tutorial
it is going well apart from the script about 1/6 of the way down. what is the module event script? do i make a new script or add it onto the end of another one. if so wich one? thanks
creating followers: scripts
Débuté par
bowlie1
, avril 15 2010 09:41
#1
Posté 15 avril 2010 - 09:41
#2
Posté 15 avril 2010 - 11:34
What you'll actually be making is an intercept script that will only include the changes you'll make and then refer other events to the module core script. You only need to include the cases where you're making changes to the script.
[quote]#include "events_h"
#include "global_objects_h"
#include "utility_h"
#include "wrappers_h"
// # include party member plot file name here
void main()
// EVENT INTERCEPTOR
{
// keep track of whether the event has been handled
int nEventHandled = FALSE;
event ev = GetCurrentEvent();
int nEvent = GetEventType(ev); //extract event type from current event
switch(GetEventType(ev)) //switches between the different possible cases that might apply
{
case EVENT_TYPE_PARTYMEMBER_ADDED:
{
// Set Party Flags here
}
case EVENT_TYPE_PARTYMEMBER_DROPPED:
{
// Set Party flags here
}
}
// ELSE SEND TO CORE SCRIPT
// if this event wasn't handled by this script fall through to the core script
if(!nEventHandled)
{
HandleEvent(ev, RESOURCE_SCRIPT_MODULE_CORE);
}
}[\\quote]
[quote]#include "events_h"
#include "global_objects_h"
#include "utility_h"
#include "wrappers_h"
// # include party member plot file name here
void main()
// EVENT INTERCEPTOR
{
// keep track of whether the event has been handled
int nEventHandled = FALSE;
event ev = GetCurrentEvent();
int nEvent = GetEventType(ev); //extract event type from current event
switch(GetEventType(ev)) //switches between the different possible cases that might apply
{
case EVENT_TYPE_PARTYMEMBER_ADDED:
{
// Set Party Flags here
}
case EVENT_TYPE_PARTYMEMBER_DROPPED:
{
// Set Party flags here
}
}
// ELSE SEND TO CORE SCRIPT
// if this event wasn't handled by this script fall through to the core script
if(!nEventHandled)
{
HandleEvent(ev, RESOURCE_SCRIPT_MODULE_CORE);
}
}[\\quote]
Modifié par Qutayba, 15 avril 2010 - 11:35 .
#3
Posté 16 avril 2010 - 08:21
Once you've made the script, you can add it to the module using File > Manage Modules > Properties. In the Script field, click on the elipsis [...] then select your script.
#4
Posté 16 avril 2010 - 10:15
i already have the charicter generation one there. will it matter? can it select multiple ones or do i need to compile them all into one? thanks
#5
Posté 16 avril 2010 - 04:05
You will need to include all the cases in one module script. The same script is triggered by many events. The case statements determine which bit of the script runs for a particular event.





Retour en haut






