Factories?

Factories?

Post just about everything that isn't directly related to Spring here!

Moderator: Moderators

Locked
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

Factories?

Post by rcdraco »

This is either a fix request, or a free script request.

A few rules:

1. Can't use OTA content.

2. Can't use OTA headers.

3. Try not to use names similar to OTA.

Here is the script:

http://pastebin.ca/792670

Here is the model and texture.

http://www.unknown-files.net/spring/3790/euefac/

Here is the FBI:

Code: Select all

[UNITINFO]
	{
	Name=E-Factory;
	UnitName=euefac;
	BuildCostEnergy=100;
	BuildCostMetal=400;
	BuildTime=10;
	Buildpic=ehcraft.bmp;
	Category=FACTORY;
	Description=Light Factory;
	FootprintX=6;
	FootprintZ=6;
	MaxDamage=4500;
	ObjectName=euefac.s3o;
	Side=EUROPIAN;
	SoundCategory=SOUND;
	TEDClass=PLANT;
	SightDistance=625;
	MovementClass=TANK1;
	MaxSlope=30;
	Builder=1;
	WorkerTime=20;
	YardMap=occcco occcco occcco occcco occcco occcco;
	wpri_badTargetCategory=ANTILASER;
	wspe_badTargetCategory=VTOL;
	BadTargetCategory=ANTILASER;
	ExplodeAs=SMALL_BUILDINGEX;
	SelfDestructAs=SMALL_BUILDING;
	NoChaseCategory=ALL;
	LeaveTracks=0;
	MaxWaterDepth=35;
	SmoothAnim=0;
	idletime=400;
	idleautoheal=10;
	shownanospray=0;
	shownanoframe=0;
	firestandorders=1;
	mobilestandorders=1;
	standingfireorder=2;
	standingmoveorder=2;
	}

tombom
Posts: 1933
Joined: 18 Dec 2005, 20:21

Post by tombom »

So what's the problem?
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

yea

Post by rcdraco »

Pretty much, the factory is open, but it will not build.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

MY factory script dunno if it wikll help.

Code: Select all

#define TA			// This is a TA script

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

piece  factory, shield, nano1, nano2;

static-var  spray, unitviewer, statechg_DesiredState, statechg_StateChanging;

// Signal definitions
#define SIG_ACTIVATE			2



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 factory;
		}
		sleeptime = healthpercent * 50;
		if( sleeptime < 200 )
		{
			sleeptime = 200;
		}
		sleep sleeptime;
	}
}

OpenYard()
{
	set YARD_OPEN to 1;
	while( !get YARD_OPEN )
	{
		set BUGGER_OFF to 1;
		sleep 1500;
		set YARD_OPEN to 1;
	}
	set BUGGER_OFF to 0;
}

CloseYard()
{
	set YARD_OPEN to 0;
	while( get YARD_OPEN )
	{
		set BUGGER_OFF to 1;
		sleep 1500;
		set YARD_OPEN to 0;
	}
	set BUGGER_OFF to 0;
}

Go()
{
	call-script OpenYard();
	set INBUILDSTANCE to 1;
}

Stop()
{
	set INBUILDSTANCE to 0;
	call-script CloseYard();
}

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 Go();
			currentstate = 0;
		}
		if( statechg_DesiredState == 1 )
		{
			call-script Stop();
			currentstate = 1;
		}
	}
	statechg_StateChanging = FALSE;
}

Create()
{
	unitviewer = FALSE;
	spray = factory;
	call-script InitState();
	start-script SmokeUnit();
}

QueryNanoPiece(piecenum)
{
	if( spray == 0 )
	{
		piecenum = nano1;
	}
	if( spray != 0 )
	{
		piecenum = nano2;
	}
	spray = !spray;
}

Demo()
{
	unitviewer = TRUE;
}

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

Deactivate()
{
	signal SIG_ACTIVATE;
	set-signal-mask SIG_ACTIVATE;
	if( !unitviewer )
	{
		sleep 5000;
	}
	set-signal-mask 0;
	start-script RequestState(1);
}

StartBuilding()
{
}

StopBuilding()
{
}

QueryBuildInfo(piecenum)
{
	piecenum = shield;
}

SweetSpot(piecenum)
{
	piecenum = factory;
}

