i can't get this to work. is there some really simple thing you can do to make this happen, for example like replacing the module_core with a replacement script and then call the chargen_sys replacement script from that. (i've tried that and i can't get it to work)
redirecting to a custom chargen_sys script
Débuté par
gordonbrown82
, avril 06 2010 09:00
#1
Posté 06 avril 2010 - 09:00
#2
Posté 06 avril 2010 - 09:18
File > Manage Modules > Properties > Script
Here you can assign a custom module script without event redirection. As for redirecting events, I think there are add-ons which can help you with that.
Here you can assign a custom module script without event redirection. As for redirecting events, I think there are add-ons which can help you with that.
#3
Posté 06 avril 2010 - 09:22
The module_core script calls the standard sys_chargen script so unless you've overwritten it (not wise) your custom module event script will have to handle all the CharGen/level up events and prevent them from falling through to module_core either by setting nEventHandled to TRUE or by completely omitting the standard fall through code:
if(!nEventHandled)
{
HandleEvent(evCurrent, RESOURCE_SCRIPT_MODULE_CORE);
}
Modifié par Sunjammer, 06 avril 2010 - 09:25 .
#4
Posté 06 avril 2010 - 10:02
the problem i had was that the module core replacement script in the add class tutorial doesn't contain PreloadCharGen(); //preloads resources for character generation
StartCharGen(GetHero(),0,TRUE); //initiates character generation
so no event was sent to my script. now it works.
StartCharGen(GetHero(),0,TRUE); //initiates character generation
so no event was sent to my script. now it works.





Retour en haut






