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

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
Ba-
Posts: 16
Joined: 09 Jan 2008, 23:16

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

Post by Ba- »

Few more questions (some lua related?)...
1. Is it possible to spawn features, such as trees?
2. I know the traditional 2 resource system is all spring allows for, but after looking at a mod called Fibre, I am wondering if it is possible to support a hackish 3rd resource without the community pool, similar to what this mod does - also wondering if it is also possible with the community pool? So you have metal, energy, and something else?
3. How do i switch sides on a 'commander' test in spring single player?
4. How many different races can spring support?
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

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

Post by [Krogoth86] »

Ba- wrote:1. Is it possible to spawn features, such as trees?
Do you mean a realtime "spawning" (i.e. they just "pop up" where you want them) or the possibilty to build them?

You've probably seen the latter already als all the Dragon's Teeth Fortifications are just units that immediately "die" and become features this way when built...
Ba- wrote:2. I know the traditional 2 resource system is all spring allows for, but after looking at a mod called Fibre, I am wondering if it is possible to support a hackish 3rd resource without the community pool, similar to what this mod does - also wondering if it is also possible with the community pool? So you have metal, energy, and something else?
Well the limitations on this topic should be your LUA skills... :wink:
Ba- wrote:3. How do i switch sides on a 'commander' test in spring single player?
Type ".cheat" to activate cheat mode. Then use the ".team" command to switch teams - i.e. ".team 0" , ".team 1" , ".team 2" , ".team 3" and so on. If you want to investigate what both sides can build without restarting then do a ".give armcom" or ".give corcom" to get the other's side Commander (in pretty much all TA Mods)...
Ba- wrote:4. How many different races can spring support?
I don't know if there is a limit to this at all (i.e. a reasonable limit you could possibly reach). If you want a demo of many "races" try the Commander Shooter where each Commander you can play has its own race...
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

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

Post by [Krogoth86] »

I've got a question concerning the TA buildpics we now all know from BA for example (but I think they originally were made by Caydr for AA). Do you know how they were made (i.e. on which maps)?

Well - if they were made by screenshots on some maps at all because I remember that there was a posting quite some time ago (from Noize I think) where he posted the Link to an archive with background pictures. I don't know if that were those backgrounds from the buildpics and the search function also didn't help me (maybe it had been on TBFITW anyway)...

I'd be glad if you could help me with that because I'd like to have my new units fit into the existing picture set...
Ba-
Posts: 16
Joined: 09 Jan 2008, 23:16

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

Post by Ba- »

Yes, I did mean 'pop-up' randomly on the map (or you specify where they go).
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

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

Post by [Krogoth86] »

Well trees etc. are premade things that are placed on the map. The only way to bring them ingame manually would be making them a "unit" and either cheating them in or building them just like Dragon's Teeth...

Although with LUA you could do this without cheating and you also could make the trees being planted on a random basis after selecting an area for this. But why would you want this?
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

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

Post by bobthedinosaur »

is there any way to modify weapon tags with out altering the weapon for all units?
ie: i have 2 different types of units both with 1 same weapon, but 1 has alterations to that weapon (via lua/tags what ever), but those modifications do not alter the other unit's weapon tags
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

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

Post by Pxtl »

I'm pretty sure you have to give them seperate weapons there.
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

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

Post by bobthedinosaur »

yah. i geuss so, was just trying to see if i could be lazy with races using similar weapons.

okay, is there a way i can have a unit that can measure the range to target, i want it to be able to check if the target is say about 300 (weapon range units) away it can trigger somthing in the script, how would that look?
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

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

Post by [Krogoth86] »

I'd do a fake weapon which triggers something when having "fired" or a positive aiming solution...
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 »

It is possible to change at least weapon reload and accuracy on a unit by unit basis. As with anything else that the engine already changes on a unit by unit basis (for stuff like experience).
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 »

