How would you make it so then if you walked into a ScriptArea, there was a chance 3 different individual things would happen?
Would you have a variable for instance called: "RandomEvent" and basically say:
RandomEvent = 3
AddEntityCollideCallback("Player" , "ScriptArea_1" , "BodyFunc1" , true , 1);
RandomEventFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("corpse_male_1" , true);
AddTimer("tut03", 10, "Timer02");
RandomNumber(3) = RandomEvent ;
}
if RandomNumber == 0
{
Spawn Monster
}
if RandomNumber == 1
{
Put out candles
}
if RandomNumber == 2
{
An Evil Donkey of mass destruction kills you
}
I know a lot of that wasn't actually C++, but if actual functions were used would that work?
Also what would those functions be?