Scripts for Tribes 1.40

The function for that is actually built-in, but I'm not sure why it was not enabled.

Code:
Event::Attach( eventEnterStation, AutoBuy::cheeseRepair );

Add this to the top of your Tribes\config\Modules\Loadouts.acs.cs file and it will work. (below the other 2 Event::Attach lines)
 
has anyone made a kill sound? a simple default chat taunt would work, doesn't necessarily need to be a custom sound if that's easier.
 
Just modify KillPop.acs.cs:

Comment out the remoteBP's and then add:

Code:
localSound(kill);

Place kill.ogg into your Tribes\base\voices and it should work. Use a different sound file for teammate kill, etc if you wish.
 
sshot0000.jpg


Once I finish debugging....
 
WeaponsHud by Zlex
==================

This is not the same as the weaponshud replacement that Andrew did. Not by a mile. This is just a sloppy workaround. It doesn't actually replace your weaponsHud, it is a totally new Hud.


Install
===================

1] BACKUP your Misc.acs.cs file

2] Extract the zip file into your Tribes directory

3] Turn off your WeaponsHUD in the GUI

--------OPTIONAL FOR SMOOTHER PERFORMANCE-------
4] Bind "Advanced Fire" to your fire key in in-game the binds screen

This replaces the Misc.acs.cs file in your Core folder, so please MAKE A BACKUP before you install.

For smoother performance I have included the Advanced Fire script, this can be used by setting "Advanced Fire" in your binds screen to your left mouse (or whatever button you use to fire).


Support for mods
====================
Right now this really only works for base, and I think for Renegades. There is the capability for more mod support, but it will require you to go ahead and map all the image files to the names of the weapons in the mod. Please feel free! It's just super time consuming and I don't care enough.

www.reactionismgallery.com/tribes/ZlexWeaponsHud.zip
 
Zlex. Nice work. I've tried to get around the scheduling issue as well but have run into the same problems. I wouldn't bother with events if you have it scheduled. I also wouldn't mess with it too much until we see the final product. It may have more triggers. A remoteyouspawned would be nice.

Here are some of my scripts cleaned up a bit with bind functions added.

Sticky Crouch - press to crouch/press to stand

Code:
// sticky crouch for 1.40

function StickyCrouch::BindInit()
  after GameBinds::Init {
  
	$GameBinds::CurrentMapHandle = GameBinds::GetActionMap2( "playMap.sae");
	$GameBinds::CurrentMap = "playMap.sae";
	GameBinds::addBindAction( "StickyCrouch", MAKE, IDACTION_TOGGLE_CROUCH, 0 );
	
}

Grenade/Mine Tosser - repeatedly throw mines and/or nades

Code:
// throw grenades or mines repeatedly - for 1.40

function TossLoop( %item ) {

	throwrelease( %item );
	schedule::add( "tossloop( " @ %item @ ");", 0.2, %item );
	
}

function TossUnloop( %item ) {

	schedule::cancel( %item );
	
}

function Tosser::InitBinds()
	after GameBinds::Init {

	$GameBinds::CurrentMapHandle = GameBinds::GetActionMap2( "playMap.sae" );
	$GameBinds::CurrentMap = "playMap.sae";
	GameBinds::addBindCommand( "Toss Grenades", "TossLoop('Grenade');", "TossUnLoop('Grenade');" );
	GameBinds::addBindCommand( "Toss Mines", "TossLoop('Mine');", "TossUnLoop('Mine');" );
	
}

Tosser::InitBinds();


Jump Jet and Ski - you need to bind both for it to work correctly

Code:
// 1.40 Jump Jet and Ski
// You must bind both 'JumpJet' and 'JumpJet Ski' in Options/Binds->Game for this to work properly

function JumpJetOn() {

	if(getMountedItem(0) == -1)
		postAction(2048, IDACTION_JET, 1);
	else {
		postAction(2048, IDACTION_MOVEUP, 1);
		postAction(2048, IDACTION_JET, 1);
	}
}
function JumpJetOff() {
	
	if(!$skiOn)
		postAction(2048, IDACTION_MOVEUP, 0); 
	postAction(2048, IDACTION_JET, 0);
	
}
	


function JumpJet::BindInit()
  after GameBinds::Init {
  
	$GameBinds::CurrentMapHandle = GameBinds::GetActionMap2( "playMap.sae");
	$GameBinds::CurrentMap = "playMap.sae";
	GameBinds::addBindCommand( "JumpJet", "JumpJetOn();", "JumpJetOff();");
	GameBinds::addBindCommand( "JumpJet Ski", "$skiOn = 1; postaction( 2048, IDACTION_MOVEUP, 1);", "$skiOn = 0; postaction( 2048, IDACTION_MOVEUP, 0);" );

}

JumpJet::BindInit();


Flag Drop Sounds

Code:
// flag drop sounds for 1.40

$Flag::DropSound[enemyflag]			="shieldhit"; 	// any ogg loaded in base 
$Flag::DropSound[friendlyflag]		="mine_act"; 	// any ogg loaded in base 

function Flag::DropSounds( %team, %cl ) {

	return ( %team == Client::GetTeam( getManagerId() ) ) ? ( localSound( $Flag::DropSound[friendlyflag] ) ) : ( localSound( $Flag::DropSound[enemyflag] ) );
}

Event::Attach(eventFlagDrop, Flag::DropSounds);


Local taunt on kill/team kill

Code:
// local taunt ( and screenshot ) on kill

$KillCheer::Screenshot="0.223"; // kill-screenshot delay in seconds ( 0 for no screenshot )

// kill local taunt
$echeers = -1;