bobthedinosaur wrote:okay, is there a way i can have a unit that can measure the range to target, i want it to be able to check if the target is say about 300 (weapon range units) away it can trigger somthing in the script, how would that look?
You'll need to target the thing with one of your weapons first. Then you can use BOS get TARGET_ID(weaponNumber) command to read the ID of targetted unit (it returns negative values if weapon's target isn't a unit). After that you use get UNIT_XZ(targetUnitId) to get its coords, then calculating range from that point to your unit XZ coords is trivial. For some units (planes, and generally any units that can be at great height differences to their targets) you may want to include Y coord in range calculation as well.
I'm not sure the result will be in weapon range units (it will be in BOS distance units, I don't remember how those relate to weapon units), so you may need to multiply it by some constant to convert into proper units.
If that sounds too complicated, I can probably write an example piece of code to demonstrate this.
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 keep seeing this "MotionControl(moving, aiming, justmoved)" function in a lot of COB scripts. What does it do? Is it necessary?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

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

Post by Argh »

Yes, it's necessary for a few things, but you want to avoid it if you can. Basically, MotionControl is a never-ending state loop, that checks whether A = TRUE or sets B to TRUE if C is now FALSE.

What do we use this for? Mainly walk-cycles that include arm motions, where we want to interrupt them in order to let aiming conditions happen. However, there are other uses for this concept, such as the script for the Sniper Shell in P.U.R.E., which basically shuts down walking entirely if aiming.

Here's a typical use, in the script for the Heavy Shell. Basically, what I'm doing here is if I'm moving but not aiming, then I want to call Walklegs, not Walk. If I'm not moving, I want to run an animation showing the legs going to a rest position. Pretty simple, really. Two real conditions: 1. Am I aiming? 2. Am I walking?

Code: Select all

MotionControl()
{
	var moving, aiming, just_moved, RandomSeed;
	RandomSeed = rand (100 , 150);
	just_moved = TRUE;

	while (TRUE)
	{
		moving = bMoving;
		aiming = bAiming;

		if (moving)
		{
		
			if (aiming)
			{
				bCanAim = TRUE;			
				call-script WalkLegs();
			}

			if (NOT aiming)
			{
				bCanAim = FALSE;			
				call-script Walk();
			}

			just_moved = TRUE;
		}

		if (NOT moving)
		{
			if (just_moved)
			{
					turn hip to x-axis <0> speed <500>;
					
					turn thigh_l to x-axis <0> speed <500>;
					turn shin_l to x-axis <0> speed <500>;
			
					turn thigh_r to x-axis <0> speed <500>;
					turn shin_r to x-axis <0> speed <500>;
			
					move hip to y-axis [0] speed [200];		

				just_moved = FALSE;
			}
			sleep RandomSeed;
		}
	}
}
The crucial variable, for performance and beauty purposes, and the reason you want to avoid having to use a MotionControl-like script if at all possible, is RandomSeed, the value I'm using to sleep between checks. If it's too long, it'll be obvious to players, when the robot stops moving, that it's not responding yet, and it'll look bad. Too short, though, is bad, because then the script is calling a lot of stuff every frame- at least a couple of static-var checks, but the bigger deal is re-running that stop-moving animation again and again (even if it "does nothing", it still has to figure out that it's "already there" each time it runs, which isn't cheap).

I've done other approaches, where a static-var cuts to a different IF/THEN within a walk-cycle. However, this tends to be the most reliable for most things, and it's easy to set up, once you understand what it's for.
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

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

Post by bobthedinosaur »

so what would a
get UNIT_XZ(targetUnitId) to get its coords, then calculating range from that point to your unit XZ coords
calc look like

would it be a x=x2-x1, z=2-z1, y=y2-y1
sqrt((sqrt(z^2+x^2))+y^2)
rr something like that that the cob script wouldnt mind?
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

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

Post by rattle »

Code: Select all

distance = get UNIT_XZ(get MY_ID) - get UNIT_XZ(get TARGET_ID(0));
if (distance < 0) distance = 0 - distance;
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

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

