Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Question about save/load in 3dDemo Project  (Read 2350 times)

0 Members and 1 Guest are viewing this topic.

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Question about save/load in 3dDemo Project
« on: October 13, 2007, 10:34:26 AM »

Hi I am trying to get my save / load window working but i do not understand this bit of code you have here in the demo.......

Basicaly i have everything working except when it tries to overwrite an existing save game...... The code in the demo is

Code: WME Script
  1. function DoSave(Slot)
  2. {
  3.         var CanSave = true;
  4.         if(Game.IsSaveSlotUsed(Slot)) CanSave = Game.QuestionBox("Do you want to overwrite the old savegame?");
  5.        
  6.         if(CanSave)
  7.         {
  8.                  var Time = new Date();
  9.                  var Minutes = Time.GetMinutes();
  10.                  if(Minutes < 10) Minutes = "0" + Minutes;
  11.                 
  12.                  Game.SaveGame(Slot, Scene.Name + ", " + Time.GetDate() + "." + Time.GetMonth() + "." + Time.GetYear() + ", " + Time.GetHours() + ":" + Minutes);
  13.                  this.xResult = true;
  14.                  this.Close();
  15.         }
  16. }
  17.  

But i can not see how the "Game.QuestionBox" thing works.... i have made my own question box ready to go but i can not figure out how to call it and stuff... can anyone help?
« Last Edit: October 13, 2007, 12:46:34 PM by Jyujinkai »
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Question about save/load in 3dDemo Project
« Reply #1 on: October 13, 2007, 12:38:23 PM »

meta already answered this in the IRC channel, but for the record, the QuestionBox() method used in the WME Demo 3D is not a built-in method, it's just a convenience function scripted in game.script.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.072 seconds with 24 queries.