#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)

mellow owl
#

When I switch to UI 2 and switch back to UI 1, the script that had happened on UI 1 got reset. How to fix this?

tranquil zodiac
mellow owl
#

Its a bit all over the place, but I can give you a part of the script

agile osprey
mellow owl
#

Because every single image you see there is an individual asset

agile osprey
#

when the chance triggers, the variable sets to 1

mellow owl
agile osprey
mellow owl
#

The chances got absolutely nothing to do with my problem 💀

agile osprey
#

do u get me?

#

unless there are more scripts that reset

tiny cave
mellow owl
agile osprey
mellow owl
#

Yes

#

A lot of things are variable

agile osprey
#

then no

#

those don't reset

mellow owl
#

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

tranquil zodiac
#

How about using data table?

mellow owl
tranquil zodiac
#

weird...

tiny cave
mellow owl
#

The question still stand, how do i stop the ui from resetting when i switch it?

tiny cave
tiny cave
# mellow owl Theres the other two but still the same script just different texture

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

mellow owl
#

Or i could go the simpler route