Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

Hi, 

Sorry about this,

Try this:

 integers {
   s_code_1: dynamic_integer {(random(1))}
   s_code_2: dynamic_integer {(random(1))}
   s_code_3: dynamic_integer {(random(1))}
}

Yeah, that works, but it changes on every tick what is against the idea that it should be randomized only on game start.

Yes, dynamic integers are reevaluated every time you reference them.

What you want then is something like this:

integers {
   s_code_1;
   s_code_2;
   s_code_3;
} on_startup {
   : set_integer var = "s_code_1" {(random(1))}
   : set_integer var = "s_code_2" {(random(1))}
   : set_integer var = "s_code_3" {(random(1))}
}

Oh, so this is what the right solution looks like. Thank you.

Glad I could help :-)