ok so i used this script to auto level my character at the start of the module
#include "sys_rewards_h"
const int FORCE_AUTOLEVEL = 2;
void main()
{
// keep track of whether the event has been handled
int nEventHandled = FALSE;
event ev = GetCurrentEvent();
switch(GetEventType(ev))
{
case EVENT_TYPE_MODULE_START:
{
object oHero = GetHero();
// [chargen code goes here]
// auto-level the player to level 10
RewardXP(oHero, RW_GetXPNeededForLevel(10), FALSE, FALSE);
SetAutoLevelUp(oHero, FORCE_AUTOLEVEL);
break;
}
}
// if this event wasn't handled by this script fall through to the core script
if(!nEventHandled)
{
HandleEvent(ev, RESOURCE_SCRIPT_MODULE_CORE);
}
}however when i run the game. I get stuck at a tutorial level up message and it pauses the game endlessly and i can't move on. How do i get out of this please
Auto character level up not working properly
Débuté par
Bassline204
, déc. 13 2010 03:16
#1
Posté 13 décembre 2010 - 03:16
#2
Posté 13 décembre 2010 - 09:11
I suspect you need some chargen code at the point indicated by the comment. The wiki gives this example:
I have exactly the same level up code as your example. It works fine. Of course, the automatic levelling up is a bit lacking in finesse, but for testing purposes that's usually acceptable.[dascript]
object oHero = GetHero();
// skip character generation
Chargen_InitializeCharacter(oHero);
Chargen_SelectGender(oHero, GENDER_MALE);
Chargen_SelectRace(oHero, RACE_HUMAN);
Chargen_SelectCoreclass(oHero, class_WARRIOR);
Chargen_SelectBackground(oHero, BACKGROUND_NOBLE);
[/dascript]
#3
Posté 13 décembre 2010 - 12:03
i have added the chargen code but it will still pause at the start of the game and i can't get out of it. That's my problem. I don't mind that auto leveling up is a bit lacking in finesse. I just want to play the game. I can't because it is endlessly paused.
#4
Posté 13 décembre 2010 - 12:36
Did you try disabling tutorials in the Options menu before starting the game?
I can't reproduce the problem, even with tutorials enabled, so maybe something else is pausing the game? What message are you getting, exactly?
I can't reproduce the problem, even with tutorials enabled, so maybe something else is pausing the game? What message are you getting, exactly?





Retour en haut






