Page 52 of 59

Re: Mod Question Repository... Questions come in, answers go out

Posted: 08 Apr 2010, 10:53
by Tobi
bobthedinosaur wrote:Is there a way to limit a repair rate that a 'construction unit' can repair certain units and some not repairing at all?
Not repairing at all: repairable tag

Different repair rate for different types of units will have to be Lua'ed.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 08 Apr 2010, 15:15
by KDR_11k
If you mean different rates from the same constructor on different targets that needs Lua (though it's tied to the TA build time so if you use a custom resource system you can adjust the buildtime without affecting anything outside of repairs). If you just want a constructor to generally repair at a different rate than build there's the repair rate tag. There's also a tag that limits the combined repair speed a bunch of cons can have.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 11 May 2010, 21:38
by raaar
What's the simplest way to prevent transports from loading enemy units?

Re: Mod Question Repository... Questions come in, answers go out

Posted: 12 May 2010, 11:46
by Noruas
Do burnblow torpedos work or not? I am having some problems with making it burnblow.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 12 May 2010, 22:34
by raaar
http://springrts.com/wiki/Weapon_Variables

BurnBlow

The weapon blows up when it reaches the range the target was at when the weapon fired. Only works on plasma (WeaponType=Cannon) weapons and should now work on Missiles. Can be 1 or 0. A common usage is on flak guns.

maybe it still only works on ballistic weapons?

Re: Mod Question Repository... Questions come in, answers go out

Posted: 13 May 2010, 02:06
by bobthedinosaur
test it out and get back to us

Re: Mod Question Repository... Questions come in, answers go out

Posted: 13 May 2010, 17:38
by Noruas
It appears not to work.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 05 Jun 2010, 03:26
by bobthedinosaur
Okay. I know I am doing a couple things wrong trying to get this special attack gadget to work. Any help/ hints would be much appreciated.

edit: old

Re: Mod Question Repository... Questions come in, answers go out

Posted: 05 Jun 2010, 21:08
by thedude
Last time when I tried to make a custom-command-gadget it did not work for me when I tried to use CommandFallback but when I used the AllowCommand function instead it seemed to work.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 07 Jun 2010, 08:47
by bobthedinosaur
Umm, for some reason all of my cegs no longer appear. But I am not getting any errors in the info log, whats the most likely cause of this?

Re: Mod Question Repository... Questions come in, answers go out

Posted: 07 Jun 2010, 16:31
by FLOZi
bobthedinosaur wrote:Umm, for some reason all of my cegs no longer appear. But I am not getting any errors in the info log, whats the most likely cause of this?
broken resources.tdf/lua maybe?

Re: Mod Question Repository... Questions come in, answers go out

Posted: 08 Jun 2010, 02:40
by bobthedinosaur
thats what it was. a duplicate entry, caused it all to not work.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 08 Jun 2010, 02:59
by FLOZi
You could always avoid such issues by automating the process :wink:

Re: Mod Question Repository... Questions come in, answers go out

Posted: 15 Jun 2010, 09:07
by bobthedinosaur
i am an idiot.. note to self look for stray "/"

Re: Mod Question Repository... Questions come in, answers go out

Posted: 16 Jun 2010, 05:19
by bobthedinosaur
unrelated from last post:

can you use some kind of cob id or height measurement to find the unit type that is transporting your unit with out other units that might be nearby to throw off the detection?

Re: Mod Question Repository... Questions come in, answers go out

Posted: 16 Jun 2010, 05:41
by FLOZi
bobthedinosaur wrote:unrelated from last post:

can you use some kind of cob id or height measurement to find the unit type that is transporting your unit with out other units that might be nearby to throw off the detection?
You want to find the unitid of the transporter?

COB:

Code: Select all

#define TRANSPORT_ID              94 // get
lua:

Code: Select all

Spring.GetUnitTransporter 
 ( number unitID ) -> nil | number unitID
edit: Oh, you said unit type. Well with lua it's easy enough to find the type of the given unitid. Cob less so, either using the height or use cob->lua.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 16 Jun 2010, 18:22
by bobthedinosaur
so in cob, i would have to get transport id and do a height check on the same position of the transport to figure it out?

Re: Mod Question Repository... Questions come in, answers go out

Posted: 16 Jun 2010, 21:16
by KDR_11k
There should be a COB ID as well, get the transport's unit ID, then ask for its COB ID

Re: Mod Question Repository... Questions come in, answers go out

Posted: 17 Jun 2010, 00:02
by bobthedinosaur
you can use define COB_ID 100 // get on targets or units other than the unit who's script you are running (currently working with)?

how would that work?
transid = get 94 //TRANSPORT_ID get
if ( goodid == get 100(transid) )
{ do soemthing}

Re: Mod Question Repository... Questions come in, answers go out

Posted: 17 Jun 2010, 07:47
by yuritch
Add this to fbi (or lua if you're using that) of the unit which type you need to detect:

Code: Select all

CobID=99;
Then, when you do get COB_ID(unitid) on that unit, you'll get a 99.
So if you need to detect say ground transport and air transport, you can set all ground transports to CobID=99 and all air transports to CobID=100. Multiple unit types can have same CobID, it's only used for this get COB_ID call AFAIK.

Code: Select all

#define GROUND_TRANS 99
#define AIR_TRANS 100
#define SEA_TRANS 101
...
tmpid=get COB_ID(transid);
if(tmpid == GROUND_TRANS)
{
 foo bar;
}
if(tmpid == AIR_TRANS)
{
 foo bar;
}
if(tmpid == SEA_TRANS)
{
 foo bar;
}
...