Home   Help Search Login Register  

Author Topic: saveGame in action menu  (Read 1051 times)

0 Members and 1 Guest are viewing this topic.

Offline nettrucker

  • Members
  • *
  • Too young to die-OFP Campaign by TOY & nettrucker
saveGame in action menu
« on: 25 Oct 2007, 21:48:53 »
Hi
What code do I have to use to add repeated saveGames to the player action menu. I want the player to be able to save game status whenever he wants. Activation via radio trigger is not an option since player is not commanding anything so it won't work.
player addAction ????? :dunno:
Thanks for any help on this matter in question.
Regards
nettrucker

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: saveGame in action menu
« Reply #1 on: 25 Oct 2007, 22:03:10 »
Sadly, addAction for some reason has the ancient and silly functionality of always referring to a script. That is to say, a typical addaction can look like this:

Player addaction ["Save game", "savegame.sqs"]

Using this action would then activate the script "savegame.sqs" which would be placed in your main mission directory. To make this script, simply create a new empty notepad .txt file, rename it 'savegame.sqs' (without the quotes), and then put this in it:

Code: [Select]
saveGame
hint "Game saved!"
exit

That's all you need to do to have endless savegames via addactions.  :)

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline nettrucker

  • Members
  • *
  • Too young to die-OFP Campaign by TOY & nettrucker
Re: saveGame in action menu
« Reply #2 on: 25 Oct 2007, 22:16:59 »
Hi Wolfrug

Thanks for your swift answer mate. Yeah I was afraid it would. It'll give the player some more freedom in missions. Sometimes the retry points made me crazy. I need it more for betatesting my missions, but I will implement this also in the final versions.
Thank you
regards
nettrucker :D

p.s works perfectly :good:
« Last Edit: 25 Oct 2007, 22:43:13 by nettrucker »

Offline Surdus Priest

  • Members
  • *
  • Only I can Forgive You!
Re: saveGame in action menu
« Reply #3 on: 26 Oct 2007, 00:04:54 »
in the addaction text area, put: "Create Retry Position" rather than save game.

otherwise the player might think the save can be loaded by pressing "load" rather than retry.
Campaigns are hard, I'll stick with scripting for now!

Offline nettrucker

  • Members
  • *
  • Too young to die-OFP Campaign by TOY & nettrucker
Re: saveGame in action menu
« Reply #4 on: 26 Oct 2007, 00:56:34 »
Hi Surdus Priest

thanks for the tip.
nettrucker