MoveRate?
Moderator: Moderators
Re: MoveRate?
BrakeRate=4;
Acceleration=0.15;
Try to play around with those variable
http://springrts.com/wiki/Units-UnitDefs#Aircraft
Has some useful variable to play around.
Acceleration=0.15;
Try to play around with those variable
http://springrts.com/wiki/Units-UnitDefs#Aircraft
Has some useful variable to play around.
Re: MoveRate?
Thank you for the reply, Karl, what I am trying to do is get some wings to sweep back using some animations in the MoveRate2 call in the COB scripts, and I've not seen any indication that it is getting called at all. I was looking for other MoveRate calls in some of the other aircraft scripts in BA and noticed the armhawk has a barrel roll animation in there. I've not seen any hawk doing a barrel roll either :/ So I was wondering if these even work properly in COB files anymore.
Re: MoveRate?
oh now you say cob :/ well for lua maybe this:
http://answers.springlobby.info/questio ... taking-off
http://answers.springlobby.info/questio ... taking-off
Re: MoveRate?
Yeah, thank you, Knorke. I was really hoping for a cob solution, it is just what every unit in BA uses and is what I'm more familiar with. Is there any means to echo something to the game messages from within the cob? Just so I can place a text message in the MoveRate2 or other MoveRates to see if it gets called at all? Now I'm obsessed with even the hawks not doing barrel rolls
and it is terrible when I don't know how to fix them!

Re: MoveRate?
From COB you can call
get PRINT (a,b,c,d);
where a to d are vars, PRINT should be defined in your standard include, if not, it is 81.
If MoveRate is being called in LUS it is (most probably) being called in COB, and vice versa, although LUS has just one MoveRate(number) instead of MoveRate1(), MoveRate2(), etc.
get PRINT (a,b,c,d);
where a to d are vars, PRINT should be defined in your standard include, if not, it is 81.
If MoveRate is being called in LUS it is (most probably) being called in COB, and vice versa, although LUS has just one MoveRate(number) instead of MoveRate1(), MoveRate2(), etc.
Re: MoveRate?
Thank you, Flozi. Ok, so I set up a static variable to have the value of the corresponding moverate,
MoveRate0()
{
sv = 0;
}
MoveRate1()
{
sv = 1;
}...
and I tried to put a get Print(sv) in the fireprimary function but I'm not seeing any output. what is the syntax I need or am I doing this all wrong?
MoveRate0()
{
sv = 0;
}
MoveRate1()
{
sv = 1;
}...
and I tried to put a get Print(sv) in the fireprimary function but I'm not seeing any output. what is the syntax I need or am I doing this all wrong?
Re: MoveRate?
You could just do:
Code: Select all
#define PRINT 81
MoveRate0() {
get PRINT (0);
}
MoveRate1() {
get PRINT (1);
}
MoveRate2() {
get PRINT (2);
}
Re: MoveRate?
ok, I did get it to output to the chat, but nothing from within the moverates is being output, like the functions aren't being called at all.
I did it as I did above, with the variable being output to chat when the primary is fired. In Create I set the variable to 10, in each moverate I set it to the corresponding number followed with a get PRINT (sv). The only number I'm seeing in chat is 10, and only when the weapon fires. The prints in the MoveRatex() aren't showing and the variable isn't being changed from 10.
I did it as I did above, with the variable being output to chat when the primary is fired. In Create I set the variable to 10, in each moverate I set it to the corresponding number followed with a get PRINT (sv). The only number I'm seeing in chat is 10, and only when the weapon fires. The prints in the MoveRatex() aren't showing and the variable isn't being changed from 10.
Re: MoveRate?
From a quick grep of the engine source, it looks like it is only ever called for gunship type aircraft i.e. those with hoverAttack = true
Re: MoveRate?
well that sucks all the cream out of my coffee 
Thank you for checking that, Flozi. Do you happen to know why all the aircraft weren't included?

Thank you for checking that, Flozi. Do you happen to know why all the aircraft weren't included?
Re: MoveRate?
Not the foggiest. Maybe it was that was in TA or its just a consequence of how different the movetypes are.
You could probably write a gadget to call it as and when you liked.
You could probably write a gadget to call it as and when you liked.