#How do I make my UI not reset when it switch? Or do i have to use saving?
1 messages · Page 1 of 1 (latest)
Can i look thought the script to see if i can do smth?
Its a bit all over the place, but I can give you a part of the script
assign it to a player variable
On everything?
Because every single image you see there is an individual asset
on the chances
when the chance triggers, the variable sets to 1
Did you even read my questio
yes
The chances got absolutely nothing to do with my problem 💀
u gotta assign it to variable so it doesn't roll again when the ui changes
do u get me?
unless there are more scripts that reset
you can also merge the uis into 1 using layers or generate ui
Maybe these?
is the target mission a variable?
Maybe i should show a demo on a different map with less complicated script
You know what, i have something better
The suspects and names are all variable
How about using data table?
That is actually what i did, but still the same result
weird...
can you show the code used for the target stuff?
Theres the other two but still the same script just different texture
The question still stand, how do i stop the ui from resetting when i switch it?
ui always resets when it is switched
only work around is to use a global variable so the stuff is stored so
if target var = (none) then
[do the random chance things, set this var to the chance thing too]
if target var ≠ (none) then
[add a bunch of if for each of the chance things like
if target var = shirt then do shirt things i guess]
Make it a player var and make the default value something like none
or whatever that is a placeholder for no target
Or i could go the simpler route