View topic - Mod Question Repository... Questions come in, answers go out



All times are UTC + 1 hour


Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1168 posts ]  Go to page Previous  1 ... 52, 53, 54, 55, 56, 57, 58, 59  Next
Author Message
PostPosted: 30 Aug 2010, 18:41 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
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).


Top
 Offline Profile  
 
PostPosted: 30 Aug 2010, 18:42 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
Quote:
Couldnt find wreckage info dgjeagfab


Tend to be the hardest to debug as that message is usually nonsense. Any other errors in the infolog?


Top
 Offline Profile  
 
PostPosted: 30 Aug 2010, 18:43 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
hoijui wrote:
(invalid wreck info seems to be a good hint, for example).


It really isn't. :P 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.


Top
 Offline Profile  
 
PostPosted: 30 Aug 2010, 20:16 
Cursed Zero-K Developer
User avatar

Joined: 07 Nov 2007, 21:48
Location: Horse
FLOZi wrote:
hoijui wrote:
(invalid wreck info seems to be a good hint, for example).


It really isn't. :P 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.


Top
 Offline Profile  
 
PostPosted: 01 Sep 2010, 22:04 

Joined: 13 Mar 2005, 15:39
Location: Atlas AS7-RS ... thats all
thanks for the input :)

I went through the .fbi files and found the cause. Seems that the new version of spring doesn┬┤t like labs without the YardMap tag nowadays.

After adding that all worked as usual.


Top
 Offline Profile  
 
PostPosted: 09 Sep 2010, 15:12 
User avatar

Joined: 07 Mar 2010, 12:42
Two questions:

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.


Top
 Offline Profile  
 
PostPosted: 09 Sep 2010, 15:40 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
1)

Quote:
Is there a way
There always is! Not even one, but several!

Quote:
force it using cob not to move
Code:

// 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.


Top
 Offline Profile  
 
PostPosted: 09 Sep 2010, 16:20 
User avatar

Joined: 07 Mar 2010, 12:42
Thanks for the really fast reply!!
It compiles without any problems but it doesn't stop the unit from moving. I ve pasted the create() part

Code:
Create()
{   
    remember_max_speed=get MAX_SPEED;

    move leg1 to x-axis [13.5] now;
    move leg2 to x-axis [-13.5] now;
    move art_door1 to x-axis [7.5] now;
    move art_door2 to x-axis [-7.5] now;
    move feet1 to y-axis [-3.5] now;
    move feet2 to y-axis [-3.5] now;
    move artbase to y-axis [12.5] now;
    move art_b11 to z-axis [7.5] now;
    move art_b21 to z-axis [7.5] now;
    move art_b31 to z-axis [7.5] now;
    move art_b12 to z-axis [20] now;
    move art_b22 to z-axis [20] now;
    move art_b32 to z-axis [20] now;   
    turn arttur to x-axis <-15> now;
    move artside1 to x-axis [5] now;
    move artside2 to x-axis [-5] now;
    while(get BUILD_PERCENT_LEFT)
    {
        sleep 200;
    }   
    Static_Var_1 = 1;
    Static_Var_2 = 1;
    start-script Stop_tur2();
    start-script Stop_tur1();
    spin radar around y-axis speed <-30.000000>;     
    dont-shade tur1_doorb;
    dont-shade tur1_doorf;
    dont-shade tur2_doorb;
    dont-shade tur2_doorf;
    start-script SmokeUnit();
    call-script InitState();   

    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.

    move feet1 to y-axis [0] speed [10];
    move feet2 to y-axis [0] speed [10];
    turn arttur to x-axis <0> speed <60>;
    turn artrot to y-axis <0> speed <60>;
    wait-for-turn arttur around y-axis;
    wait-for-turn arttur around x-axis;
    move artside1 to x-axis [0] speed [10];
    move artside2 to x-axis [0] speed [10];
    move art_b11 to z-axis [0] speed [10];
    move art_b21 to z-axis [0] speed [10];
    move art_b31 to z-axis [0] speed [10];
    move art_b12 to z-axis [0] speed [10];
    move art_b22 to z-axis [0] speed [10];
    move art_b32 to z-axis [0] speed [10];   
    wait-for-move art_b32 along z-axis;
    move artbase to y-axis [0] speed [10];
    wait-for-move artbase along y-axis;
    move art_door1 to x-axis [0] speed [10];
    move art_door2 to x-axis [0] speed [10];
    move leg1 to x-axis [0] speed [10];
    move leg2 to x-axis [0] speed [10];
    wait-for-move feet2 along y-axis;
    wait-for-move art_door1 along x-axis;
    wait-for-move leg1 along z-axis;
   
set MAX_SPEED to remember_max_speed;// Let it move again

    set ARMORED to 1;
}


