Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | potatobanana |
first sorry for my broken english and thanks for reply.
how can i switch between female and male player?
i dont know to explain it but, i make female(player) that i can customize all part like body/hair/eyes/skin and etc. now i want to switch to male(player) by click male button, which is different hair/body etc. how should i do it?
do i need to do it all in same script then i put all female code under func female_ready() and make other func male_ready() then switch this two. witch is im not sure how to do it.
or should i make other scene and switch between female and male scene?
or there other way like switch load() folder?
i mean like “res://player/female” to "“res://player/male”
this my code
func _ready():
randomize()
hair_ready()
top_ready()
bottom_ready()
skin_ready()
func _process(delta):
hair_rbg_box()
top_rbg_box()
bottom_rpg_box()
skin_RGB_box()
########################hair###################################################################################
func hair_ready():
####### hair display at first play scence#########
$player/hair.set_texture(load("res://player/female/hair/Fhair"+str(randi() % 6 + 1)+".png"))
red = $hairRGB/R/Red_scrollbar.set_value(randi() % 255 + 1)
green = $hairRGB/G/Green_scrollbar.set_value(randi() % 255 + 1)
blue = $hairRGB/B/Blue_scrollbar.set_value(randi() % 255 + 1)
func hair_rbg_box():
#value RGB 255/255 = 0 / 1
red = $hairRGB/R/Red_scrollbar.value / 255
green = $hairRGB/G/Green_scrollbar.value / 255
blue = $hairRGB/B/Blue_scrollbar.value / 255
#display value RGB
$hairRGB/R/Red_scrollbar/value.set_text(str($hairRGB/R/Red_scrollbar.value))
$hairRGB/G/Green_scrollbar/value.set_text(str($hairRGB/G/Green_scrollbar.value))
$hairRGB/B/Blue_scrollbar/value.set_text(str($hairRGB/B/Blue_scrollbar.value))
$player/hair.set_modulate(Color(red,green,blue))
func _on_hairbox_left_pressed():
func _on_hairbox_right_pressed():
func set_player_hair_style():
is male hair also Fhair, or is it Mhair?
p7f | 2019-01-08 17:46
Mhair, should i change both to hair only?
potatobanana | 2019-01-08 18:03