Author Topic: Oh how cowardly...  (Read 287 times)

Legacy_HarmlessLittleGnome

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +0/-0
Oh how cowardly...
« on: September 19, 2015, 06:58:53 pm »


               

I've finally thought up a story that I think is a good one, and well within the reaches of my noobish scripting talents.


It's a quest to save the land, and at the farthest extends of my country there lies a road leading...out. Off to the next country over.


I've set up signposts and conversations.


Call it boring, cowardly, or undramatic, but one option the player has, should they be afraid, or merely bored is to flee and leave my story to it's grisly fate.


I'm trying to create a script to save a copy of the character and end the game. So far, I'm having no luck.



               
               

               
            

Legacy_The Mad Poet

  • Hero Member
  • *****
  • Posts: 715
  • Karma: +0/-0
Oh how cowardly...
« Reply #1 on: September 19, 2015, 07:34:35 pm »


               

I don't know how you plan to activate the script... but assuming conversation based on what you said. 



void main()
{

object oPC = GetPCSpeaker();

ExportSingleCharacter(oPC);
DelayCommand(6.0f, EndGame("End"));

}

The endgame function is delayed because I'm not sure how long it takes to export a character correctly. Might be immediate. Either way this should do it. 



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
Oh how cowardly...
« Reply #2 on: September 20, 2015, 10:38:49 am »


               

The way I handle it is to have a final conversation which asks "do you want to save your character?" (if yes, ExportSingleCharacter) then gives a final message with one option (EndGame). I haven't heard of any timing issues if it's done that way.


 


I'd be interested to know if anyone has a definitive answer. I have had timing issues with autosaves, for example.



               
               

               
            

Legacy_HarmlessLittleGnome

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +0/-0
Oh how cowardly...
« Reply #3 on: September 20, 2015, 01:12:51 pm »


               

TYVM!