So I want to make the train with player inside going by itself on cruise speed, which can be add by button "W" to max and "S" to min. Any ideas or suggestions please. Thanks. Or simply how to set the train.acceleration.whatever
P.S. Yeah, thanks guys for a huge help and useful tips! (NO). So i figuered it out by myself. If someone or somehow will need it for future here is a tip. This makes train automatically goes on certain level of speed in a set direction (1 is for none forward direction)
Code: Select all
script.on_event(defines.events.on_tick, function(event)
for _, player in pairs(game.players) do
-- do it every tick (i mean how often.. aka speed)
if game.tick % 10 == 0 then
player.riding_state = {direction=1, acceleration=1};
end
end
end)