Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → speedometer cog
speedometer cog
2003-07-18, 2:18 PM #1
is there a speedometer cog I could have for personal use.

------------------
your curiosity will get the better of YOU one day.

alpha1: winner of the 2003 tfti award.

http://members.shaw.ca/orichan/images/MyArt/Guards.jpg

fear teh evil point finger attack. yu-gi-oh Dub.
Snail racing: (500 posts per line)------@%
2003-07-18, 5:36 PM #2
What would you want it to do?

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2003-07-18, 7:13 PM #3
speed=vectorlen(getthingvel(player));
printint(speed);

The value 'speed' is the player's speed in JKUs per second.

------------------
Brutally honest since 1998
2003-07-18, 9:56 PM #4
Yeah, that was pretty obvious... (speed is a flex and not in JKUs per second, btw)

The reason I ask what he wants it to do is because that code doesn't do much by itself.

[This message has been edited by SaberMaster (edited July 19, 2003).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2003-07-19, 8:29 PM #5
i just want to know how fast i am going when using randsaber beta 8 in the "neverending slide" in the level warped deathmatch

------------------
your curiosity will get the better of YOU one day.

alpha1: winner of the 2003 tfti award.

http://members.shaw.ca/orichan/images/MyArt/Guards.jpg

fear teh evil point finger attack. yu-gi-oh Dub.
Snail racing: (500 posts per line)------@%
2003-07-19, 9:42 PM #6
Alright, I'm going to guess that your mod hasn't modified item_bacta.cog. If it has, then this won't work.

Create a cog folder in yourjkdir\resource and create a .cog file with this text:
Code:
# item_bacta.cog
#
# Modified to output a player's speed.
#
# [CYW & YB & SM]
#==============================================================#
symbols

sound     bactaSnd=BactaUse01.WAV

thing     player

message   activated
message   pulse
message   startup

end
#==============================================================#
code
#------------------------------------------------------
startup:
	SetPulse(0.1);

Return;
#------------------------------------------------------
activated:
	player = GetSourceRef();
	if(GetInv(player, 40) > 0.0)
	{
		if(GetHealth(player) < 100)
		{
			// Print("Using Bacta");
			jkPrintUNIString(player, 250);
			PlaySoundThing(bactaSnd, player, 1.0, -1, -1, 128);
			HealThing(player, 30.0);
			ChangeInv(player, 40, -1.0);
			if(GetInv(player, 40) == 0) SetInvAvailable(player, 40, 0);
		}
	}

Return;
#------------------------------------------------------
pulse:
	player=GetLocalPlayerThing();
	jkStringClear();
	jkStringConcatPlayerName(player);
	jkStringConcatAsciiString("'s speed is: ");
	jkStringConcatFormattedFlex(VectorLen(GetThingVel(player)), " %2.3f");
	jkStringConcatAsciiString(".");
	jkStringOutput(-1, -1);

Return;
#------------------------------------------------------
end


------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

[This message has been edited by SaberMaster (edited July 20, 2003).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2003-07-20, 7:46 PM #7
It has modified Item Bacta... heavily.

------------------
Brutally honest since 1998

[This message has been edited by Checksum (edited July 20, 2003).]
2003-07-20, 11:40 PM #8
Ah. Well there goes that. [http://forums.massassi.net/html/redface.gif]

Alpha1, just find a cog that: is used in every level, isn't modified by your patch, and doesn't have a pulse message (or you can add your own to the items.dat). Put in a SetPulse() on startup, add the message names to the symbols and copy the pulse message from my cog and paste it into yours.

If you have any questions, just ask. [http://forums.massassi.net/html/wink.gif]

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!