I would like to start out as that character when I start the module.
I've looked over the scripts for character generation and the functions in the toolset, and I couldn't find anything which allows you to start out as a premade creature.
The current script I have skips character generation and gives me a human noble warrior, and I was able to load the items (beer) to homer_simpson.utc.
However I wasn't able to get the looks of the creature. How do I load a specific creature to start with?
Here's the script:
#include "events_h"
#include "global_objects_h"
#include "sys_chargen_h"
#include "utility_h"
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev); //extract event type from current event
int nEventHandled = FALSE; //keep track of whether the event has been handled
switch(nEventType)
{
case EVENT_TYPE_MODULE_START:
{
// skip character generation
object oHero = GetHero();
Chargen_InitializeCharacter(oHero);
Chargen_SelectRace(oHero,RACE_HUMAN);
Chargen_SelectCoreclass(oHero,class_WARRIOR);
Chargen_SelectBackground(oHero,BACKGROUND_NOBLE);
LoadItemsFromTemplate(oHero, "homer_simpson.utc", TRUE);
break;
}
}
if (!nEventHandled) //If this event wasn't handled by this script, let the core script try
{
HandleEvent(ev, RESOURCE_SCRIPT_MODULE_CORE);
}
}
Please help.
Modifié par Cromalic, 21 novembre 2009 - 04:54 .





Retour en haut






