Hello everyone.
In the last few days I have created a mod that adds the Brutus, a car with the driver visible. Right now I am modeling the driver. My plan is to use the color layer (the one with "apply_runtime_tint = true") to add the driver if a player is actually in the car. However - I think since .18 - the color stays after the player exits. Now this would of course mean that the driver stays visible after the player exits which is what I obviously don't want to happen.
Is there a flag I can set to reverse this behaviour? If not, is there a way to do it with some runtime code?
Yours, Flo
How to reset the color of a car after player exits?
Re: How to reset the color of a car after player exits?
Maybe place fake character with standard color to the passenger seat and remove them.
Re: How to reset the color of a car after player exits?
See here. I use this feature in GCKI to set the vehicle color back to it's "owner's" color when somebody else has used and left a vehicle that "belongs" to somebody else:
Code: Select all
if vehicle.valid then
vehicle.color = game.players[owner].color
[…]
end
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: How to reset the color of a car after player exits?
Just set the color back to the empty color:SirFloIII wrote: ↑Tue Apr 07, 2020 11:50 pmHello everyone.
In the last few days I have created a mod that adds the Brutus, a car with the driver visible. Right now I am modeling the driver. My plan is to use the color layer (the one with "apply_runtime_tint = true") to add the driver if a player is actually in the car. However - I think since .18 - the color stays after the player exits. Now this would of course mean that the driver stays visible after the player exits which is what I obviously don't want to happen.
Is there a flag I can set to reverse this behaviour? If not, is there a way to do it with some runtime code?
Yours, Flo
Code: Select all
car.color = {0,0,0,0}
Re: How to reset the color of a car after player exits?
I see. I didn't realize I could set the color to 0 alpha and thought I had to turn this off via another bool or something.
Thank you very much!
Yours, Flo
Thank you very much!
Yours, Flo