#state no change????

1 messages · Page 1 of 1 (latest)

marble cryptBOT
glass crypt
#
  1. are you 100% sure the code where _state is set is being reached?
  2. is it the same _state variable or maybe you're setting it with the same name in another scope somehow?
#

check directly before and after setting it

#

maybe it's being immediately turned back into free state on the same/next frame

static igloo
#

nvm i fixed it

#

how 2 delete help channel?

slate karma
#

the forum threads are not deleted because they can serve as future help for anyone going forward

#

wanting to delete it is also the same line of thinking that writes "nvm fixed it" :P

#

take that extra moment to give back for whatever effort people may have put into helping you to help others in the future!

teal hawk
#

^ pretty much yup

#

Imma keep this thread around either way shrug

fickle frost
#

what happens if i @everyone again in here ...

tropic tinsel
#

No let the evil win this battle juju...

glass crypt
static igloo
static igloo
#

ok so basically, i was doing some inheritence shenanigans the wrong way

//this is what i did

function playerCharacter() constructor
{
  //bunch of statics with empty code
}

function playerAzul() : playerCharacter() constructor
{
  //these same statics filled with code (bad idea!)
}

this ended up causing some problems, so i had to re-write the code so that all these structs are separate (with no inheritance) so yeah, not the most elegant way to do this but ig it works osakaaaa

static igloo
#

also, i was doing a wrong way to switch states

#

i was using a variable named "_state" within the constructor, that would then change the normal "state" variable within the player object

#

with a combination of these 2, the code looked (a little bit, still messy) cleaner and it also actually worked