Page 2 of 2

Posted: 23 Sep 2006, 23:43
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?

Posted: 23 Sep 2006, 23:47
by zwzsg
yes, rand(min,max)

Posted: 24 Sep 2006, 01:09
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)

Posted: 24 Sep 2006, 07:34
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.

Posted: 24 Sep 2006, 14:40
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.