Demo script modification

Ok, so I found a demo script that I would like to add some functionality to, but I don't really know how to go about it. I have worked a little bit in C++ (a VERY little bit) before, but never TorqueScript.

You can find the demo on SlingScripts. Just search for "trudemos".

The script currently has the following functionalities (all toggle-able):

Will prompt you to specify a name for your demo either when you start it or when you stop it (you can specify which)
Will ask you fore confirmation before stopping a demo
Will stop a demo recording at the end of a map
Will automatically pause demos at the start of playback
Will show a gravity HUD at the start of demo playback (not sure what this means, but it's one of the options)
Will give you a demo reminder during the pre-match countdown
Will display a small recording status HUD

I want to add the following functionality to it (again, all toggle-able):

Autorecord all maps
At the end of each map, pop up a prompt box saying, "Do you want to delete the recording made of this map?"

The autorecord should be simple, since there's already a function in there to auto-stop each demo at the end of a map.

The way I see it, in order to do this, I would have to:

-Add 2 new prompt buttons ("yes" and "no")
-Add a function for auto-recording each map at the start
-Add a new GuiControl for toggling the auto-record
-Add a new function for asking you at the end of a map whether or not you want to delete the demo made of that map
-Add a new GuiControl for toggling that as well

Some of this I can copy from existing pieces of code, modifying them only slightly (i.e. the GuiControls). However, I don't know how I would specify which demo to delete when a player clicks "yes" to the demo-delete prompt. Should I just have it delete the most recent demo? How do I do that? Also, I tried to figure out how to do the auto-start function, but couldn't.
Sign In or Register to comment.