$KillCheer[enemy, $echeers++] 	=  "ovrhere";  	// over here!
$KillCheer[enemy, $echeers++] 	=  "cheer1";   	// YEAH
$KillCheer[enemy, $echeers++] 	=  "cheer2";   	// WOO-HOO
$KillCheer[enemy, $echeers++] 	=  "cheer3";   	// ALL RIGHT
$KillCheer[enemy, $echeers++] 	=  "takcovr";   // take cover
$KillCheer[enemy, $echeers++] 	=  "taunt1";   	// Yooo-Hooo!
$KillCheer[enemy, $echeers++] 	=  "taunt10";	// Howd that feel?
$KillCheer[enemy, $echeers++] 	=  "taunt2";   	// Missed me!
$KillCheer[enemy, $echeers++] 	=  "taunt3";   	// Dance!
$KillCheer[enemy, $echeers++] 	=  "taunt4";  	// Come Get some
$KillCheer[enemy, $echeers++] 	=  "moveout";   // MOVE OUT!
$KillCheer[enemy, $echeers++] 	=  "retreat";   // RETREAT!
$KillCheer[enemy, $echeers++] 	=  "dsgst4";    // AWWWWWUUUUHHH!!
$KillCheer[enemy, $echeers++] 	=  "hitdeck";   // Hit the deck!
$KillCheer[enemy, $echeers++] 	=  "ready";     // ready!
$KillCheer[enemy, $echeers++] 	=  "ordcan";    // order cancelled
$KillCheer[enemy, $echeers++] 	=  "taunt11";	// I've Had worse
$KillCheer[enemy, $echeers++] 	=  "noprob";   	// No problem
$KillCheer[enemy, $echeers++] 	=  "sorry";     // sorry
$KillCheer[enemy, $echeers++] 	=  "needrep";   // need repairs

$echeers++;

// tk local taunt
$fcheers=-1;

$KillCheer[team, $fcheers++] 	=  "cease";  	// cease fire!
$KillCheer[team, $fcheers++] 	=  "retreat";   // RETREAT!
$KillCheer[team, $fcheers++] 	=  "basatt";    // we're being attacked
$KillCheer[team, $fcheers++] 	=  "incom2";    // incoming enemies
$KillCheer[team, $fcheers++] 	=  "takcovr";   // take cover
$KillCheer[team, $fcheers++] 	=  "oops1";     // DOH! 
$KillCheer[team, $fcheers++] 	=  "sorry";     // sorry
$KillCheer[team, $fcheers++] 	=  "ordcan";    // order cancelled
$KillCheer[team, $fcheers++] 	=  "needrep";   // need repairs
$KillCheer[team, $fcheers++] 	=  "help";      // Help!

$fcheers++;

function KillCheer( %killer, %victim, %damage ) {

	if ( %killer != getManagerId() )
		return;

	%randnum=floor(getRandom() * ($echeers-0.01));
	remoteEval(2048, lmsg, $KillCheer[enemy, %randnum]);
	if($KillCheer::Screenshot)
		schedule::add("screenShot(\"mainWindow\");", $KillCheer::Screenshot);
}

function KillCry( %killer, %victim, %damage ) {

	if ( %killer != getManagerId() )
		return;

	%randnum=floor(getRandom() * ($fcheers-0.01));
	remoteEval(2048, lmsg, $KillCheer[team, %randnum]);
}
	
Event::Attach( eventClientKilled, KillCheer );
Event::Attach( eventClientTeamKilled, KillCry );


Stuff Hud - kind of a mess code wise

attachment.php


www.tribespaintball.com/StuffHud.zip


many thanks to zlex and spy for the input, code, and icons and greyhound for the hud background


Here is my edit of AutoBuy::eek:nEnterStation that fixes the inventory r-kit issue. Either put this at the bottom of loadouts.acs.cs or replace the function.

Code:
function AutoBuy::onEnterStation() {
	if ( $PlayingDemo )
		return;

	if ( $Station::Type == "Inventory" )
		AutoBuy::cheeseRepair();
	if ( $pref::autoSpewPacks )
		AutoBuy::litterItem( "Repair Pack" );
	if ( $pref::autoBuyLoadout )
		AutoBuy::SelectAndBuyLoadout( $curFavorites );
}
 
Last edited:
inv turn

Code:
Event::Attach(eventEnterStation, inv::turn);

function inv::turn()
{
	schedule("postAction(2048, IDACTION_TURNLEFT, 0.33);", 0.01);
	schedule("postAction(2048, IDACTION_TURNLEFT, -0);", 0.31);
}

FC waypoint toggle

Code:
editActionmap("playmap.sae");
bindCommand(keyboard0, make, control, "a", TO, "moss::wp::Toggle();");

$Auto::Max = 2;

function moss::wp::Toggle()
{
	$pref::CarrierAutoWaypoint++;
	
	if($pref::CarrierAutoWaypoint > $Auto::Max)
        	$pref::CarrierAutoWaypoint = 0;
	
	CarrierWaypoint::Toggle();
}
 
moss' code edited for 1.40 options screen keybind

Code:
$Auto::Max = 2;

function moss::wp::Toggle()
{
	$pref::CarrierAutoWaypoint++;
	
	if($pref::CarrierAutoWaypoint > $Auto::Max)
        	$pref::CarrierAutoWaypoint = 0;
	
	CarrierWaypoint::Toggle();
}

function moss::wp::BindInit()
  after GameBinds::Init {
  
	$GameBinds::CurrentMapHandle = GameBinds::GetActionMap2( "playMap.sae");
	$GameBinds::CurrentMap = "playMap.sae";
	GameBinds::addBindCommand( "Toggle Waypoint", "moss::wp::Toggle();");

}

moss::wp::BindInit();
 
Back
Top