The default module script appears to be module_core.nss which does not have a character generator in the EVENT_MODULE_START event. The wiki says to create a script (examples given) to make the game start a chargen GUI. My question is this: can I not just copy the module_core.nss to a new script and add the required lines to that event? It seems that that way I can retain all the other default module event handlers.
Module script?
Débuté par
johnbgardner
, nov. 07 2009 04:01
#1
Posté 07 novembre 2009 - 04:01
#2
Posté 07 novembre 2009 - 04:44
First, make an int that you can use to track if you've handled the event, and set it to FALSE. Then, in your case statement, set it to TRUE. After your switch, check if the tracker is FALSE, then call HandleEvent(ev, RESOURCE_SCRIPT_MODULE_CORE). That will pass the event to module_core.nss if you didn't handle it yourself.
#3
Posté 07 novembre 2009 - 04:59
That is true if you retain the module_core.nss script for the module. I can see that you can create a small custom script to handle that particular event, in which case you must set the script event tracker integer. What I meant was that I plan to copy the module_core.nss script to a new one specifically for my module and edit as necessary to handle the various events, retaining the normal handling that module_core.nss performs but adding the custom commands as necessary. By assigning my _module_core.nss script to the module event in the module manager I think the module will use my custom script instead of the default one. And by doing this I can even create special case event handlers that will default to my custom module script if the event isn't handled. At least that is how I believe this is going to work.





Retour en haut






