But for some reason it's not being truly random at run time. What I mean is, it seems to get randomized per map session and always in the same order which is really confusing me.
Three scripts do this, and as an example let's say the first script spawns Cacodemons, the second spawns Imps and the third spawns Zombiemen. That's fine, except if I load and try again I get the IDENTICAL order every single time without fail. I can even run script 2 first instead but I still get Cacodemons first.
So I'm trying to make some scripts where a monster will randomly be one of several possible spawn IDs. I set up an array that looks like
int monsters[8] = {T_ZOMBIE, T_SHOTGUY, T_IMP, T_HELLKNIGHT, T_BARON, T_MANCUBUS, T_CACODEMON, T_PAINELEMENTAL};
And then in the script I'm doing
Thing_SpawnFacing(tid, monsters[Random(0, 7)], 0, 0);
But for some reason it's not being truly random at run time. What I mean is, it seems to get randomized per map session and always in the same order which is really confusing me.
Three scripts do this, and as an example let's say the first script spawns Cacodemons, the second spawns Imps and the third spawns Zombiemen. That's fine, except if I load and try again I get the IDENTICAL order every single time without fail. I can even run script 2 first instead but I still get Cacodemons first.
What bullshittery is this?
Share this post
Link to post