Throw away units - Page 2

Throw away units

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

User avatar
MrSpontaneous
Posts: 242
Joined: 09 Sep 2005, 22:39

Post by MrSpontaneous »

I saw that, but don't you mean that you could have a unit fire a weapon during its death throws, or immidiatly after being built, as a unit could already be told to do something after it fires a shot, or certain number of shots with a variable :P.

by the way, does the bos/cob scripts have a random number generator?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

yes, rand(min,max)
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Could the random numbers be made to make a random burst fire from 7 to 15 or so? (Using the recent update to fire weapons using scripts)
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Yes, take the random number and store it in a static var, decrease it once per FireWeapon call and make the AimWeapon function return false if the var is zero, then start a script after the value has reached zero that will reset it after the time you want to pass between bursts. The weapon fbi wouldn't give it any burst and have the rate of fire you want it to have during the burst.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Interesting, I have a feeling a soldier would never shoot a whole 30-60 or w/e clip in one go. But spray firing sounds on target. Thanks KDR.
Post Reply

Return to “Game Development”