jocker-il / JKIL-KnightRider

Factorio mod that plays the Knight rider TV show (tm CBS/Stu phillips) opening theme when player drives the car

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flouting startup lights (flying text above the player)

jocker-il opened this issue · comments

Do I want to add flouting startup lights ?

Power (yellow)
fuel on (yellow)
Min RPM (yellow)
Ignitors (red)

Stolen from "Runspeed" mod:

local function xy_add(p1, p2)
return {x = p1.x + p2.x,
y = p1.y + p2.y}
end

-- put in on_player_driving_changed_state event function
local player = game.players[event.player_index]
local msg = ""
player.surface.create_entity(
{name = "flying-text",
position = xy_add(player.position,{x=-0.5,y=0.2}),
text = msg,
color = {r=1, g=1, b=1}})