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
VeteranXX
Old
1 - 03-31-2017, 12:10
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
VeteranX
Old
2 - 03-31-2017, 20:18
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
 
lemon
Sour++
Contributor
Old
3 - 03-31-2017, 23:27
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
 
lemon is offline
 
Exodus
VeteranXX
Old
4 - 04-02-2017, 00:00
Reply With Quote
interesting..
 
Exodus is offline
 
Milk-Man
VeteranXX
Old
5 - 04-03-2017, 17:01
Reply With Quote
Thx lemon. Sounds like more trouble than it's probably worth.
 
Milk-Man is offline
 
hyung
VeteranXX
Old
6 - 04-03-2017, 18:11
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
VeteranXX
Old
7 - 04-03-2017, 18:23
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
VeteranX
Old
8 - 04-03-2017, 20:51
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
VeteranXX
Old
9 - 04-05-2017, 02:08
Reply With Quote
SCIENCE!
 
Exodus is offline
 
broast
VeteranX
Old
10 - 04-10-2017, 08:58
Reply With Quote
edit didnt read thread
 
broast is offline
 
Last edited by broast; 04-10-2017 at 10:39..
lemon
Sour++
Contributor
Old
11 - 04-10-2017, 22:04
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);
 
lemon is offline
 
Milk-Man
VeteranXX
Old
12 - 04-11-2017, 11:09
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
VeteranXX
Old
13 - 04-13-2017, 09:38
Reply With Quote
;()
 
Milk-Man is offline
 
Exodus
VeteranXX
Old
14 - 04-13-2017, 12:11
Reply With Quote
You're grammer will suffer
 
Exodus is offline
 
Milk-Man
VeteranXX
Old
15 - 04-13-2017, 12:34
Reply With Quote
Quote:
Originally Posted by Exodus View Post
You're grammer will suffer
grammar
 
Milk-Man is offline
 
Exodus
VeteranXX
Old
16 - 04-13-2017, 12:46
Reply With Quote
what i typed wasnt a joke. you are korrect
 
Exodus is offline
 
Milk-Man
VeteranXX
Old
17 - 04-13-2017, 16:05
Reply With Quote
correct
 
Milk-Man is offline
 
Xml V2.0
VeteranXV
Old
18 - 04-13-2017, 17:33
Reply With Quote
correct

korrect

korean
 
Xml V2.0 is offline
 
lemon
Sour++
Contributor
Old
19 - 04-13-2017, 21:55
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);
}
 
lemon is offline
 
Last edited by lemon; 04-13-2017 at 22:09..
Milk-Man
VeteranXX
Old
20 - 04-13-2017, 23:45
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


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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: claudebot / Y
All times are GMT -4. The time now is 09:39.