CAR autofire

Place to get help with not working mods / modding interface.
dewast
Inserter
Inserter
Posts: 30
Joined: Wed Apr 13, 2016 9:36 am
Contact:

CAR autofire

Post 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.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: CAR autofire

Post 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.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Koub
Global Moderator
Global Moderator
Posts: 7774
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: CAR autofire

Post 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 ?
Koub - Please consider English is not my native language.
Post Reply

Return to “Modding help”