Call of Duty 5: SP - Checkpoints/Autosaves: Difference between revisions

From COD Modding & Mapping Wiki
Jump to navigation Jump to search
(Created page with "center == Overview == Autosaves/checkpoints are a common functionality in Singleplayer/Co-Op, they provide players spots to pick up from in the event th...")
 
mNo edit summary
 
Line 26: Line 26:


<pre>autosave_by_name( "Player just grabbed documents" );</pre>
<pre>autosave_by_name( "Player just grabbed documents" );</pre>
[[Category:Call of Duty 5]]
[[Category:Singleplayer]]
[[Category:Scripting]]

Latest revision as of 17:41, 7 February 2012

Overview

Autosaves/checkpoints are a common functionality in Singleplayer/Co-Op, they provide players spots to pick up from in the event that they die.

Whenever an autosave happens and a player dies, all players will spawn exactly where they were at when the autosave happened.


Implementation

There are two common ways to execute an autosave, by trigger or by script.

  • Trigger

Make a trigger of your choice and give it the Key Value Pair:

"targetname" "trigger_autosave"
You can apply the Autosave texture to the trigger found under the Tools area in the texture browser. The texture does nothing technical, it is just a visual reminder for designers on what the specific trigger does and will help you keep organized in the future when your map becomes filled with various triggers doing different things.

When the trigger is triggered, it will make an autosave.

  • Script

To make an autosave via script, we pass a save name string into autosave_by_name function.

autosave_by_name( "Player just grabbed documents" );