Post by Evil4Zerggin »

Is there a way to get a value out of a function without using static variables? Like writing a function that gives you the absolute value of a number?
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 »

rattle wrote:

Code: Select all

distance = get UNIT_XZ(get MY_ID) - get UNIT_XZ(get TARGET_ID(0));
distance = get XZ_HYPOT(distance);
Fixed the code a bit. You need to use XZ_HYPOT on the value, else it means not the distance, but something entirely different.
Also, if you want to include Y coord into the process:

Code: Select all

// XZ distance is calculated in previous code piece
deltaY = get UNIT_Y(get MY_ID) - get UNIT_Y(get TARGET_ID(0));
distance = get HYPOT(distance, deltaY);
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

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

Post by Evil4Zerggin »

There's something strange going on with my code. Scriptor seems to be switching the arguments for RockZ(heading, rock_z) in the following:

[code]//rockz: Evil4Zerggin's unit rocking script for units firing weapons.

/*How to Use:
1. Copy the following to the top of your unit script, below the piecenum declarations. Make sure you replace values where appropriate.


//rockz
#define ROCK_PIECE 0 //piece to rock
#define ROCK_Z_SPEED 3 //number of quarter-cycles per second around z-axis
#define ROCK_Z_DECAY -2 //rocking around z-axis is reduced by this factor each time; should be negative to alternate rocking direction
#define ROCK_Z_MIN <0.5> //if around z-axis rock is not greater than this amount rocking will stop after returning to center
#define SIG_ROCK 2 //signal to prevent multiple rocking
#include "rockz.h"


2. In Create() put the following line:
call-script RockZInit();
3. For each weapon that you want to cause rocking, do the following:
3a. Create a static variable gun_X_yaw.
3b. In AimWeaponX, put the following line before the return(1); line:
gun_X_yaw = heading;
3c. In FireWeaponX or ShotX, put the following line at the end:
start-script RockZInit(rockz, heading);
Note the reversed order of the arguments. Scriptor is a neeb and decided to randomly switch the order of the arguments.
It may be helpful to define ROCK_Z_FIRE_X for your weapons.

More details:
"heading" in the following functions refers to the direction that the weapon was fired in. Use the gun_X_yaw variables for this.
"rockz" determines how far to rock the unit. Currently the unit will be rocked
*/

#ifndef ROCKZ_H
#ifndef ROCKXZ_H
#define ROCKZ_H

#include "calc.h"

static-var ROCKZ_H_ROCK_Z;

RockZInit()
{
ROCKZ_H_ROCK_Z = 0;
}

AddRockZ(heading, rock_z)
{
if (heading < <-120>)
{
ROCKZ_H_ROCK_Z = ROCKZ_H_ROCK_Z - (heading + <180>) / rock_z;
}
else if (heading > <120>)
{
ROCKZ_H_ROCK_Z = ROCKZ_H_ROCK_Z - (heading - <180>) / rock_z;
}
else if (heading < <-60>)
{
ROCKZ_H_ROCK_Z = ROCKZ_H_ROCK_Z - <60> / rock_z;
}
else if (heading > <60>)
{
ROCKZ_H_ROCK_Z = ROCKZ_H_ROCK_Z + <60> / rock_z;
}
else
{
ROCKZ_H_ROCK_Z = ROCKZ_H_ROCK_Z + heading / rock_z;
}
}

