I want to set the color of cars (rather, entities where type == "car") to the color of a certain user -- whether another user is inside that car or not. Is that impossible now? I've tried bothCar/tank color keeps the color of the last user.
Code: Select all
entity.color = game.players[index].color
Code: Select all
entity.last_user = game.players[index]
Color:
Code: Select all
Try to recolor the crawler with color of test
Show car.color: |nil| (nil)
Show game.players[index].name: |test| (string)
Show game.players[index].color:
Printing keys/values for table with length 0
k: r v: 0.81499999761581
k: g v: 0.024000000208616
k: b v: 0
k: a v: 0.5
Executed: car.color = game.players[index].color
Show new car.color: |nil| (nil)
Show car.name: |crawler| (string)
Trying to set last_user
Show car.last_user.name: |Pi-C| (string)
Executed: car.last_user=game.players[index]
Show car.last_user.name: |test| (string)
[*] Guess I misinterpreted that: I thought it would return nil if one used default (i.e. the player colors used by vanilla) instead of custom colors -- now I suppose it's rather that the entity must support the color attribute.