Mod Question Repository... Questions come in, answers go out - Page 24

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

Resources to get you going on your new project, or to help you over some emergent problems during your development cycle.

Moderator: Moderators

Locked
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

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

Post by [Krogoth86] »

Ok - now this is weird:
I did a total copy from BA 6.0 i.e. model, cob-script and FBI and it works. Then I went ahead and edited the costs and buildtime values and it now doesn't work anymore. I didn't change any command or erase a semicolon - I just put different values in there... :?
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

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

Post by yuritch »

You put semicolons after the values, right? Like that:

Code: Select all

BuildCostMetal=1000;
BuildCostEnergy=2000;
Those are important, every value must end with a semicolon (though you can have comments after them).
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

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

Post by [Krogoth86] »

Yeah as I said in the above post I didn't touch anything besides the values and also didn't erase any semicolon (not the first FBI I edit btw :wink: ). I think I'll now go ahead and try to just change one value after the other - maybe I can pin down which change causes the error although I still don't know why it keeps saying the error is in line 1...
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

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

Post by yuritch »

If everything else fails, upload the entire fbi somewhere so we can have a look at it. The problem must be some semicolon placed (or not placed) somewhere in it or something of that nature.
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

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

Post by [Krogoth86] »

Ok - it gets even more funny:
Go ahead and get Balanced Annihilation if you don't have it yet. Extract it and change the metal costs of the corspec into let's say 35. Save, pack it again and try to build or cheat it - it won't work...

Interestingly putting the value back didn't help either... :shock:

EDIT:
Well I've now taken the Spectre FBI from CA and reworked it to be a jammer again. Works fine - no idea what's so bad about the BA FBI... :?
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

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

Post by Evil4Zerggin »

I have a question about play-sound. Following the instructions here, I modified a script as follows (CA Thunder II; see Sounds() and FirePrimary() ):

Code: Select all

#define TA			// This is a TA script

#define PLAY_SOUND 101

#include "sfxtype.h"
#include "exptype.h"

piece  base, jets, wing1, wing2, nose, vertjet1, vertjet2, drop;

static-var  statechg_DesiredState, statechg_StateChanging, firing;


Sounds() {
    play-sound ("Lasrmas2", 10);
}

activatescr()
{
	if( TRUE )
	{
		turn jets to x-axis <0.000000> now;
		turn jets to x-axis <90.021978> speed <62.000000>;
		turn wing1 to y-axis <0.000000> now;
		turn wing1 to y-axis <-90.021978> speed <62.000000>;
		turn wing2 to y-axis <0.000000> now;
		turn wing2 to y-axis <90.021978> speed <62.000000>;
		sleep 1457;
	}
	sleep 6;
	return (0);
	// Build by COBBLER Ver4.0 Copyright @1998 DIGITAL CONCEPT SOFTWARE (MANU@inext.fr) / http://www.annihilationcenter.com/DCS/  
}

deactivatescr()
{
	if( TRUE )
	{
		turn jets to x-axis <90.021978> now;
		turn jets to x-axis <0.000000> speed <62.000000>;
		turn wing1 to y-axis <-90.021978> now;
		turn wing1 to y-axis <0.000000> speed <62.000000>;
		turn wing2 to y-axis <90.021978> now;
		turn wing2 to y-axis <0.000000> speed <62.000000>;
		sleep 1446;
	}
	sleep 4;
}

SmokeUnit(healthpercent, sleeptime, smoketype)
{
	while( get BUILD_PERCENT_LEFT )
	{
		sleep 400;
	}
	while( TRUE )
	{
		healthpercent = get HEALTH;
		if( healthpercent < 66 )
		{
			smoketype = 256 | 2;
			if( Rand( 1, 66 ) < healthpercent )
			{
				smoketype = 256 | 1;
			}
			emit-sfx smoketype from base;
		}
		sleeptime = healthpercent * 50;
		if( sleeptime < 200 )
		{
			sleeptime = 200;
		}
		sleep sleeptime;
	}
}

