Page 1 of 1

CAR autofire

Posted: Sat Apr 23, 2016 12:34 pm
by dewast
HI,
I was trying to make car have autofire, like turrets or personal laser, but cant find a proper lua code. Any sugestions or real help.
Thanks.

Re: CAR autofire

Posted: Sat Apr 23, 2016 5:42 pm
by bobingabout
Turrets are designed to be unmanned, personal lasers are just part of a big array, with an unknown quantity, so would be difficult to control.

Cars and tanks on the other hand are designed to be controlled, so their weapons replace those of the player, and act as such.


If you want a car that auto-fires, then you'll likely need to play around with invisible virtual turret entities that are script moved along with the vehicle they're attached to. since they're invisible and virtual, you'll have to use an ammo-less turret, like the worms as a template entity.

Re: CAR autofire

Posted: Sun Apr 24, 2016 7:16 am
by Koub
bobingabout wrote:since they're invisible and virtual, you'll have to use an ammo-less turret, like the worms as a template entity.
I guess you could also script ammo consumption by decreasing the amount of ammo you have, can't you ?