I'm Confused...
#3533 posted by
ranger on 2025/01/05 15:27:24
can you give example code?
I keep getting the "host error pf precache can only be done in spawn functions?"
regardless of where I put the monster's precache ?
On A Side Note - For Dynamically Spawned Monster Placement We Can Try
#3534 posted by
ranger on 2025/01/05 15:37:00
spawny.origin_x = (0.5 - random())* 2 * 5000; //It's origin is randomized
spawny.origin_y = (0.5 - random())* 2 * 5000;
spawny.origin_z = (0.5 - random())* 2 * 5000;
while((pointcontents(spawny.origin) != CONTENT_EMPTY) && (spawny.aflag < 75))
{
//If the pointcontents of the monster origin is not empty, reset it To a more suitable space. If no space can be found within 75 loops,
//Leave it where it last was placed.
spawny.origin_x = (0.5 - random())* 2 * 5000;
spawny.origin_y = (0.5 - random())* 2 * 5000;
spawny.origin_z = (0.5 - random())* 2 * 5000;
spawny.aflag = spawny.aflag + 1;
}
Jazz Is About All The Notes He's NOT Playing
#3535 posted by
Preach on 2025/01/05 20:03:56
The important part is not where you put the precaches, but REMOVING them from everywhere except worldspawn. If you are really struggling, remove all the precaches of the model until you start getting a different error about a resource NOT being precached. Then add one precache to worldspawn and you should be set.
WOW Thanks! It's Almost Fixed!
#3536 posted by
ranger on 2025/01/08 08:56:49
I didn't realize it was so simple! weird... i swore i did that before and it didn't work...
Ok so I can spawn the monster now and i can see the monster in front of me for a few sec, but then game crashes with "host error pr execute program null function"
Also
#3537 posted by
ranger on 2025/01/08 11:05:33
what controls how high or low a monster can step up/down?
seems they have trouble with stairs & small ledges?