InitState()
{
	statechg_DesiredState = TRUE;
	statechg_StateChanging = FALSE;
}

RequestState(requestedstate, currentstate)
{
	if( statechg_StateChanging )
	{
		statechg_DesiredState = requestedstate;
		return (0);
	}
	statechg_StateChanging = TRUE;
	currentstate = statechg_DesiredState;
	statechg_DesiredState = requestedstate;
	while( statechg_DesiredState != currentstate )
	{
		if( statechg_DesiredState == 0 )
		{
			call-script activatescr();
			currentstate = 0;
		}
		if( statechg_DesiredState == 1 )
		{
			call-script deactivatescr();
			currentstate = 1;
		}
	}
	statechg_StateChanging = FALSE;
}

Create()
{
	hide drop;
	call-script InitState();
	start-script SmokeUnit();
	firing = 0;
}

Activate()
{
	start-script RequestState(0);
}

Deactivate()
{
	start-script RequestState(1);
}

AimPrimary(heading, pitch)
{
	return (1);
}

FireLoop()
{
  While(firing)
  {
  	emit-sfx 2049 from drop;
  	sleep 25; // Fire density. To fire every frame, this is set to 25, a bit less than the frame length.
  }
}

FirePrimary()
{
	sleep 2165; // Delay before fire. For a burst 2, bursttime 5 bogus bomb, the target point is reached at about 2300.
	GET PLAY_SOUND (0, 655360);
	firing = 1; 
	start-script FireLoop();
	sleep 300; // Duration of burst. The number of frames is roughly (time - 30) * 1000 / 30.
	firing = 0;
	return (0);
}

QueryPrimary(piecenum)
{
	piecenum = drop;
}

AimSecondary(heading, pitch)
{
	return (0);
}

FireSecondary()
{
	return (0);
}

QuerySecondary(piecenum)
{
	piecenum = drop;
}

SweetSpot(piecenum)
{
	piecenum = base;
}

Killed(severity, corpsetype)
{
	if( severity <= 25 )
	{
		corpsetype = 1;
		explode base type BITMAPONLY | BITMAP1;
		explode jets type BITMAPONLY | BITMAP2;
		explode nose type BITMAPONLY | BITMAP3;
		explode vertjet1 type BITMAPONLY | BITMAP4;
		explode vertjet2 type BITMAPONLY | BITMAP5;
		explode wing1 type BITMAPONLY | BITMAP1;
		explode wing2 type BITMAPONLY | BITMAP2;
		return (0);
	}
	if( severity <= 50 )
	{
		corpsetype = 2;
		explode base type BITMAPONLY | BITMAP1;
		explode jets type SHATTER | BITMAP2;
		explode nose type FALL | BITMAP3;
		explode vertjet1 type FALL | BITMAP4;
		explode vertjet2 type FALL | BITMAP5;
		explode wing1 type FALL | BITMAP1;
		explode wing2 type FALL | BITMAP2;
		return (0);
	}
	if( severity <= 99 )
	{
		corpsetype = 3;
		explode base type BITMAPONLY | BITMAP1;
		explode jets type SHATTER | BITMAP2;
		explode nose type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3;
		explode vertjet1 type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
		explode vertjet2 type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP5;
		explode wing1 type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP1;
		explode wing2 type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
		return (0);
	}
	corpsetype = 3;
	explode base type BITMAPONLY | BITMAP1;
	explode jets type SHATTER | EXPLODE_ON_HIT | BITMAP2;
	explode nose type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3;
	explode vertjet1 type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
	explode vertjet2 type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP5;
	explode wing1 type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP1;
	explode wing2 type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
}


However, I'm not hearing anything. How can I make it work?

Thanks in advance.
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

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

Post by [Krogoth86] »

Well I have to do something like this too soon - so:
Have you already tried this?

Code: Select all

GET PLAY_SOUND (0, 655360, 4, 1);
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

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

