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

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
User avatar
Abokasee
Posts: 222
Joined: 03 Nov 2006, 21:51

Post by Abokasee »

How do you get units using a beam weapon, to fire like a fighter aircraft
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Post by Pressure Line »

Abokasee wrote:How do you get units using a beam weapon, to fire like a fighter aircraft
you mean instead of strafing like a brawler? its hoverattack = 0; in the fbi
User avatar
smartie
NOTA Developer
Posts: 146
Joined: 23 Jun 2005, 19:29

Post by smartie »

- Added COB get/set constant CURRENT_FUEL (93)

does anyone know how to use this in a script and get it to compile?
Archangel of Death
Posts: 854
Joined: 28 Jan 2005, 18:15

Post by Archangel of Death »

You'll need to add

Code: Select all

#define CURRENT_FUEL         93
into either your exptype.h or STANDARD_COMMANDS_GPL.h, whichever you have as an include for your bos file, or just add it at the top of your bos file. Its better to add it in the include, since you're probably including it in all your other bos's as well, and you may need it.

Then you will probably want to use something like

Code: Select all

someVariable = get CURRENT_FUEL;
to find out what it is, and

Code: Select all

set CURRENT_FUEL #;
to, you know, set it. I'm not sure if its a % of the total, or its actual amount, but if your unit has more than 100 fuel, that wouldn't take long to figure out.
User avatar
smartie
NOTA Developer
Posts: 146
Joined: 23 Jun 2005, 19:29

Post by smartie »

thx
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Abokasee wrote:How do you get units using a beam weapon, to fire like a fighter aircraft
turret=0

Could you come up with something more than a vague description of your problem?
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Can infantry be able to get if they are cloaking? Via script?

I wanna make them crouch and move 40-60 percent faster if they are cloaked.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

My commander is messed up, could someone help me. It can't be attacked by enemies. That's all that's wrong to my knowledge.

Code: Select all

[UNITINFO]
{
[SFXTypes]
{
ExplosionGenerator0=custom:HelluvaLargeSpray;
}

//Internal settings
	BuildPic=HCOMM.png
	Category=HUMAN GROUND COMMANDER PLANT;
	ObjectName=HCOMM.s3o;
	Side=HUMAN;
	TEDClass=PLANT;
	UnitName=HCOMM;
	
	//Unit limitations and properties
	Commander=1;
	BuildTime=500;
	BuildDistance=50;
	Description=Headquarters;
	MaxDamage=2500;
	Name=Command Center;
	RadarDistance=1500;
	RadarDistanceJam=1000;
	SightDistance=1500;
	SoundCategory=HCOMM;
	WorkerTime=100;
	
	//Energy and metal related
	BuildCostEnergy=5000;
	BuildCostMetal=3000;
	EnergyStorage=500;
	EnergyMake=50;
	MetalMake=10;

	//Pathfinding and related
	FootprintX=13;
	FootprintZ=13;
	MaxSlope=40;
	MaxWaterDepth=20;
	MovementClass=HCOMM;
	yardmap=ooooooooooooo ooooooooooooo ooooooooooooo ooooooooooooo ooooooooooooo ooooooooooooo ooooooooooooo ooooooooooooo ooooocccooooo ooooocccooooo ooooocccooooo ooooocccooooo ooooocccooooo;
	
	//Abilities
	builder=1;
	firestandorders=1;
	StandingFireOrder=2;
	mobilestandorders=1;
	StandingMoveOrder=1;
	CanAttack=1;
	CanGuard=1;
	CanPatrol=1;
	CanStop=1;
	CantBeTransported=1;
	
	//Weapons and related
	SelfDestructCountdown=15;
	Weapon1=HCOMMLAS;
	Weaponmaindir1=0 0 1;
	Maxangledif1=180;
	Weapon2=HCOMMLAS;
	Weaponmaindir2=0 0 -1;
	Maxangledif2=180;
	Weapon3=HCOMMLAS;
	Weaponmaindir3=-1 0 0;
	Maxangledif3=180;
	Weapon4=HCOMMLAS;
	Weaponmaindir4=1 0 0;
	Maxangledif4=180;
	}
If you need anything else let me know >__<
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

Works fine in the latest version, I do believe....though it might have to do with the completely 'o' yardmap (edit: nevermind it wouldn't be that...I got o and c mixed up again >_<)
Last edited by Peet on 27 Jul 2007, 00:59, edited 1 time in total.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Huhmm, I'll see again, and it's not completely o. Look closely.

Not to mention, I gave it a new spiffy model and I gave it a creation animation :mrgreen:

Edit: Nope, you still can't click on it to be attacked...
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

BuildDistance 50?
User avatar
VonGratz
Posts: 471
Joined: 03 May 2005, 05:25

Post by VonGratz »

Snipawolf wrote:My commander is messed up, could someone help me. It can't be attacked by enemies. That's all that's wrong to my knowledge.
Did the units that are trying to hit the comm something that could avoid it?
For example....
OnlyTargetCategory1=NOTAIR;
VonGratz :wink:
Last edited by VonGratz on 27 Jul 2007, 21:16, edited 1 time in total.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Yeah, it builds units inside of it.. I just keep that for when/if I ever need to copy its FBI.. I don't think that would be the issue, though.. I'll go see -__-

No, I haven't touched my categorys yet...


Edit: Changing builddistance had no effect.. Well, time to go digging.. :|
User avatar
KingRaptor
Zero-K Developer
Posts: 838
Joined: 14 Mar 2007, 03:44

Post by KingRaptor »

lawl bump

I want my planes to use fuel to fire (I've got that handled), but not to fly. How?
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

use LuaCOB for ammo checks and set FUEL when out of ammo. that's how I'd do it.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Ehhhh.

What is the define for when you want to emit a weapon? 2048 or 4096?
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Post by Pressure Line »

neither. its 1024 + x. where x is the number of the ceg defined in the unit fbi

*edit, added example code*

eg:
emit-sfx 1024 from flare 1; //emits the '0' numbered ceg from flare 1

emit-sfx 1025 from flare 1; //emits the '1' numbered ceg from flare 1

etc etc.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Dude.. I am not THAT newby.

You can emit weapons as a special effect, and they actually act like weapons, minus guidance or homing.

I am wondering which one it is to do that.
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Post by Pressure Line »

nnow that i did not know ^_^
Locked

Return to “Game Development Tutorials & Resources”