Killed(severity, corpsetype)
{
	if( severity <= 25 )
	{
		corpsetype = 1;
		explode factory type BITMAPONLY | BITMAP1;
		return (0);
	}
	if( severity <= 50 )
	{
		corpsetype = 2;
		explode factory type BITMAPONLY | BITMAP1;
		return (0);
	}
	if( severity <= 99 )
	{
		corpsetype = 3;
		explode factory type BITMAPONLY | BITMAP1;
		return (0);
	}
	corpsetype = 3;
	explode factory type BITMAPONLY | BITMAP1;

}
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

Post by rcdraco »

I said before, I want a free one, aparantely BUGGGER_OFF, and YARD_OPEN aren't used by spring.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Ewww, statechg.h

I suggest you look into the Kernel Panic scripts.
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

really

Post by rcdraco »

I was asking more on the lines of a readible script, I'm making a factory, not a tarantula.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Socket or Window.
tombom
Posts: 1933
Joined: 18 Dec 2005, 20:21

Re: really

Post by tombom »

rcdraco wrote:I was asking more on the lines of a readible script, I'm making a factory, not a tarantula.
What are you talking about? :?
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

yea

Post by rcdraco »

KDR wins, window is super easy.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Post by lurker »

rcdraco wrote:This is either a fix request, or a free script request.

A few rules:

1. Can't use OTA content.

2. Can't use OTA headers.

3. Try not to use names similar to OTA.
Forboding Angel wrote:MY factory script dunno if it wikll help.

Code: Select all

#define TA			// This is a TA script

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

piece  factory, shield, nano1, nano2;

static-var  spray, unitviewer, statechg_DesiredState, statechg_StateChanging;

// Signal definitions
#define SIG_ACTIVATE			2


Demo()
{
	unitviewer = TRUE;
}
:? Is that in Evolution? I'm happy to do scripting for you.
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

no

Post by rcdraco »

now there's a new issue.


The factory will build units, but it has a pause and I can't queue up units...
User avatar
Felix the Cat
Posts: 2383
Joined: 15 Jun 2005, 17:30

Post by Felix the Cat »

This is in off-topic so I will post a picture that I hope will help you with your problem.

Image

Carry on.
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

yea

Post by rcdraco »

It's in off-topic so as not to flood the message boards. The problem has already been solved. Also, Felix, cease and desist, you want to be a jerk do it with PM.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

lurker wrote:
rcdraco wrote:This is either a fix request, or a free script request.

A few rules:

1. Can't use OTA content.

2. Can't use OTA headers.

3. Try not to use names similar to OTA.
Forboding Angel wrote:MY factory script dunno if it wikll help.

Code: Select all

#define TA			// This is a TA script

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

piece  factory, shield, nano1, nano2;

static-var  spray, unitviewer, statechg_DesiredState, statechg_StateChanging;

// Signal definitions
#define SIG_ACTIVATE			2


Demo()
{
	unitviewer = TRUE;
}
:? Is that in Evolution? I'm happy to do scripting for you.
Yar it is. Due to large amounts of copypasta, things like demo and sweetspot tend to get overlooked.

My scripts generally are very not complicated, but if you want to do scripting for it you are welcome to. If you like, I'll give you an invite to svn, just pm me your email addy.
User avatar
Felix the Cat
Posts: 2383
Joined: 15 Jun 2005, 17:30

Re: yea

Post by Felix the Cat »

rcdraco wrote:It's in off-topic so as not to flood the message boards. The problem has already been solved. Also, Felix, cease and desist, you want to be a jerk do it with PM.
Should I choose to interpret that as an invitation to send large numbers of irrelevant pictures of a possibly pornographic nature via PM? :o

Also, lern2skript kthxBAI.
manored
Posts: 3179
Joined: 15 Nov 2006, 00:37

Re: yea

Post by manored »

Felix the Cat wrote:
rcdraco wrote:It's in off-topic so as not to flood the message boards. The problem has already been solved. Also, Felix, cease and desist, you want to be a jerk do it with PM.
Should I choose to interpret that as an invitation to send large numbers of irrelevant pictures of a possibly pornographic nature via PM? :o

Also, lern2skript kthxBAI.
I think he wanted you to interpret that as a invitation to stop anyoing people :)
User avatar
Comp1337
Posts: 2434
Joined: 12 Oct 2005, 17:32

Post by Comp1337 »

is this thread moist
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

Moist and locked. It has served the purpose it was crafted for.
Locked

Return to “Off Topic Discussion”