Post by Evil4Zerggin »

Tried it, still not hearing anything, sorry.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

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

Post by KDR_11k »

#define TA = ignore TAK-only things like play-sound.
El Idiot
Posts: 147
Joined: 01 Feb 2007, 00:58

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

Post by El Idiot »

Quick modding questions:
-No COB<->LUA as of 0.76?
-What's the easiest way to have a self manipulating unit file, and how soon would the effects show up in game?
-Can cob or lua access the in game timer? Or I suppose I could just start a timer in the LUA script.
-What mods can I use as a base to start on without having to worry about permissions?

If none, I suppose I can go back to twiddling my thumbs and playing Dwarf Fortress while I wait for the next version.
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

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

Post by Evil4Zerggin »

I commented out #define TA, but I'm still not hearing anything.
Archangel of Death
Posts: 854
Joined: 28 Jan 2005, 18:15

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

Post by Archangel of Death »

@Evil4Zerggin
In options, it has a default setting to define to, switch that to TAK, or just #define TAK (but I'm not sure if that is the exact spelling it wants).

@El Idiot
1. LuaCob does exist in 0.76.
2. Self-manipulating unit file? Could you explain what you mean a bit more?
3. LuaRules can't really have any timers in it. But once every game frame the engine calls the Update function for every widget and gadget that has one, passing it which frame number it is on. You can use this to time stuff. There are 33 game frames per game second, iirc.
4. If you are just experimenting, anyones mod will do. If you are going to release something, just ask the mod owners/creators first.
El Idiot
Posts: 147
Joined: 01 Feb 2007, 00:58

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

Post by El Idiot »

Could you explain what you mean a bit more?
A reference to an external variable, which it would then recalculate some unit stats based off that.
But once every game frame the engine calls the Update function
That's what I was planning on for a timer already, so yay.
LuaCob does exist in 0.76.
FINALLY
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

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

Post by Evil4Zerggin »

It works! Thanks muchly.
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

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

Post by Evil4Zerggin »

I have another question, this time about fixedlauncher. What I want is a missile that flies straight forward from its launcher until its weapontimer expires, then begins to track its target. Here's what I have:

Code: Select all

  name=Missiles;
  areaofeffect=24;
  burst=8;
  burstrate=0.2;
  collidefriendly=0;
  craterboost=1;
  cratermult=1;
  explosiongenerator=custom:FLASH2;
  firestarter=70;
  fixedlauncher=1;
  guidance=1;
  impulseboost=0;
  impulsefactor=0;
  interceptedbyshieldtype=2;
  lineofsight=1;
  metalpershot=0;
  model=missile;
  noselfdamage=1;
  range=790;
  reloadtime=2;
  rendertype=1;
  selfprop=1;
  smokedelay=0.1;
  smoketrail=1;
  soundhit=xplosml2;
  soundhitvolume=7.5;
  soundstart=rocklit1;
  soundstartvolume=7.5;
  startsmoke=1;
  startvelocity=400;
  //toairweapon=1;
  texture3=none;
  tolerance=9000;
  tracks=1;
  turnrate=36000;
  turret=0;
  twophase=1;
  vlaunch=1;
  weaponacceleration=400;
  weapontimer=1;
  weaponvelocity=800;
What happens is that the missiles don't move at all until the weapontimer expires, and then they fly toward their target. If I don't put in fixedlauncher=1, the missiles seem to execute the desired behavior, except of course that they fire straight upwards at first instead of the direction that the weapon is pointing.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

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

Post by KDR_11k »

What kind of piece are you firing from?
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

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

Post by Evil4Zerggin »

I have it cycling through the 8 fire points on the Core Manticore, which are called rmiss_fire, lmiss_fire, and fireX, for X from 1 to 6.
[code]
#define TA // This is a TA script

#include "sfxtype.h"
#include "exptype.h"

