I could post the whole script if you want more information but what would you add to restrict the hovers banking to a certain degree to keep it from fully flipping over....
#include "sfxtype.h"
#include "exptype.h"
piece base, beam, nanogun, door1, door2, plate, post, wake1,
wake2, wake3, wake4, wake5, wake6, wake7, wake8, turret;
static-var Static_Var_1, Static_Var_2, statechg_DesiredState, statechg_StateChanging, Static_Var_5,
Static_Var_6, Static_Var_7;
// Signal definitions
#define SIG_MOVE 2
BankClerck(Func_Var_1, Func_Var_2, Func_Var_3)
{
while( TRUE )
{
Func_Var_1 = get PIECE_XZ(base);
Func_Var_3 = 0;
if( get XZ_HYPOT(Func_Var_1 - Func_Var_2) >= 163840 )
{
Func_Var_3 = 0 - get XZ_ATAN(Func_Var_2 - Func_Var_1) * 60 / 30;
}
turn base to z-axis Func_Var_3 speed <45.0>;
Func_Var_2 = Func_Var_1;
sleep 300;
}
return (0);
}
WobbleUnit()
{
while( get BUILD_PERCENT_LEFT )
{
sleep 400;
}
while( TRUE )
{
if( Static_Var_7 == 1 )
{
move base to y-axis [1.8] speed [1.0];
}
if( Static_Var_7 == 0 )
{
move base to y-axis [0.8] speed [1.0];
}
Static_Var_7 = !Static_Var_7;
sleep 750;
}
return (0);
}
Create()
{
Static_Var_5 = 1;
Static_Var_2 = 0;
start-script WobbleUnit();
start-script BankClerck();
return (0);
}
Mod Question Repository... Questions come in, answers go out
Moderator: Moderators
Re: Mod Question Repository... Questions come in, answers go out
Need halp, hovers in xta used to turn their whole body relative to how much they are turning and recently since spring release they do barrel roles now, I don't know if its a spring bug but i could use help.
Re: Mod Question Repository... Questions come in, answers go out
Hey - why the straight line smily Tobi ? One bug fixed, good job for KingRaptor to have indirectly reported it :). So well done!
Re: Mod Question Repository... Questions come in, answers go out
That was from before I fixed it 

- KingRaptor
- Zero-K Developer
- Posts: 838
- Joined: 14 Mar 2007, 03:44
Re: Mod Question Repository... Questions come in, answers go out
Much thanks, Tobi!
Re: Mod Question Repository... Questions come in, answers go out
I have a probleme with map features not showing up in "The Cursed". I have noticed that County_Crossing-v06. It works with other games, thus something in the cursed seams to block the map features... 