RockZ(heading, rock_z)
{
if (heading < <-120>)
{
ROCKZ_H_ROCK_Z = ROCKZ_H_ROCK_Z - (heading + <180>) / rock_z;
}
else if (heading > <120>)
{
ROCKZ_H_ROCK_Z = ROCKZ_H_ROCK_Z - (heading - <180>) / rock_z;
}
else if (heading < <-60>)
{
ROCKZ_H_ROCK_Z = ROCKZ_H_ROCK_Z - <60> / rock_z;
}
else if (heading > <60>)
{
ROCKZ_H_ROCK_Z = ROCKZ_H_ROCK_Z + <60> / rock_z;
}
else
{
ROCKZ_H_ROCK_Z = ROCKZ_H_ROCK_Z + heading / rock_z;
}
call-script Abs(ROCKZ_H_ROCK_Z);
turn ROCK_PIECE to z-axis ROCKZ_H_ROCK_Z speed CALC_H_RESULT * ROCK_Z_SPEED;

//begin signaled portion
signal SIG_ROCK;
set-signal-mask SIG_ROCK;
call-script Abs(ROCKZ_H_ROCK_Z);
while ( CALC_H_RESULT > ROCK_Z_MIN )
{
turn ROCK_PIECE to z-axis ROCKZ_H_ROCK_Z speed CALC_H_RESULT * ROCK_Z_SPEED;
wait-for-turn ROCK_PIECE around z-axis;
ROCKZ_H_ROCK_Z = ROCKZ_H_ROCK_Z / ROCK_Z_DECAY;
call-script Abs(ROCKZ_H_ROCK_Z);
}
turn ROCK_PIECE to z-axis <0> speed ROCK_Z_MIN * ROCK_Z_SPEED;
}

#endif
#endif[/code]


calc.h is as follows:
[code]//calc.h: Calculator header.

#ifndef CALC_H_
#define CALC_H_

static-var CALC_H_RESULT;
//The results of each calculation are stored in CALC_H_RESULT.
//The result remains valid until one of the following occurs:
//1. A sleep or wait statement. Another calculation may occur while the function is sleeping or waiting.
//2. A function call (or start?). The function may conduct a calculation.
//If more permanent storage is needed you should copy the result to another variable.

Abs(x)
{
if (x >= 0)
{
CALC_H_RESULT = x;
}
else
{
CALC_H_RESULT = 0 - x;
}
}

#endif[/code]

This header is currently being used in:
[code]#define TA // This is a TA script

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

piece flare1a, flare1b, flare1c, flare2a, flare2b, flare2c, base, turret1,
turret2, wake1, wake2, barrel1a, barrel1b, barrel1c, barrel2a, barrel2b,
barrel2c;

static-var gun_1, gun_2, gun_1_yaw, gun_2_yaw;

// Signal definitions
#define SIG_AIM 2
#define SIG_AIM_2 4
#define SIG_MOVE 8

// basic weapon behavior
#define RESTORE_DELAY 3000
#define TURRET_PITCH_SPEED <30>
#define TURRET_YAW_SPEED <55>
#define RECOIL_DISTANCE [-2.5]
#define RECOIL_RESTORE_SPEED [1]

// rockz
#define ROCK_PIECE base //piece to rock
#define ROCK_Z_SPEED 3 //how quickly rocking occurs
#define ROCK_Z_DECAY -2 //rocking is reduced by this factor each time; should be negative
#define ROCK_Z_MIN <0.5> //if rock is not greater than this amount rocking will stop
#define SIG_ROCK 16 //signal to prevent multiple rocking
#include "rockz.h"

#define ROCK_Z_FIRE -8 //how much the shot angle is compared to the rock caused (lower = more rock); generally negative

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;
}
return (0);
// Build by COBBLER Ver4.0 Copyright @1998 DIGITAL CONCEPT SOFTWARE (MANU@inext.fr) / http://www.annihilationcenter.com/DCS/
}

Create()
{
hide flare1a;
hide flare1b;
hide flare1c;
hide flare2a;
hide flare2b;
hide flare2c;
call-script RockZInit();
start-script SmokeUnit();
}

RestoreWeapon1()
{
sleep RESTORE_DELAY;
turn turret1 to y-axis <0.000000> speed <55.000000>;
turn turret1 to x-axis <0.000000> speed <30.000000>;
}

RestoreWeapon2()
{
sleep RESTORE_DELAY;
turn turret2 to y-axis <0.000000> speed <55.000000>;
turn turret2 to x-axis <0.000000> speed <30.000000>;
}