piece ground, pelvis, lleg, rleg, turret, gunbase, rmiss, rmiss_fire,
lmiss, lmiss_fire, flak, flak_fire, fire1, fire2, fire3, fire4,
fire5, fire6;

static-var bMoving, Static_Var_2, gun_3;


walk()
{
while( bMoving )
{
if( bMoving )
{
move pelvis to y-axis [0.000000] now;
move lleg to y-axis [0.000000] now;
move lleg to z-axis [2.000000] now;
move rleg to y-axis [0.000000] now;
move rleg to z-axis [-2.000000] now;
turn pelvis to x-axis <6.000000> now;
turn lleg to x-axis <-6.000000> now;
turn rleg to x-axis <0.000000> now;
sleep 60;
}
if( bMoving )
{
move pelvis to y-axis [-1.000000] now;
move lleg to y-axis [1.000000] now;
move rleg to y-axis [1.000000] now;
turn pelvis to x-axis <5.000000> now;
turn lleg to x-axis <-5.000000> now;
turn rleg to x-axis <1.000000> now;
sleep 30;
}
if( bMoving )
{
move pelvis to y-axis [0.000000] now;
move lleg to y-axis [0.000000] now;
move rleg to y-axis [0.000000] now;
turn pelvis to x-axis <2.000000> now;
turn lleg to x-axis <-2.000000> now;
turn rleg to x-axis <3.000000> now;
sleep 20;
}
if( bMoving )
{
move pelvis to y-axis [0.000000] now;
move lleg to y-axis [0.000000] now;
move rleg to y-axis [0.000000] now;
turn pelvis to x-axis <1.000000> now;
turn lleg to x-axis <-1.000000> now;
turn rleg to x-axis <3.000000> now;
sleep 10;
}
if( bMoving )
{
move pelvis to y-axis [0.000000] now;
move lleg to y-axis [0.000000] now;
move rleg to y-axis [1.000000] now;
move rleg to z-axis [-2.000000] now;
turn pelvis to x-axis <0.000000> now;
turn lleg to x-axis <0.000000> now;
turn rleg to x-axis <0.000000> now;
sleep 60;
}
if( bMoving )
{
move lleg to z-axis [1.000000] now;
move rleg to z-axis [0.000000] now;
sleep 60;
}
if( bMoving )
{
move lleg to y-axis [0.000000] now;
move lleg to z-axis [0.000000] now;
move rleg to z-axis [0.000000] now;
turn pelvis to x-axis <0.000000> now;
turn lleg to x-axis <0.000000> now;
turn rleg to x-axis <0.000000> now;
sleep 60;
}
if( bMoving )
{
move lleg to z-axis [-1.000000] now;
move rleg to z-axis [1.000000] now;
turn rleg to x-axis <-9.000000> now;
sleep 100;
}
if( bMoving )
{
move lleg to z-axis [-1.000000] now;
move rleg to y-axis [0.000000] now;
turn pelvis to x-axis <6.000000> now;
turn rleg to x-axis <-6.000000> now;
sleep 60;
}
if( bMoving )
{
move pelvis to y-axis [0.000000] now;
move lleg to y-axis [1.000000] now;
move rleg to y-axis [1.000000] now;
turn pelvis to x-axis <5.000000> now;
turn lleg to x-axis <1.000000> now;
turn rleg to x-axis <-5.000000> now;
sleep 30;
}
if( bMoving )
{
move pelvis to y-axis [0.000000] now;
move lleg to y-axis [0.000000] now;
move rleg to y-axis [0.000000] now;
turn pelvis to x-axis <2.000000> now;
turn lleg to x-axis <3.000000> now;
turn rleg to x-axis <-2.000000> now;
sleep 20;
}
if( bMoving )
{
move pelvis to y-axis [0.000000] now;
move lleg to y-axis [0.000000] now;
move rleg to y-axis [0.000000] now;
turn pelvis to x-axis <1.000000> now;
turn lleg to x-axis <2.000000> now;
turn rleg to x-axis <-1.000000> now;
sleep 10;
}
if( bMoving )
{
move lleg to y-axis [1.000000] now;
move lleg to z-axis [-2.000000] now;
move rleg to y-axis [1.000000] now;
turn pelvis to x-axis <0.000000> now;
turn lleg to x-axis <0.000000> now;
turn rleg to x-axis <0.000000> now;
sleep 60;
}
if( bMoving )
{
move lleg to z-axis [-1.000000] now;
move rleg to z-axis [0.000000] now;
sleep 60;
}
if( bMoving )
{
move lleg to z-axis [0.000000] now;
move rleg to y-axis [0.000000] now;
move rleg to z-axis [0.000000] now;
turn rleg to x-axis <0.000000> now;
sleep 60;
}
move lleg to z-axis [1.000000] now;
move rleg to y-axis [0.000000] now;
move rleg to z-axis [-1.000000] now;
turn lleg to x-axis <-10.000000> now;
turn rleg to x-axis <0.000000> now;
sleep 100;
}
}

