Post tutorial RSS Tutorial 03 - Secrets, Jetpack, DoubleJump, Statistics, Camera

This tutorial shows how to handle secrets, jetpack, doublejump, map statistics, camera position.

Posted by on - Basic Mapping/Technical

Really simple but useful info about miscellaneous stuff.

1) Secrets
adding a new secret in the map is really easy. All you have to do is to place a new info_secret_found in your map (I suggest to place it near the secret).
To mark this secret as found jou can simply trigger this entity.

For example, you can place a trigger_once in your secret area in order to trigger the info_secret_found as soon as the player walks in there.

All statistics about secrets will be automatically handled by the game. Easy, isn't it? :D

2) Jetpack
The jetpack item is item_jetpack.
In order to stop the jetpack you need to call the script function "stop_jetpack() ".
You can do this in a script file or even with a simple trigger.

For example, you can place a trigger_once (or any other trigger type) with the key/val "call"/"stop_jetpack". When the trigger will be activated, the function will be called and the jetpack will be disabled.

3) DoubleJump
The item that enables double jumping is named item_armor_boots.

Double jumping can also turned on/off by the scriptevent

scriptEvent void doubleJumpEnabled( float on );

It can be used in a script as in the following example:

$player1.doubleJumpEnabled( 0 ); //disable

Note: double jumping is currently enabled by default!

4) Map statistics
In order to show map statistics on the hud you need to place a trigger_multiple and set the key/val "call"/"showStatsOnHud" on it.
As long as the player is touching the trigger, the stats will be shown.
Simple as that. :)

Note: enemies counter is automatically updated by the game: every spawned AI entity is counted (unless it's friendly, that is, its team is "0"). Sometimes though you may want to place a monster in a cinematic or in the background and therefore you don't want it to be counted in the stats. To exclude an actor from the statistics you need to set the key/val "noStats"/"1" on him. *

* = this will work only with the next patch.

5) Fix camera horizontal position.
You may want sometimes to fix the horizontal camera position, just like we did for the final boss in the Wastedhate map.
All you need to is to place a target_camera_forcey where the camera should be centered and trigger it to activate it.
Note that it only works on the Y axis: the camera is still free to follow the player up/down and it's still 350 untils far.
To allow the camera to move again freely you simply have to trigger a target_camera_free entity.

You can also do the same things with scripts, thanks to the following scriptevents for the player:

scriptEvent void freeCamera();
scriptEvent void forceCameraY( float ypos );

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Related Mods
Related Games
Doom III
Doom III First Person Shooter
Related Groups
Atomic Armadillo Entertainment
Atomic Armadillo Entertainment Developer & Publisher