StartMoving()
{
signal SIG_MOVE;
set-signal-mask SIG_MOVE;
while( TRUE )
{
emit-sfx 2 from wake1;
emit-sfx 2 from wake2;
sleep 300;
}
}

StopMoving()
{
signal SIG_MOVE;
}

AimWeapon1(heading, pitch)
{
signal SIG_AIM;
set-signal-mask SIG_AIM;
turn turret1 to y-axis heading speed TURRET_YAW_SPEED;
turn turret1 to x-axis <0.000000> - pitch speed TURRET_PITCH_SPEED;
wait-for-turn turret1 around y-axis;
wait-for-turn turret1 around x-axis;
start-script RestoreWeapon1();
gun_1_yaw = heading;
return (1);
}

AimWeapon2(heading, pitch)
{
signal SIG_AIM_2;
set-signal-mask SIG_AIM_2;
turn turret2 to y-axis heading speed TURRET_YAW_SPEED;
turn turret2 to x-axis <0.000000> - pitch speed TURRET_PITCH_SPEED;
wait-for-turn turret2 around y-axis;
wait-for-turn turret2 around x-axis;
start-script RestoreWeapon2();
gun_2_yaw = heading;
return (1);
}

FireWeapon1()
{
gun_1 = 0;
show flare1a;
hide flare1a;
show flare1b;
hide flare1b;
show flare1c;
hide flare1c;
start-script RockZ(ROCK_Z_FIRE, gun_1_yaw);
}

Shot1()
{
++gun_1;
if( gun_1 == 1 )
{
move barrel1a to z-axis RECOIL_DISTANCE now;
move barrel1a to z-axis [0] speed RECOIL_RESTORE_SPEED;
}
if( gun_1 == 2 )
{
move barrel1b to z-axis RECOIL_DISTANCE now;
move barrel1b to z-axis [0] speed RECOIL_RESTORE_SPEED;
}
if( gun_1 == 3 )
{
move barrel1c to z-axis RECOIL_DISTANCE now;
move barrel1c to z-axis [0] speed RECOIL_RESTORE_SPEED;
}
}

FireWeapon2()
{
gun_2 = 0;
show flare2a;
hide flare2a;
show flare2b;
hide flare2b;
show flare2c;
hide flare2c;
start-script RockZ(ROCK_Z_FIRE, gun_2_yaw);
}

Shot2()
{
++gun_2;
if( gun_2 == 1 )
{
move barrel2a to z-axis RECOIL_DISTANCE now;
move barrel2a to z-axis [0] speed RECOIL_RESTORE_SPEED;
}
if( gun_2 == 2 )
{
move barrel2b to z-axis RECOIL_DISTANCE now;
move barrel2b to z-axis [0] speed RECOIL_RESTORE_SPEED;
}
if( gun_2 == 3 )
{
move barrel2c to z-axis RECOIL_DISTANCE now;
move barrel2c to z-axis [0] speed RECOIL_RESTORE_SPEED;
}
}


AimFromWeapon1(piecenum)
{
piecenum = turret1;
}

QueryWeapon1(piecenum)
{
if( gun_1 == 1 )
{
piecenum = flare1a;
}
if( gun_1 == 2 )
{
piecenum = flare1b;
}
if( gun_1 == 3 )
{
piecenum = flare1c;
}
}

AimFromWeapon2(piecenum)
{
piecenum = turret2;
}

QueryWeapon2(piecenum)
{
if( gun_2 == 1 )
{
piecenum = flare2a;
}
if( gun_2 == 2 )
{
piecenum = flare2b;
}
if( gun_2 == 3 )
{
piecenum = flare2c;
}
}

SweetSpot(piecenum)
{
piecenum = base;
}

