Swarm 2DArcadeSideView
How to Create a 2D Side View in a Alien Swarm Modification.
See Swarm SDK Create a Mod first.
Code:
- Changing asw_controls
Open this file:
- src\game\shared\swarm\asw_player_shared.cpp
First we change the value "1" to "0" in asw_controls otherwise the angle of the mouse will be wrong. (NOTICE: the panels and stuff will NOT work anymore, you have to fix that in asw_in_mouse reset and apply functions)
ConVar asw_controls("asw_controls", "1", FCVAR_REPLICATED | FCVAR_CHEAT, "Disable to get normal FPS controls (affects all players on the server)");
- Hiding the Crosshair.
We want hiding the crosshair, open
- src\game\client\swarm\vgui\asw_hud_crosshair.cpp
search for
ConVar asw_crosshair_use_perspective("asw_crosshair_use_perspective", "1", FCVAR_CHEAT, "Show the crosshair that has perspective or the old version?");
change the value to "0" Go on and search for:
surface()->DrawSetTexture( m_nDirectCrosshairTexture2 );
replace with :
return; //surface()->DrawSetTexture( m_nDirectCrosshairTexture2 );
- Now we change the pitch
Open:
- src\game\client\swarm\asw_in_camera.cpp
search for :
ConVar asw_cam_marine_pitch( "asw_cam_marine_pitch", "60", FCVAR_CHEAT, "Marine Camera: pitch." );
change them to:
ConVar asw_cam_marine_pitch( "asw_cam_marine_pitch", "0", FCVAR_CHEAT, "Marine Camera: pitch." );//60
Now go to the head and disable with value "0" the shift
ConVar asw_cam_marine_shift_enable( "asw_cam_marine_shift_enable", "0", FCVAR_CHEAT, "Camera shifting enable/disable." ); //default was 1
- Now we let the code do the rest for us ;)
Open
- src\game\client\in_main.cpp
search for
ConVar thirdperson_platformer( "thirdperson_platformer", "0", 0, "Player will aim in the direction they are moving." );
and replace with this:
ConVar thirdperson_platformer( "thirdperson_platformer", "1", FCVAR_CHEAT, "Player will aim in the direction they are moving." );
Thats the Easy methode, you also can just search for all thirdperson_platformer commands and change the codes itself.
Thats it :-)