MotionControl(moving, aiming, justmoved)
{
justmoved = TRUE;
while( TRUE )
{
moving = bMoving;
aiming = Static_Var_2;
if( moving )
{
call-script walk();
justmoved = TRUE;
}
if( !moving )
{
if( justmoved )
{
move pelvis to y-axis [0.000000] speed [1.000000];
turn lleg to x-axis <0.000000> speed <200.000000>;
turn rleg to x-axis <0.000000> speed <200.000000>;
if( !aiming )
{
turn turret to y-axis <0.000000> speed <90.000000>;
}
justmoved = FALSE;
}
sleep 100;
}
}
}

SmokeUnit(healthpercent, sleeptime, smoketype)
{
while( get BUILD_PERCENT_LEFT )
{
sleep 400;
}
while( TRUE )
{
healthpercent = get HEALTH;
if( healthpercent < 66 )
{
smoketype = 256 | 2;
if( Rand( 1, 66 ) < healthpercent )
{
smoketype = 256 | 1;
}
emit-sfx smoketype from turret;
}
sleeptime = healthpercent * 50;
if( sleeptime < 200 )
{
sleeptime = 200;
}
sleep sleeptime;
}
}

StartMoving()
{
bMoving = TRUE;
}

StopMoving()
{
bMoving = FALSE;
}

Create()
{
hide fire1;
hide fire2;
hide fire3;
hide fire4;
hide fire5;
hide fire6;
hide flak_fire;
hide lmiss_fire;
hide rmiss_fire;
start-script MotionControl();
start-script SmokeUnit();
bMoving = FALSE;
gun_3 = 0;
turn rmiss_fire to y-axis <180.000000> now;
turn lmiss_fire to y-axis <180.000000> now;
turn fire1 to y-axis <180.000000> now;
turn fire2 to y-axis <180.000000> now;
turn fire3 to y-axis <180.000000> now;
turn fire4 to y-axis <180.000000> now;
turn fire5 to y-axis <180.000000> now;
turn fire6 to y-axis <180.000000> now;
}

SweetSpot(piecenum)
{
piecenum = turret;
}

RestoreAfterDelay()
{
sleep 5000;
set-signal-mask 0;
turn turret to y-axis <0.000000> speed <90.000000>;
turn rmiss to x-axis <0.000000> speed <90.000000>;
turn lmiss to x-axis <0.000000> speed <90.000000>;
}

QueryWeapon2(Func_Var_1)
{
Func_Var_1 = 11;
}

AimFromWeapon2(Func_Var_1)
{
Func_Var_1 = 10;
}

AimWeapon2(heading, pitch)
{
signal 512;
set-signal-mask 512;
turn flak to x-axis <0.000000> - pitch speed <225.000000>;
turn turret to y-axis heading speed <225.000000>;
wait-for-turn flak around x-axis;
wait-for-turn turret around y-axis;
start-script RestoreAfterDelay();
return (1);
}

