Sound alert when reaching certain speeds by Milk-Man - TribalWar Forums
Click Here to find great hosting deals from Branzone.com


Go Back   TribalWar Forums > Current Gaming > Tribes Scripting and Modifying
Reload this Page Sound alert when reaching certain speeds
Page 1 of 2
Thread Tools
Milk-Man
VeteranXV
Old
1 - 03-31-2017, 12:10 PM
Reply With Quote
Something set to trigger different sounds at 2 different speeds reached. I'd like to add it to this flag sounds file so I can keep local sound events all together. No center print needed. Can anyone hook it up?

Code:
$Flag::DropSound[enemyflag]		="mine_act";
$Flag::DropSound[friendlyflag]		="shieldhit";

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

Event::Attach(eventFlagDrop, Flag::DropSounds);
 
Milk-Man is offline
 
Sponsored Links
S_hift
Veteran++
Old
2 - 03-31-2017, 08:18 PM
Reply With Quote
this is awesome!
If anyone gets this working you should use krogoths ascend sounds and use the wind ripple sound effect. I think there are two different ones low speed ripple and high speed rippling sounds.
 
S_hift is offline
 
lemontw
Veteran
Old
3 - 03-31-2017, 11:27 PM
Reply With Quote
u would need to schedule a speed check via script rather than adding to that

p.s. I think I "wrote" that flag sound script
 
lemontw is offline
 
Exodus
VeteranX
Old
4 - 04-02-2017, 12:00 AM
Reply With Quote
interesting..
 
Exodus is offline
 
Milk-Man
VeteranXV
Old
5 - 04-03-2017, 05:01 PM
Reply With Quote
Thx lemon. Sounds like more trouble than it's probably worth.
 
Milk-Man is offline
 
hyung
VeteranX
Contributor
Old
6 - 04-03-2017, 06:11 PM
Reply With Quote
there's code for a speed hud lying around somewhere

that might be enough to put it all together
 
hyung is offline
 
Groove
VeteranXV
Contributor
Old
7 - 04-03-2017, 06:23 PM
Reply With Quote
technically its not exactly hard but

as lemon said you'd have to schedule a check to $speed regularly and it would probably trigger repeatedly if you were going over that speed unless you kept some kind of log or set a flag or something like that. can't just say if $speed > %threshold = play sound cuz it would just keep triggering on every schedule
 
Groove is offline
 
S_hift
Veteran++
Old
8 - 04-03-2017, 08:51 PM
Reply With Quote
here is a serverside script that would give you a bottom print screen message of your current speed in MPH

I think you can hack it and make it clientside or instead of triggering a bottom print you could trigger an overlay texture that will blur the edges giving a perception of motion blur and trigger the sounds you want.

http://library.theexiled.pwnageserve...oad.php?id=498

and worst case, **** it just install into the LT server cause that should have been done a long time ago. **** this metric bs

edit: I just realized this is for 1.11 and presto+newopts... sooo idk sry lol
 
S_hift is offline
 
Exodus
VeteranX
Old
9 - 04-05-2017, 02:08 AM
Reply With Quote
SCIENCE!
 
Exodus is offline
 
broast
Veteran5
Old
10 - 04-10-2017, 08:58 AM
Reply With Quote
edit didnt read thread
 
broast is offline
 
Last edited by broast; 04-10-2017 at 10:39 AM.
lemontw
Veteran
Old
11 - 04-10-2017, 10:04 PM
Reply With Quote
I started putting one together but it's far from completely functional. Like groove said ud have to set a flag to keep it from repeating. My example just checks every 2 seconds.

It would be nice if more people learned how to code Tribes...

Code:
$Low::Speed=30;
$High::Speed=60;

function Speed::Sounds() {
	if( $speed > $Low::Speed && $speed < $High::Speed ) {
		localSound( flierrocket );
		Schedule::Add("Speed::Sounds();", 2);
		return;
		}
		
	else if( $speed > $High::Speed ) {
		localSound( float_explode );
		Schedule::Add("Speed::Sounds();", 2);
		return;
		}
		
		
	echoc(1, "Speed = " @ $speed );
	Schedule::Add("Speed::Sounds();", 0.5);
}

Event::Attach(eventConnected, Speed::Sounds);
 
lemontw is offline
 
Milk-Man
VeteranXV
Old
12 - 04-11-2017, 11:09 AM
Reply With Quote
Solid lemon, thx. The repeated triggering actually isn't necessarily a bad thing as long as I can toggle it off and on and use sounds that aren't too annoying. What am I missing here with the toggle and notification print added in?

Code:
$Low::Speed=30;
$High::Speed=60;

echo("Executing - SpeedCheck");
EditActionMap("actionMap.sae");
bindCommand(keyboard0, make, "/", TO, "Speed::SoundsToggle();");

