Custom unit refuses to fire

Custom unit refuses to fire

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
Pathfinder
Posts: 47
Joined: 26 Jun 2005, 05:02

Custom unit refuses to fire

Post by Pathfinder »

I recently created one of my first units and have gotten it into spring. It moves around but when i tell it to fire it makes no attempt at aiming, it just sits there idle. I have gone through the script and fbi many times and dont see any problems. Im guessing that it is the weapon script but i have no idea if it is set up correctly. help would be appreciated.

Here is the link to the unit

http://www.fileuniverse.com/?p=showitem&ID=1336
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

Try taking out "minbarrelangle=-25;" in the weapon TDF to see if it then works. Also, the weapon ID is irrelevent in spring, "Artillery" is spelled wrong in the unit description, and you have an error in your if statements in FirePrimary() (you have them all set to if(next_barrel1 == 1)). Though the spelling error and that next_barrel thing wouldn't cause the problem, just pointing them out to you.

[edit] Also, you forgot to put in "Buildpic=armslugger.bmp;" in the FBI, and you should also take out the Copyright= line there as well for Spring. Unless they changed Spring to automatically check for all the formats for buildpics rather than only PCX unless specified (which they haven't, as far as I'm aware), you'll need that buildpic line for the buildpic to display. The removal of copyright is just to show we're on a new engine now ;)

And, though you did nothing wrong explicitly wrong here, it is recommended that you follow the "unitname_dead.3do" naming convention for future units. You have it set up correctly, so it doesn't matter that you have it named differently now, it's just easier to work with units when they all follow the same conventions.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

In TA, the model has its origin way off.

The ArmSlugger_weapon.tdf should be put into /Weapons/ not /Weapon/
Post Reply

Return to “Game Development”