Need to completely bypass Load and Save popups

This forum is meant for posting anything related to Adventure Maker that doesn't fit in the other forums.Please post technical questions in the Technical Support Forum!

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Need to completely bypass Load and Save popups

Postby noelbruton » Mon Jul 30, 2007 11:40 am

Hi,

Looking for a savegame/loadgame more in keeping with the look and feel of our game design rather than a generic OS-style popup box. (I know I can use Shadowhunter's input-box script for box design, but that doesn't do loads and saves).

I want my player to load a game by clicking a graphic in a hotspot rather than from a line of text in the Loadgame popup. To do that, I'd have to bypass the Loadgame popup completely. I guess that the popup must call some other function that loads the game - can we not have access directly to that function please?

Also, rather than have the player load the savegame popup, I'd like to save at any point - so what's needed I think is a function that saves the game without the popup, say something like:
'Action.savegame FILENAME'

It must be possible - it will just be the code behind the popup.

PLEASE! :-)

Noel Bruton
Arberth Studios
info@arberthstudios.com
www.arberthstudios.com
noelbruton
Junior Member
 
Posts: 12
Joined: Wed Jun 21, 2006 9:14 am

Further info on bypassing Savegame popup

Postby noelbruton » Mon Jul 30, 2007 7:33 pm

Using code from a number of sources, I wrote a script to save games from a hotspot. It uses the CreateObject function. When I try to run it, I get back a popup saying "For security reasons CreateObject is denied" or words to that effect. I looked it up at Microsoft Technet and they have no reference to the message. Does it come from Adventure Maker? And does that mean that I cannot write to a file from within Adventure Maker?

This is so frustrating. Anybody got any ideas please?

Thanks

Noel Bruton

****************
Sub WriteSaveFile

Dim objFSO, objFolder, objShell, objTextFile, objFile
Dim strDirectory, strFile, strText1, strValue1, strText2, strValue2, strCurrentFrame
strDirectory = "c:\noelsave"
strFile = "\filesave.txt"
strText1 = "V1"
strValue = V1
strText2 = "V2"
strValue2= V2
strCurrentFrame = Action.GetCurrentFrameName

' Create the File System Object
Set objFSO = CreateObject("Scripting.FileSystemObject")

' Check that the strDirectory folder exists
If objFSO.FolderExists(strDirectory) Then
Set objFolder = objFSO.GetFolder(strDirectory)
Else
Set objFolder = objFSO.CreateFolder(strDirectory)
WScript.Echo "Just created " & strDirectory
End If

If objFSO.FileExists(strDirectory & strFile) Then
Set objFolder = objFSO.GetFolder(strDirectory)
Else
Set objFile = objFSO.CreateTextFile(strDirectory & strFile)
Wscript.Echo "Just created " & strDirectory & strFile
End If

set objFile = nothing
set objFolder = nothing

Const ForWriting = 2

Set objTextFile = objFSO.OpenTextFile (strDirectory & strFile, ForWriting, True)

objTextFile.WriteLine(strText1)
objTextFile.WriteLine(strValue1)
objTextFile.WriteLine(strText2)
objTextFile.WriteLine(strValue2)
objTextFile.WriteLine(strCurrentFrame)

objTextFile.Close

WScript.Quit

End Sub
noelbruton
Junior Member
 
Posts: 12
Joined: Wed Jun 21, 2006 9:14 am

Postby Imari » Mon Jul 30, 2007 9:14 pm

Hi Noel, I think that Shadow Hunter will be your best bet in solving this. I can't script in VB6, but I spent a few minute doing a search for your terms and of the several websites/forums that I found, almost all of the "CreateObject denied" messages dealt with server or internet permissions. I don't suppose that you're working on a desk top server, are you? :?

This would be a very nice feature. I hope that you're successful. I know that with ShadowHunter's HotSpot Magic and KeyGuard you can set up keys and/or hotspots to open the Load or Save screens from any frame. Using both programs, I had an earlier version of my game set up so that the bottom of the frames had common hotpots that could take you to alternate inventory and menu screens. If I recall, however, you did get the MS-style pop-ups on save. I'm in the middle of transfering files to my new computer, so am unable to check at the moment, sorry.

BTW, I checked out your website and signed up for updates on Rhiannon. Very, very nice. Good luck with your game.
User avatar
Imari
VIP
 
Posts: 872
Joined: Fri Jun 20, 2003 4:49 pm
Location: Virginia, USA

Postby noelbruton » Tue Jul 31, 2007 4:07 pm

Hello Imari

Thanks for your input.

No, there's nothing odd about the environment I'm using - XP SP2. Thing is, AM couldn't exist if it couldn't write a file, so I know there's a solution. I've sent a mail to Contact2006 - is that Shadowhunter? I've every confidence this one can be sorted coz it must already work for so many other aspects of the engine.

Cheers

Noel
noelbruton
Junior Member
 
Posts: 12
Joined: Wed Jun 21, 2006 9:14 am

Postby Imari » Tue Jul 31, 2007 4:56 pm

Contact 2006 is GM, the creator of AM. Shadowhunter is one of the monitors, and the creator of many of the plug-ins for AM. He posted a couple days ago that he'd just gotten back from vacation and would return soon.

I did find this earlier thread, in case it helps ---
http://www.adventuremaker.com/phpBB2/viewtopic.php?t=2864&highlight=save

Again, good luck.
User avatar
Imari
VIP
 
Posts: 872
Joined: Fri Jun 20, 2003 4:49 pm
Location: Virginia, USA


Return to Adventure Maker General Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron