I've been trying to base it off the following script (originally written by Vincent(PDP) and further modified by gwHero and myself) which in its original form does the opposite- that is, spawns actors only in outdoor sectors. I've been trying to find a way to "reverse it" but so far to no avail.
Code: Select all
Script "TreeSpawn" OPEN
{
//The count variable will be how many things you want to spawn. Let's say 64.
For(Int count=64; count>0; count --)
{
Bool Worked = False;
Int Tries = 0; //Amount of times it has tried to spawn a thing
While(Worked == False)
{
Int randX = Random(-3000.0, 3000.0); //All coordinates must end with .0 since they have to be fixed point
Int randY = Random(3000.0, -3000.0);
Int randZ = Random(-32.0, +200.0); //Just some z coords...
If(Spawn("BigTree", randX, randY, randZ, 3000+count, 0))
{
If(CheckActorCeilingTexture(3000+count, "F_SKY1") == True)
{
// Worked = True;
}
Else
{
Thing_Remove(3000+count);
}
}
Tries ++;
If(Tries >= 512) //512
{
Worked = True;
}
}
//delay(1);
}
}