Re: Mod Question Repository... Questions come in, answers go out
No missing feature error messages in the infolog?
Re: Mod Question Repository... Questions come in, answers go out
Well - yes - sure. But why can't the features be loaded from the map archive when I start the cursed?KDR_11k wrote:No missing feature error messages in the infolog?
Re: Mod Question Repository... Questions come in, answers go out
Maybe the map is calling for Features that aren't physically present- no model meshes or textures.
Re: Mod Question Repository... Questions come in, answers go out
Are they actually part of the map or does the map just try to load BA corpses or something?azaremoth wrote:Well - yes - sure. But why can't the features be loaded from the map archive when I start the cursed?KDR_11k wrote:No missing feature error messages in the infolog?
Re: Mod Question Repository... Questions come in, answers go out
They are included in the map as far as I see... And I tried it with Evolution RTS - features work there - I can't imagine that this game has dependencies for BA.
-
- Posts: 916
- Joined: 27 Jun 2009, 01:32
Re: Mod Question Repository... Questions come in, answers go out
Can anyone give info on the way resurrection is handled:
What determines the time needed for the resurrection and what defines the amount of energy needed while doing so?
What determines the time needed for the resurrection and what defines the amount of energy needed while doing so?
- SanadaUjiosan
- Conflict Terra Developer
- Posts: 907
- Joined: 21 Jan 2010, 06:21
Re: Mod Question Repository... Questions come in, answers go out
I have a quick question. I'm screwing around with very simple Lua animations for some of my buildings, like mex's and power plants, and I want to know if there is a way to make an action repeat in an endless loop (that's not the Spin animation). What I'm wanting is for a part of my mex to move up and down in a slow-mo jackhammer type motion. I looked through what little the wiki had to say on Lua animation, and if it was in there, I didn't see it.
Re: Mod Question Repository... Questions come in, answers go out
DO A BARREL ROLL!SanadaUjiosan wrote:I have a quick question. I'm screwing around with very simple Lua animations for some of my buildings, like mex's and power plants, and I want to know if there is a way to make an action repeat in an endless loop (that's not the Spin animation). What I'm wanting is for a part of my mex to move up and down in a slow-mo jackhammer type motion. I looked through what little the wiki had to say on Lua animation, and if it was in there, I didn't see it.
Or, more usefully, a while loop:
Code: Select all
local function Piston()
while true do
-- Move up command
-- WaitForMove
-- Move down
-- WaitForMove
end
end
function script.Create()
StartThread(Piston)
end
- SanadaUjiosan
- Conflict Terra Developer
- Posts: 907
- Joined: 21 Jan 2010, 06:21
Re: Mod Question Repository... Questions come in, answers go out
While that's totally doing what I'd like it to do, there's a problem.
For whatever reason, the animation quickly begins speeding up, and in a few seconds it's going so fast that my frames hit 1 and the program freezes up. I tested it again, lowering the gamespeed to 0.3, and watched it speed up. It escalates very quickly.
If this is important, I had to take out the --'s you included in the script. When I plugged my own info into what you posted (like the piece name, and the distance and speed and all that), Spring would crash when I tried building one. It'd be fine right up till the moment just before the mex was completed, and then the game would freeze and I had to force quit it.
For whatever reason, the animation quickly begins speeding up, and in a few seconds it's going so fast that my frames hit 1 and the program freezes up. I tested it again, lowering the gamespeed to 0.3, and watched it speed up. It escalates very quickly.
If this is important, I had to take out the --'s you included in the script. When I plugged my own info into what you posted (like the piece name, and the distance and speed and all that), Spring would crash when I tried building one. It'd be fine right up till the moment just before the mex was completed, and then the game would freeze and I had to force quit it.
Re: Mod Question Repository... Questions come in, answers go out
Sounds like you didn't fill in the WaitForMoves correctly, they are all that prevents it from freezing up.SanadaUjiosan wrote:While that's totally doing what I'd like it to do, there's a problem.
For whatever reason, the animation quickly begins speeding up, and in a few seconds it's going so fast that my frames hit 1 and the program freezes up. I tested it again, lowering the gamespeed to 0.3, and watched it speed up. It escalates very quickly.
If this is important, I had to take out the --'s you included in the script. When I plugged my own info into what you posted (like the piece name, and the distance and speed and all that), Spring would crash when I tried building one. It'd be fine right up till the moment just before the mex was completed, and then the game would freeze and I had to force quit it.
- SanadaUjiosan
- Conflict Terra Developer
- Posts: 907
- Joined: 21 Jan 2010, 06:21
Re: Mod Question Repository... Questions come in, answers go out
I checked and my WaitForMoves are correct, as far as I can tell. Here is what the whole script looks like, when it breaks and freezes the game.
Code: Select all
local building = piece "building"
local digger = piece "digger"
local function digger_animation()
while true do
Move (digger, y_axis, -20, 200)
WaitForMove (digger, y_axis)
Move (digger, y_axis, 0, 10)
WaitForMove (digger, y_axis)
end
end
function script.Create()
StartThread(digger_animation)
end
function script.Killed(recentDamage, maxHealth)
return 0
end
Re: Mod Question Repository... Questions come in, answers go out
I guess they aren't sufficient then, stick some Sleeps in too
- SanadaUjiosan
- Conflict Terra Developer
- Posts: 907
- Joined: 21 Jan 2010, 06:21
Re: Mod Question Repository... Questions come in, answers go out
Sleeps fixed it. Thanks a lot.
Re: Mod Question Repository... Questions come in, answers go out
Hmm another bug (instance gets added to UnitScriptEngine multiple times => it ticks more and more times per frame)
Thanks for implicitly reporting it
Thanks for implicitly reporting it

- SanadaUjiosan
- Conflict Terra Developer
- Posts: 907
- Joined: 21 Jan 2010, 06:21
Re: Mod Question Repository... Questions come in, answers go out
lol, awesome! I'm helping the engine!