Killed(severity, corpsetype)
{
hide flare1a;
hide flare1b;
hide flare1c;
hide flare2a;
hide flare2b;
hide flare2c;
if( severity <= 25 )
{
corpsetype = 1;
explode barrel1a type BITMAPONLY | BITMAP1;
explode barrel1b type BITMAPONLY | BITMAP2;
explode barrel1c type BITMAPONLY | BITMAP3;
explode barrel2a type BITMAPONLY | BITMAP4;
explode barrel2b type BITMAPONLY | BITMAP5;
explode barrel2c type BITMAPONLY | BITMAP1;
explode base type BITMAPONLY | BITMAP2;
explode flare1a type BITMAPONLY | BITMAP3;
explode flare1b type BITMAPONLY | BITMAP4;
explode flare1c type BITMAPONLY | BITMAP5;
explode flare2a type BITMAPONLY | BITMAP1;
explode flare2b type BITMAPONLY | BITMAP2;
explode flare2c type BITMAPONLY | BITMAP3;
explode turret1 type BITMAPONLY | BITMAP4;
explode turret2 type BITMAPONLY | BITMAP5;
explode wake1 type BITMAPONLY | BITMAP1;
explode wake2 type BITMAPONLY | BITMAP2;
return (0);
}
if( severity <= 50 )
{
corpsetype = 2;
explode barrel1a type FALL | EXPLODE_ON_HIT | BITMAP1;
explode barrel1b type FALL | EXPLODE_ON_HIT | BITMAP2;
explode barrel1c type FALL | EXPLODE_ON_HIT | BITMAP3;
explode barrel2a type FALL | EXPLODE_ON_HIT | BITMAP4;
explode barrel2b type FALL | EXPLODE_ON_HIT | BITMAP5;
explode barrel2c type FALL | EXPLODE_ON_HIT | BITMAP1;
explode base type BITMAPONLY | BITMAP2;
explode flare1a type FALL | EXPLODE_ON_HIT | BITMAP3;
explode flare1b type FALL | EXPLODE_ON_HIT | BITMAP4;
explode flare1c type FALL | EXPLODE_ON_HIT | BITMAP5;
explode flare2a type FALL | EXPLODE_ON_HIT | BITMAP1;
explode flare2b type FALL | EXPLODE_ON_HIT | BITMAP2;
explode flare2c type FALL | EXPLODE_ON_HIT | BITMAP3;
explode turret1 type BITMAPONLY | BITMAP4;
explode turret2 type SHATTER | BITMAP5;
explode wake1 type FALL | EXPLODE_ON_HIT | BITMAP1;
explode wake2 type FALL | EXPLODE_ON_HIT | BITMAP2;
return (0);
}
corpsetype = 3;
explode barrel1a type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP1;
explode barrel1b type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
explode barrel1c type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3;
explode barrel2a type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
explode barrel2b type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP5;
explode barrel2c type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP1;
explode base type BITMAPONLY | BITMAP2;
explode flare1a type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3;
explode flare1b type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
explode flare1c type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP5;
explode flare2a type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP1;
explode flare2b type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
explode flare2c type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3;
explode turret1 type BITMAPONLY | BITMAP4;
explode turret2 type SHATTER | EXPLODE_ON_HIT | BITMAP5;
explode wake1 type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP1;
explode wake2 type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
}
[/code]

In this file, I have fed the arguments to RockZ in reverse order in order to make it function properly.

Am I doing something wrong, or is Scriptor just being stupid?
Sheekel
Posts: 1391
Joined: 19 Apr 2005, 19:23

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

Post by Sheekel »

Is it possible to modify the existing FPS view so that it gives a 3rd person, follow-behind view?
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

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

Post by [Krogoth86] »

If you just want to have the camera following in 3rd person mode this is possible via choosing the fps camera, selecting a unit and pressing T. An example for the effect is shown in the Razorback scene of THIS TRAILER (at about 1:36)...

If you want a real 3rd person mode with controlling the unit you look at I don't know of any way to achieve that (not considering the "All-Time-Champion" LUA here)...
Locked

Return to “Game Development Tutorials & Resources”