How can I change the speed modifier for all players?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
User avatar
WIZ4
Fast Inserter
Fast Inserter
Posts: 209
Joined: Thu Apr 07, 2016 1:36 pm
Contact:

How can I change the speed modifier for all players?

Post by WIZ4 »

I use this command to increase the speed of players on the server

Code: Select all

/c game.player.character.character_running_speed_modifier = 2
But how do I make a speed modifier that was applied to players who just logged on to the server? How it is done in pvp scenario
My native language is russian. Sorry if my messages are difficult to read.
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: How can I change the speed modifier for all players?

Post by Nexela »

You could set the running speed modifier for each force

for _, force in pairs(game.forces) do
force.character_running_speed_modifier = 2
end
Post Reply

Return to “Gameplay Help”