FireWeapon2()
{
show flak_fire;
sleep 100;
hide flak_fire;
}

QueryWeapon3(piecenum)
{
if (gun_3 == 0)
{
piecenum = fire3;
}
else if (gun_3 == 1)
{
piecenum = fire2;
}
else if (gun_3 == 2)
{
piecenum = rmiss_fire;
}
else if (gun_3 == 3)
{
piecenum = fire1;
}
else if (gun_3 == 4)
{
piecenum = fire4;
}
else if (gun_3 == 5)
{
piecenum = lmiss_fire;
}
else if (gun_3 == 6)
{
piecenum = fire5;
}
else if (gun_3 == 7)
{
piecenum = fire6;
}
}

AimFromWeapon3(Func_Var_1)
{
Func_Var_1 = gunbase;
}

AimWeapon3(heading, Func_Var_2)
{
return (1);
}

FireWeapon3()
{
gun_3 = -1;
}

Shot3()
{
++gun_3;
}

Killed(severity, corpsetype)
{
if( severity <= 25 )
{
corpsetype = 1;
explode ground type BITMAPONLY | BITMAP1;
explode pelvis type BITMAPONLY | BITMAP2;
explode lleg type BITMAPONLY | BITMAP3;
explode rleg type BITMAPONLY | BITMAP4;
explode turret type BITMAPONLY | BITMAP5;
explode gunbase type BITMAPONLY | BITMAP1;
explode rmiss type BITMAPONLY | BITMAP2;
explode lmiss type BITMAPONLY | BITMAP3;
explode flak type BITMAPONLY | BITMAP4;
return (0);
}
if( severity <= 50 )
{
corpsetype = 2;
explode ground type FALL | BITMAP1;
explode pelvis type FALL | BITMAP2;
explode lleg type FALL | BITMAP3;
explode rleg type FALL | BITMAP4;
explode turret type FALL | BITMAP5;
explode gunbase type BITMAPONLY | BITMAP1;
explode lmiss type FALL | BITMAP2;
explode rmiss type BITMAPONLY | BITMAP3;
explode flak type FALL | BITMAP4;
return (0);
}
if( severity <= 99 )
{
corpsetype = 3;
explode ground type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP1;
explode pelvis type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
explode lleg type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3;
explode rleg type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
explode turret type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP5;
explode gunbase type BITMAPONLY | BITMAP1;
explode rmiss type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
explode lmiss type BITMAPONLY | BITMAP3;
explode flak type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
return (0);
}
corpsetype = 3;
explode ground type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP1;
explode pelvis type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
explode lleg type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3;
explode rleg type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
explode turret type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP5;
explode gunbase type SHATTER | EXPLODE_ON_HIT | BITMAP1;
explode rmiss type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
explode lmiss type BITMAPONLY | BITMAP3;
explode flak type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
}
[/code]
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

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

Post by Pressure Line »

Evil4Zerggin wrote:

Code: Select all

  turret=0;
may be the offending tag...
Archangel of Death
Posts: 854
Joined: 28 Jan 2005, 18:15

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

Post by Archangel of Death »

El Idiot wrote:A reference to an external variable, which it would then recalculate some unit stats based off that.
I think I'm getting some idea of what you want.
LuaRules and LuaCob can access and alter any field of a unit's unitdef (the fbi after loading). I think the results might be fairly instant from what I've heard, but haven't actually tried it yet. At latest they would affect units created after the change.
All 4 lua sections (Rules, Cob, UI, and Gaia) are capable of loading data from external files, though I'm not sure of the particulars of that either.
I also think the new mod options are linked into lua somehow (just because everything else is), but I didn't even catch the discussion for those to be sure.
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

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

Post by Evil4Zerggin »

Pressure Line wrote:
Evil4Zerggin wrote:

Code: Select all

  turret=0;
may be the offending tag...
It doesn't work with it set to 1 either.
Locked

Return to “Game Development Tutorials & Resources”