(adsbygoogle = window.adsbygoogle || []).push({});
Some observations, I got about half way through the scripts:
Riot shields are considered as a part of the MP bodies when calculating damage to players:
Originally posted by another user
Code:
...left_leg_lower\1\left_foot\1\gun\0\shield\0
There is a C# style 'foreach' statement used everywhere:
Originally posted by another user
Code:
foreach (player in level.players)
{
player suicide();
//blah blah
}
and a variation on that, where you can use the index too (interesting comment here!):
Originally posted by another user
Code:
foreach (key, headIcon in self.entityHeadIcons)
{
// TODO: remove and fix properly after ship
if(isDefined(headIcon))
headIcon destroy();
self.entityHeadIcons[key] = undefined;
}
Some kind of animation control in MP:
Originally posted by another user
Code:
PrecacheMpAnim(arg);
ScriptModelPlayAnim(arg);
Some kind of new file writing:
Originally posted by another user
Code:
fileprint_launcher_start_file();
fileprint_launcher("strings to be printed to file");
fileprint_launcher_end_file( "\\share\\raw\\vision\\" + level.script + ".vision", true);
Several different scenarios in which different vision files are used:
Originally posted by another user
Code:
VisionSetNaked( getDvar( "mapname" ), 0 );
VisionSetNight( "default_night_mp" );
VisionSetMissilecam( "missilecam" );
VisionSetThermal( game[ "thermal_vision" ] );
VisionSetPain( getDvar( "mapname" ) );
A reverse view for players?
Originally posted by another user
Code:
self SetRearViewRenderEnabled(true);
Icons for objects on the minimap:
Originally posted by another user
Code:
PrecacheMiniMapIcon();
HUD waypoint elements can be used with text, this might actually be possible in COD4:
Originally posted by another user
Code:
level.HUDItem[ "coordinate_agl" ].label = ( &"AC130_HUD_AGL" );
Playing FX for certain players only:
Originally posted by another user
Code:
playfxontagforclients( level._effect[ "cloud" ], level.ac130, "tag_player", player );
Handy!
Originally posted by another user
Code:
player CameraLinkTo(rocket, "tag_origin");
player ControlsLinkTo(rocket);
...
player ControlsUnlink();
player CameraUnlink();
Slow motion timescale lerping (this could be done with a little scripting in COD4):
Originally posted by another user
Code:
//SetSlowMotion( <startTimescale>, <endTimescale>, <deltaTime> )
setSlowMotion( 1.0, 0.25, 0.5 );
Not sure what this is, but I think it does 'player notify("jumped");' when they player uses '+gostand' (or the space bar). That'd be handy for using custom controls.
Originally posted by another user
Code:
player notifyOnPlayerCommand( "jumped", "+goStand" );
Some other stuff:
Originally posted by another user
stringToFloat(); //cast a string to a float
self ThermalVisionOn();
self ThermalVisionFOFOverlayOn();
self player_recoilScaleOn(0); //recoil scaler?
self allowJump(true);
self button_is_clicked("m"); //probably doesn't work
Not that any of this stuff is going to be useful without mods.
I looked inside _menus.gsc and saw the exploit Treyarch fixed in WAW:
Originally posted by another user
Code:
if ( response == "endround" )
{
if ( !level.gameEnded )
{
level thread maps\mp\gametypes\_gamelogic::forceEnd();
}
else
{
self closepopupMenu();
self closeInGameMenu();
self iprintln( &"MP_HOST_ENDGAME_RESPONSE" );
}
continue;
}
So anyone who can manage to input 'openscriptmenu z endround' into the console will force end the game they are playing in. There isn't a console but there are cfgs, from which you can add binds.
There's an awful lot of 'TODO' comments, and three of those 'fix after ship' ones.