Jump to content

Having a Problem timing Chargen Prompts.


masternetra

Recommended Posts

Trying to do a somewhat revised version of Obscurum, atm working on fixing the chargen, but with what I have so far it won't go past the Race Menu, obviously I'm missing up with the delay timing somehow but dunno what I'm doing wrong. Here is the script:

scn 0SexSelectionScript
short buttonVar
short awaitingInput 
Short DoOnce
short MenuStage
short timer


Begin GameMode
if DoOnce == 0
Set DoOnce to 1
showmessage CG00ChooseSexMessage
set awaitingInput to 1
elseif awaitingInput == 1
set buttonVar to getbuttonpressed


if buttonVar > -1
set awaitingInput to 0
if buttonVar == 0
player.sexChange male 1
Set DoOnce to 1
player.moveto PlayerMarkerVerti
removeimagespacemodifier MQ08AllBlackedOutISFX
set MenuStage to 1
elseif buttonVar == 1
player.sexChange female 1
Set DoOnce to 1
player.moveto PlayerMarkerVerti
removeimagespacemodifier MQ08AllBlackedOutISFX
set MenuStage to 1
else
endif
endif


endif
if MenuStage == 1
ShowRaceMenu
set timer to (getsecondspassed + 1)
set MenuStage to 2
endif
if MenuStage == 2 && getsecondspassed > timer
SetTagSkills 3
set timer to (getsecondspassed + 1)
set MenuStage to 3
endif
if MenuStage == 3 && getsecondspassed > timer
SetSPECIALPoints 45
set timer to (getsecondspassed + 1)
set MenuStage to 4
endif
if (MenuStage == 4) && (getsecondspassed > timer)
SetInCharGen 0
addachievement 3
player.cios 0CrashStartSpellSpell
set MenuStage to 0
StopQuest 0SexSelectionQuest
endif
end

 

Link to comment
Share on other sites

Maybe the ShowRaceMenu command makes your script stop there and it never does the next two commands? Or maybe it pauses the script until ShowRaceMenu is done?

 

Also, your use of getseicondspasses is suspect. Your script won't run when a menu is being displayed. That is when MenuMode would run. So, if your set timer to gsp + 1, gsp will return the number of seconds the player was in that other menu (if your script is paused there). I would just set the timer to 1 to make the script delay for 1 second before showing the next menu.

Edited by GamerRick
Link to comment
Share on other sites

Maybe the ShowRaceMenu command makes your script stop there and it never does the next two commands? Or maybe it pauses the script until ShowRaceMenu is done?

 

Also, your use of getseicondspasses is suspect. Your script won't run when a menu is being displayed. That is when MenuMode would run. So, if your set timer to gsp + 1, gsp will return the number of seconds the player was in that other menu (if your script is paused there). I would just set the timer to 1 to make the script delay for 1 second before showing the next menu.

"Also, your use of getseicondspasses is suspect." - Not really, before this, I had the getsecondspassed for the racemenu part and it failed to load.

Link to comment
Share on other sites

I ended up doing a thing with a back to back quest progression for it. Only problem I'm having is timing the racemenu sense it's a different animal then the other menu's, been having a issue with tag skills coming up on top of the race menu screen since it's too darn slow to come up versus the other menus so trying to figure out how to bring it up without tagging coming up at the same time.

EDIT: Worked it out, for this at least. Will have to work on script timing for the future as well as work out how long to set a delay for the racemenu, for now got it rigged up to work as it needs to.

Edited by masternetra
Link to comment
Share on other sites

So, what caused the problem then? Please answer your own question so that I and others can understand it too.

I abandoned that script and opted for something different so i never actually figured out the problem. My Edit of my last post was relating to rigging the new thing so that skill tag isn't coming up at the same time as race menu anymore.

 

It's clear to me though that there is something wrong with the timer checks for the menustage stuff as it runs without the timer stuff (skill tag just overlays with race menu with that too, thus was going for a timer thing with it in a attempt to prevent it). I just don't know though why though the setup wasn't working. Oh well found alternative way of handling chargen, though a less efficient then a one script solution but ya do what ya gotta do.

Edited by masternetra
Link to comment
Share on other sites

The ShowRaceMenu function showed the menu in another thread and continued on, instead of halting your script there, right? If so, there is probably no way your script could would be able to tell when the player exited the Race Menu. So, calling those other functions to display chargen dialogues shouldn't be done in a GameMode block.

 

I am curious because I am thinking of writing a basic fast start mod. Glad you figured it out. I think the way the game does it by displaying a menu at the exit door your can use to open one dialog at a time, is the best.

Link to comment
Share on other sites

Yea I ended up having Name selection (which is automatically the first thing that gets run, not sure from where atm), Sex selection running before transition/fade into vertibird. Race Menu and Tagskills and Special menus are triggered after the crash sequence.

Edited by masternetra
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...