Question: What thing will I need to create a script for in my add in?
Example: to have an npc in an area I created?
This is what I've go so far:
// Alistiar flirt plot events
void main()
{
}
I'm opening up and looking at scripts in the game and came across this one:
#include "log_h"
#include "utility_h"
#include "wrappers_h"
#include "events_h"
#include "2da_constants_h"
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
string sDebug;
object oPC = GetHero();
object oParty = GetParty(oPC);
int nEventHandled = FALSE;
switch(nEventType)
{
///////////////////////////////////////////////////////////////////////
// Sent by: The engine
// When: for things you want to happen while the load screen is still up,
// things like moving creatures around
////////////////////////////////////////////////////////////////////////
case EVENT_TYPE_AREALOAD_PRELOADEXIT:
{
//Start conversation here
if (GetLocalInt(OBJECT_SELF, AREA_DO_ONCE_A) == FALSE)
{
SetLocalInt(OBJECT_SELF, AREA_DO_ONCE_A, TRUE);
object oMage = UT_GetNearestCreatureByTag(oPC, "ran100cr_mage");
UT_Talk(oMage, oPC);
}
break;
}
}
if (!nEventHandled)
{
HandleEvent(ev, RESOURCE_SCRIPT_AREA_CORE);
}
}
And looking at this object oMage = UT_GetNearestCreatureByTag(oPC, "ran100cr_mage") is this a command that spawns the creature or is part of triggering him to talk?
What I want to do is have the npc I created show up in the game area I craeted and be able to talk to him. He has a dialog file associated with him but he doesn't show up in the area at all.
Thanks so much! Sorry if I am totally off, but I'm a new to this and am learning as much as I can.
Modifié par Lady of Lore, 31 janvier 2010 - 10:29 .





Retour en haut






