before i continue, i CAN NOT use radiant for this, my only option is a script change (spawning models etc)
so i need to place a clip that blocks zombies and need to make them walk around, ive already spawned a collision model to block out players from passing through a solid object ive spawned but zombies just walk through this, is there any way to stop this? ive tried changing stuff in asset manager in "special surface properties" but they didnt really seem to do anything. thanks if you can help
you can call disconnectPaths which disconnects the AI Paths that are intersecting the entity which should keep them from walking straight through the object. I'm pretty sure the only reason the "Monster_Clip" works from radiant is because it blocks the navMesh during compiling
Code Snippet
Plaintext
entity DisconnectPaths();
AI have a slight ability to navigate off of the navMesh so it's still possible they might walk through your object depending on how big it is.
If you want scripts / features made for you, then contact me by PM or email / skype etc it will cost you tho so if you have no intention of reciprocating don't even waste my time
This works if the map has script_brushmodels for doors, or clips with script_noteworthy clip (anything made from a script_brushmodel with spawnflags 1) Get the first set of doors and door.targets in zombiemode_blockers_new.gsc door_think(). Thread them to another function thats just a copy of door_think() except when the door/clip is purchased use connectpaths(), then instead of deleting the door or clip Moveto new origin, Disconnectpaths().
This works if the map has script_brushmodels for doors, or clips with script_noteworthy clip (anything made from a script_brushmodel with spawnflags 1) Get the first set of doors and door.targets in zombiemode_blockers_new.gsc door_think(). Thread them to another function thats just a copy of door_think() except when the door/clip is purchased use connectpaths(), then instead of deleting the door or clip Moveto new origin, Disconnectpaths().
im sure there wouldnt be one of the right shape, on top of that one of the items im trying to clip is is the spawn room
nope, really i just need something spawnable thats around the size of the player that disconnects paths Double Post Merge: April 04, 2018, 08:36:11 pmprobably a stupid idea but what if i spawned an invisible zombie inside of the solid object thats invincible and unaffected by powerups etc that just sits there, zombies should try to walk around him and avoid the "solid" object
Last Edit: April 04, 2018, 08:36:11 pm by death_reaper0
This also worked. Spawn a trig with 4 script_origins offset (front back left right). In a loop check if zombie istouching trig, get an array of closest origins to the zombie. 0 will be closest, [1] and [2] should be left and right of the zombies current position, [3] would be the farthest. Zombie notify stop_find_flesh and zombie notify zombie_acquire_enemy, send to origin [1] or [2], thread find_flesh. I would also add a check for the last spot they were so they don't keep going back and forth between the origins but move around the object.
Last Edit: April 05, 2018, 01:39:27 pm by codmoddd1234
it probably didn't work because of this line in the zombie_spawn_init function.
Code Snippet
Plaintext
self.badplaceawareness = 0;
From the description, it won't disconnect the paths but it will help the AI avoid the area if they can.
i set up a loop if a zombie comes close enough to one of these "solid" objects they get the awareness switched to 1 then 0 when theyre away but it doesnt seem to work everytime, some zombies walk into the object then as an attempt to get away will continue through it then chase the player when theyre on the other side. i'll see if i can fine tune it though Double Post Merge: April 05, 2018, 11:38:35 pm
This also worked. Spawn a trig with 4 script_origins offset (front back left right). In a loop check if zombie istouching trig, get an array of closest origins to the zombie. 0 will be closest, [1] and [2] should be left and right of the zombies current position, [3] would be the farthest. Zombie notify stop_find_flesh and zombie notify zombie_acquire_enemy, send to origin [1] or [2], thread find_flesh. I would also add a check for the last spot they were so they don't keep going back and forth between the origins but move around the object.
from what ive seen the thing above seems to do pretty much this with less hassle
Last Edit: April 05, 2018, 11:38:35 pm by death_reaper0