So instead of making hair red, it makes another image red. Is there a way to customly set the id of each image? Or should I just make a separate file for each hair colour?
Forum




How to use imagecolor for same img in diff rounds
1 reply



So instead of making hair red, it makes another image red. Is there a way to customly set the id of each image? Or should I just make a separate file for each hair colour?


NEVER use fixed IDs when working with images. It will go wrong as you noticed. Multiple objects in CS2D are sharing that ID-space so depending on what happens in the game the IDs can and will be different.

1
2
2
image(....) imagecolor(1,255,0,0)

1
2
2
local id = image(....) imagecolor(id,255,0,0)
(of course you have to insert proper parameters for image instead of just "....")