function Speed::SoundsToggle()
{
	if($Speed::Sounds == true)
	{
		$Speed::Sounds = false;
		Speed::SoundsbottomPrint("Deactivated!",3);
	}
	else if($Speed::Sounds == false)
	{
		$Speed::Sounds = true;
		Speed::SoundsbottomPrint("Activated!",3);
	}
}

function Speed::SoundsbottomPrint(%msg,%time) {
	$centerPrintId++;
	Client::centerPrint("<jc><f1>Speed Check <f0>v3.0 - By: <f1>Lemon\n<jc><f2>" @ %msg,1);
	schedule("clearCenterPrint(" @ $centerPrintId @ ");", %time);

}

function Speed::Sounds() {
	if( $speed > $Low::Speed && $speed < $High::Speed ) {
		localSound( flierrocket );
		Schedule::Add("Speed::Sounds();", 2);
		return;
		}
		
	else if( $speed > $High::Speed ) {
		localSound( float_explode );
		Schedule::Add("Speed::Sounds();", 2);
		return;
		}
		
		
	echoc(1, "Speed = " @ $speed );
	Schedule::Add("Speed::Sounds();", 0.5);
}

Event::Attach(eventConnected, Speed::Sounds);
 
Milk-Man is offline
 
Milk-Man
VeteranXV
Old
13 - 04-13-2017, 09:38 AM
Reply With Quote
;()
 
Milk-Man is offline
 
Exodus
VeteranX
Old
14 - 04-13-2017, 12:11 PM
Reply With Quote
You're grammer will suffer
 
Exodus is offline
 
Milk-Man
VeteranXV
Old
15 - 04-13-2017, 12:34 PM
Reply With Quote
Quote:
Originally Posted by Exodus View Post
You're grammer will suffer
grammar
 
Milk-Man is offline
 
Exodus
VeteranX
Old
16 - 04-13-2017, 12:46 PM
Reply With Quote
what i typed wasnt a joke. you are korrect
 
Exodus is offline
 
Milk-Man
VeteranXV
Old
17 - 04-13-2017, 04:05 PM
Reply With Quote
correct
 
Milk-Man is offline
 
Xml V2.0
VeteranX
Old
18 - 04-13-2017, 05:33 PM
Reply With Quote
correct

korrect

korean
 
Xml V2.0 is offline
 
lemontw
Veteran
Old
19 - 04-13-2017, 09:55 PM
Reply With Quote
working toggle
no repeats
easier sound switching

Code:
$Low::Speed=30;
$Low::Sound = "flierrocket";
$High::Speed=60;
$High::Sound = "float_explode";
$Speed::Sounds = false;


echo("Executing - SpeedCheck");
EditActionMap("actionMap.sae");
bindCommand(keyboard0, make, "/", TO, "Speed::SoundsToggle();");

function Speed::SoundsToggle()
{
	if($Speed::Sounds == true)
	{
		$Speed::Sounds = false;
		Speed::SoundsbottomPrint("Deactivated!",3);
		Schedule::Cancel("Speed::Sounds();");
	}
	else if($Speed::Sounds == false)
	{
		$Speed::Sounds = true;
		Speed::SoundsbottomPrint("Activated!",3);
		Speed::Sounds();
	}
}

function Speed::SoundsbottomPrint(%msg,%time) {
	$centerPrintId++;
	Client::centerPrint("<jc><f1>Speed Check <f0>v0.3 - By: <f1>Lemon\n<jc><f2>" @ %msg,1);
	schedule("clearCenterPrint(" @ $centerPrintId @ ");", %time);

}

function Speed::Sounds() {
	if( $speed > $Low::Speed && $speed < $High::Speed && $lastspeed != "Low" ) { 
		localSound( $Low::Sound );
		Schedule::Add("Speed::Sounds();", 0.5);
		$lastspeed = "Low";
		return;
		}
		
	else if( $speed > $High::Speed && $lastspeed != "High") {
		localSound( $High::Sound );
		Schedule::Add("Speed::Sounds();", 0.5);
		$lastspeed = "High";
		return;
		}
		
		
	echoc(1, "Speed = " @ $speed );
	Schedule::Add("Speed::Sounds();", 0.5);
}
 
lemontw is offline
 
Last edited by lemontw; 04-13-2017 at 10:09 PM.
Milk-Man
VeteranXV
Old
20 - 04-13-2017, 11:45 PM
Reply With Quote
Nice! I'll test it out tomorrow. Thx lems
 
Milk-Man is offline
 
Page 1 of 2
Reply


Go Back   TribalWar Forums > Current Gaming > Tribes Scripting and Modifying
Reload this Page Sound alert when reaching certain speeds

Social Website Bullshit

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

AGENT: CCBot/2.0 (http://commoncrawl.org/faq/) / Y
All times are GMT -5. The time now is 10:44 AM.