Top
 Offline Profile  
 
PostPosted: 10 Sep 2010, 18:52 
User avatar

Joined: 07 Mar 2010, 12:42
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).

Image
Notice that the front and back tracks are not aligned.

Image
Works fine for the back tracks, but not for the front ones.

and this is the track file i used:
Image

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? :-)


Top
 Offline Profile  
 
PostPosted: 10 Sep 2010, 19:59 
Blood & Steel Developer
User avatar

Joined: 25 Aug 2004, 12:31
Location: Has not played *a in years.
you need to stretch the tracks along the z axis rrr move them forward. I forgot which particular tag it was but i think it is documented in the wiki.


Top
 Offline Profile  
 
PostPosted: 11 Sep 2010, 23:26 
User avatar

Joined: 07 Mar 2010, 12:42
Is there any way to change the turn rate or the turninplace of a unit using cob? I want to make a unit with MAX_SPEED = 1 unable to turn as well.


Top
 Offline Profile  
 
PostPosted: 12 Sep 2010, 18:06 
Blood & Steel Developer
User avatar

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.

Top
 Offline Profile  
 
PostPosted: 12 Sep 2010, 19:21 
Spring 1944 Developer
User avatar

Joined: 11 Oct 2005, 06:18
Location: Ukraine
You CAN do it in cob. Not change the turn rate, but make a unit unable to turn. Like so:
Code:
oldHeading = get HEADING;
while(cannot_turn)
{
   set HEADING to oldHeading;
   sleep 100;
}

This will effectively lock a unit to one direction (100 can be reduced down to 30 = 1 frame if the result doesn't look good).


Top
 Offline Profile  
 
PostPosted: 12 Sep 2010, 20:27 
User avatar

Joined: 07 Mar 2010, 12:42
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?


Top
 Offline Profile  
 
PostPosted: 13 Sep 2010, 03:26 
Blood & Steel Developer
User avatar

Joined: 25 Aug 2004, 12:31
Location: Has not played *a in years.
well I'll be damned. I didn't know you could Set heading. GJ yuri


Top
 Offline Profile  
 
PostPosted: 17 Sep 2010, 16:38 
Blood & Steel Developer
User avatar

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.


Top
 Offline Profile  
 
PostPosted: 23 Sep 2010, 14:16 
User avatar

Joined: 19 Aug 2009, 15:09
Location: Sol 3
[ 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.


Top
 Offline Profile  
 
PostPosted: 23 Sep 2010, 17:04 
Moderator

Joined: 19 May 2009, 20:10
FireStorm_ wrote:
[ 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.


Top
 Offline Profile  
 
PostPosted: 24 Sep 2010, 05:29 
Blood & Steel Developer
User avatar

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


Top
 Offline Profile  
 
PostPosted: 26 Sep 2010, 11:25 
Game Developer
User avatar

Joined: 25 Jun 2006, 07:44
Location: Germany
tyran_nick wrote:
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).


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1168 posts ]  Go to page Previous  1 ... 52, 53, 54, 55, 56, 57, 58, 59  Next

All times are UTC + 1 hour


Who is online

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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.