Possible to set unit to hold-fire automatically when built?

Possible to set unit to hold-fire automatically when built?

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Possible to set unit to hold-fire automatically when built?

Post by TradeMark »

I think i need to script that in, but thats not an issue, so what kind code i need?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

set STANDINGFIREORDER to 0; ? I heard that works.
User avatar
jackalope
Posts: 695
Joined: 18 Jun 2006, 22:43

Post by jackalope »

set factory to hold fire, problem solved.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Post by TradeMark »

jackalope wrote:set factory to hold fire, problem solved.
But its a building.

STANDINGFIREORDER=0 didnt work...
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Did you put the line KDR mentioned in the Create() function?
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Post by TradeMark »

rattle wrote:Did you put the line KDR mentioned in the Create() function?
OH, that was script :D

lol, i tried to unit fbi file.

Doesnt work.

I used:

Code: Select all

Create()
{
    set STANDINGFIREORDER to 0;	
...
Compiler says: Error (41): Unknown identifier STANDINGFIREORDER
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

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

Post by rattle »

It needs to be defined as well.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Post by TradeMark »

rattle wrote:It needs to be defined as well.
How?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

#include "exptype.h"

I think it's defined there.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

It is.

Code: Select all

#define STANDINGMOVEORDERS	2	// set or get
#define STANDINGFIREORDERS	3	// set or get
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Post by TradeMark »

Cant get working, now that whole unit cant shoot at all :S
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

rts/Sim/Units/COB/CobInstance.cpp:
Doesn't look like it's implemented (empty cases).
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Post by TradeMark »

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

Post by rattle »

Bump. It's commited, so you can use it in 0.75.
Post Reply

Return to “Game Development”