Page 1 of 1

Get CURRENT_SPEED;

Posted: 19 Oct 2005, 20:47
by BlueIce

Code: Select all

	animtime = Get CURRENT_SPEED; //CURRENT_SPEED = 29
	animtime = ANIMFACTOR / animtime;
This Code don't work, spring give an error:

Cob error, unknown get costant 29.

How do I get the current speed of a unit?

Posted: 19 Oct 2005, 21:09
by Kuroneko
take out the // comment

Posted: 19 Oct 2005, 21:10
by BlueIce
the real file don't have the comment

Posted: 19 Oct 2005, 22:20
by Dragon45
So is this a .bos you're trying to compile into a .cob?

Posted: 19 Oct 2005, 22:36
by BlueIce
the bos compile without errors, but when I build the unit spring gives this error continuously. ("Cob error, unknown get costant 29.").

Code: Select all


MotionControl() 
{
 while (TRUE)
 {
  animtime = Get CURRENT_SPEED; 
  animtime = ANIMFACTOR / animtime;
  ///ANIMATION CODE [...]
  sleep(100)
 }
}

Posted: 19 Oct 2005, 23:27
by Gnomre
Because Spring doesn't support getting the current speed...

Posted: 19 Oct 2005, 23:29
by BlueIce
OK, tanks for the replies!

Posted: 20 Oct 2005, 00:29
by zwzsg
get CURRENT_SPEED; was from TA:Kingdoms, not from TA. Although some progress has been made, Spring doesn't fully support TA:K units yet.

Posted: 20 Oct 2005, 01:11
by Dragon45
It would be trivial to add support for that, but i think we're just better off waiting for the new scripting language instead of coding, copiling, recoding, then recompiling for the new language :P

Posted: 20 Oct 2005, 17:36
by zwzsg
I disagree, and think it would be good to have Spring support all TA:K cob commands.

Posted: 21 Oct 2005, 02:23
by SwiftSpear
zwzsg wrote:I disagree, and think it would be good to have Spring support all TA:K cob commands.
Indeed. The new scripts won't replace the old ones, just give fresh developers much more powerful alternitives. Inclusion of the TA:K cob commands will allow tonnes of old units to be dumped into spring much like the current old units were. Mod makers love units they don't have to fabricate from scratch.

Posted: 22 Oct 2005, 02:00
by BlueIce
Will the new scripts support external model animations?