as time passes, spring treats errors in mods more strictly. so i guess you just have some errors in the mod that got ignored in the past.. try to fix them. (invalid wreck info seems to be a good hint, for example).
(invalid wreck info seems to be a good hint, for example).
It really isn't. I've not looked at the code recently so it may have changed, but I've gotten that error many times before for varied reasons; none of them ever to do with the units corpse.
(invalid wreck info seems to be a good hint, for example).
It really isn't. I've not looked at the code recently so it may have changed, but I've gotten that error many times before for varied reasons; none of them ever to do with the units corpse.
This error is often when the unitdef didn't load properly in the first place, due to syntax errors usually.
1st: Is there a way to make a unit immobile on creation for a given ammount of time? I have a unit that after it is build it has a deployment animation. Can I force it using cob not to move until the script is finished?
2nd: I m having trouble making the same unit leave track marks. I copied and pasted the fbi part about the tracks from a unit that works (4-5 lines). Then I tried different numbers for TrackOffset but I can't get it to work. Is there anything else I am missing? It may be help telling you that the unit has an extreme footpring of 8 by 16.
// Ideally, MAX_SPEED should be defined in a .h // These three lines make sure it is defined, whether already in a .h or not. #ifndef MAX_SPEED #define MAX_SPEED 75 #endif
static-var remember_max_speed;
Create() { remember_max_speed=get MAX_SPEED; .... while(get BUILD_PERCENT_LEFT)//while under construction { ....// some build animation maybe? sleep ....; // But have at least a sleep, or else Spring will freeze } set MAX_SPEED to 1;// For some reason, setting it to 0 doesn't (or didn't?) work. 1 is small enough you won't see it moving. ... // Your undeploy anim ... set MAX_SPEED to remember_max_speed;// Let it move again }
2) Make all kind of hybrids between the unit that work and the unit that doesn't until you find which trait cause tracks to work or not.
Apparently for the tracks I was missing a rather important line...
Code:
leaveTracks=1;
Having that sorted I got a new problem/question. Is there a way to overlay two different track marks? I have made a unit that has 4 tracks that are not in exact alignment (see pics).
Notice that the front and back tracks are not aligned.
Works fine for the back tracks, but not for the front ones.
and this is the track file i used:
Though not apparent from the pic the mark looks ok for both tracks behind the unit, but I haven't found how to make it start nicely for the front tracks.
Quote:
Quote:
Is there a way
There always is!
I ll rephrase, what is the way to make the front tracks leave a mark correctly?
Joined: 25 Aug 2004, 12:31 Location: Has not played *a in years.
You can't do that in cob alone. Sorry, I've tried. you will either have to make a gadget or do the script in lus, by making it immobile. I didnt know you could set heading. good job yuri
Last edited by bobthedinosaur on 13 Sep 2010, 03:27, edited 1 time in total.
That worked perfectly! At sleep 100 it was doing a spastic move, but at sleep 30 it was completely still.
EDIT: Next question, is there a way to add a second button apart from activate using cob? I need activation for getting lups work ok with airjets of a flying unit and a button to make the unit deploy. Currently I m using the replace unit lua and two different units + cob scripts, but I guess it should be possible to do it with a nice script. If I have to replace my cob with lua can you provide any example units I should have a look at?
Joined: 25 Aug 2004, 12:31 Location: Has not played *a in years.
Question for cob transports. if there a way to choose which unit is being unloaded? it seems like the 1st unit loaded is the first one off which doesnt help if he needs to be the last one off. maybe i could re attach other parts to take their place? this is all done on external attach points.
[ 0] LuaRules::RunCallIn: error = 2, GameStart, [string "LuaRules/Gadgets/game_start.lua"]:68: CreateUnit(): bad unitDef name: leo
The problem is probably outside my current skill-spectrum, but I thought I'd ask just in case: Does anyone know what bad unitDef name: means? I thought leo is fine name for any unit to have. :) Forum search did not help. Can InternalName and UnitName conflict if they are the same? might it be Lua related? point is, I don't know, and hope some can point in the right direction.
[ 0] LuaRules::RunCallIn: error = 2, GameStart, [string "LuaRules/Gadgets/game_start.lua"]:68: CreateUnit(): bad unitDef name: leo
The problem is probably outside my current skill-spectrum, but I thought I'd ask just in case: Does anyone know what bad unitDef name: means?
That it's bad/invalid.
Quote:
I thought leo is fine name for any unit to have. :)
Only if mod maker agrees. unitDef name or unitDef id are used to specify the type of unit you want to create. They are not freely chosen tags. Those names are defined by the mod. E.g. in BA for stumpy you have to use "armstump" or the equivalent unitdef id.
If your mod has a unit named "leo", then look in infolog for other related errors. For example with syntax erros in unit definition files or missing model or textures files the unit won't be loaded and not be available in game.
Joined: 25 Aug 2004, 12:31 Location: Has not played *a in years.
is there a way to make larger units effectively push smaller units out of the way when moving at higher speeds, without stopping the larger units or slowing them down drastically as they push. or are we stuck with this? is this the extent of the push system?
ie: 3x4 unit with a mass of 30000 runs into a 1x1 of 100 at full speed, pushes it out of the way, but has to come to a dead stop
That worked perfectly! At sleep 100 it was doing a spastic move, but at sleep 30 it was completely still.
EDIT: Next question, is there a way to add a second button apart from activate using cob? I need activation for getting lups work ok with airjets of a flying unit and a button to make the unit deploy. Currently I m using the replace unit lua and two different units + cob scripts, but I guess it should be possible to do it with a nice script. If I have to replace my cob with lua can you provide any example units I should have a look at?
I wrote a toggle gadget that lets you define arbitrary toggle keys for your COB but I don't remember where I used it other than THIS (the mod itself is probably broken now but the script should work).
Users browsing this forum: No registered users and 0 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum