Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how do I get the color of the player's or opponent's icon? #15456

Open
FlintYotube1 opened this issue Sep 1, 2024 · 7 comments
Open

how do I get the color of the player's or opponent's icon? #15456

FlintYotube1 opened this issue Sep 1, 2024 · 7 comments
Labels
help wanted Extra attention is needed

Comments

@FlintYotube1
Copy link

FlintYotube1 commented Sep 1, 2024

Describe your problem here.

I need to get the color of the player icon in HEX for use in scripts, and I dont know how.

Are you modding a build from source or with Lua?

Lua

What is your build target?

Windows x64

Did you edit anything in this build? If so, mention or summarize your changes.

No

@FlintYotube1 FlintYotube1 added the help wanted Extra attention is needed label Sep 1, 2024
@maxxvoiid
Copy link

look, this is for bf (player)

local bfColR = getProperty('boyfriend.healthColorArray[0]')
local bfColG = getProperty('boyfriend.healthColorArray[1]')
local bfColB = getProperty('boyfriend.healthColorArray[2]')
	
local bfColFinal = string.format('%02x%02x%02x', bfColR, bfColG, bfColB)

and for dad (opponent)

local dadColR = getProperty('dad.healthColorArray[0]')
local dadColG = getProperty('dad.healthColorArray[1]')
local dadColB = getProperty('dad.healthColorArray[2]')

local dadColFinal = string.format('%02x%02x%02x', dadColR, dadColG, dadColB)

@FlintYotube1
Copy link
Author

Thanks!

@FlintYotube1
Copy link
Author

I used this script and for some reason the healthbar turned white:<
Снимок экрана 2024-09-13 172821
Снимок экрана 2024-09-13 172913

Смотри, это для парня (игрока)

local bfColR = getProperty('boyfriend.healthColorArray[0]')
local bfColG = getProperty('boyfriend.healthColorArray[1]')
local bfColB = getProperty('boyfriend.healthColorArray[2]')
	
local bfColFinal = string.format('%02x%02x%02x', bfColR, bfColG, bfColB)

и для папы (оппонента)

local dadColR = getProperty('dad.healthColorArray[0]')
local dadColG = getProperty('dad.healthColorArray[1]')
local dadColB = getProperty('dad.healthColorArray[2]')

local dadColFinal = string.format('%02x%02x%02x', dadColR, dadColG, dadColB)

@FlintYotube1
Copy link
Author

I removed the quotes, and it helped

@FlintYotube1
Copy link
Author

but if I want to change the color of any object, then the object turns black
Снимок экрана 2024-09-13 173743

@maxxvoiid
Copy link

you could try something like this doTweenColor('tweenColorObject', 'objectName', dadColFinal, 0.01)

but if I want to change the color of any object, then the object turns black Снимок экрана 2024-09-13 173743

@FlintYotube1
Copy link
Author

you could try something like this doTweenColor('tweenColorObject', 'objectName', dadColFinal, 0.01)

but if I want to change the color of any object, then the object turns black Снимок экрана 2024-09-13 173743

Okay, I'll try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants