#8453 posted by necros on 2009/04/16 05:00:07
i think you could haxor the edict number of a trigger_hurt into a monster's .enemy field when building the map, but the monster will just go after it right at map spawn time. this isn't great since the player might not be there yet to see what happens.
you could maybe hide the monster away in a monster closet or something i guess and open it up when the player is in the right spot.
but you can't do anything more complex without changing a fundamental thing about the AI.
specifically, the damage/combat reaction and sight reaction. the only way for a monster to get angry at something else is if it's 'found' via searching (which normally only looks for clients, which is even more selective) or being hurt.
except that when being hurt, all sources except players and monsters (.flags = FL_MONSTER) are discarded. besides, it'd be a cheap hack to make the monster attack a trigger_hurt by first having the trigger 'damage' the monster.
so that leaves sight.
adding it in there wouldn't be a big deal, but you'd need to add it in after searching for players, and then as either a find loop or a findradius.
still, that doesn't really make it useful since if the trigger is in sight, the monster will just go attack it regardless of if the player is around to see it happen.
so what's left would be making some kind of script object that, when triggered, makes the monster angry at a specific entity.
that sounds like the best bet here.
That First Suggestion
#8454 posted by meTch on 2009/04/16 13:42:39
seems like it would work :O im hoping to try and make it similar to this
"""Directly in front of this yawning Polyphemus-door the things were throwing objects - evidently sacrifices or religious offerings, to judge by their gestures. Khephren was their leader; sneering King Khephren or the guide Abdul Reis, crowned with a golden pshent and intoning endless formulae with the hollow voice of the dead. By his side knelt beautiful Queen Nitocris, whom I saw in profile for a moment, noting that the right half of her face was eaten away by rats or other ghouls. And I shut my eyes again when I saw what objects were being thrown as offerings to the fetid aperture or its possible local deity."""
and ill be using zombies, so them dieing shouldn't be a problem
Scripting An Attack
#8455 posted by Preach on 2009/04/16 19:55:27
Ok, here's a hack to make monsters attack an arbitrary entity:
http://www.celephais.net/board/view_thread.php?id=37116&start=74&end=74
All you need to do to adapt it is to change
owner n
on the "attacking" info_notnull so that n is the entity number of whatever you want the monsters to attack. For it to work, you do need to make sure that your monsters don't walk off before getting hit by the trigger, and remember that the player can still attract their aggression later by attacking them.
PS: A word of warning to neg!ke. Make sure you do not fire the targetname pointing to your newly spawnable trigger_teleports more than once. The first time will spawn the trigger_teleport, but the second time will fire the regular teleport "use" function, which will reset self.nextthink and thereby ruin the hack.
Ok
#8456 posted by negke on 2009/04/17 10:00:19
Good to know
Creatures In A Func_train
#8457 posted by Ron on 2009/04/24 09:22:43
Hello,
I've been trying to get a sort of cage with 3 Shalraths (Vores) in it to move around in a func_train, so it's harder to kill them. A nice idea, but the bastards keep falling out even though it's closed and I positioned them inside the cage at the first path_corner. Is it not possible to get creatures on a moving platform without them falling true ? By the way, I'm using Worldcraft 1.6 a.
#8458 posted by JneeraZ on 2009/04/24 11:28:24
I'm trying to think of an id1 map that had monsters on a moving platform but I'm coming up dry. Except for that slow descending lift that spawns the zombies. But even there, the zombies are spawning and falling onto the platform so it's probably not the same thing...
#8459 posted by JneeraZ on 2009/04/24 11:29:06
I've seen monsters use lifts successfully but never, to my memory, a func_train ... dunno! Preach? :)
#8460 posted by negke on 2009/04/24 11:59:53
Check if the cage is large enough - as with the items, there have to be at least 4 units of space (sides; maybe 32-40 above) between the brushes of the train and the monsters' bounding boxes. The bottom of the train has to be big enough, too - their bboxes must not overlap with the edges. Another reason they keep falling though could be holes in the bottom, if it is a grate for example, though then again, I think such things are taken care of in hull 1/2.
#8461 posted by Ron on 2009/04/24 12:56:38
Thanks for your quick replies.
I'd been thinking myself if I've seen it used before and could not remember ever seeing it done. I will try a bigger box and if that doesn't work maybe I'll make the floor move around a bit to get a similar result. Or maybe I'll just think of something else, I'll let you know if it worked. By the way, there are no holes in the bottom, only behind the Vores, but that's closed by a wall over the whole length of the path_corners. They just fall true and then block the "train", resulting in them slowly dying. It's quite humorous to hear them scream, but it was not what I intended ;)
Monsters In Func_train
#8462 posted by spy on 2009/04/24 15:28:09
the vore in hip3m1?
Tip
#8463 posted by Preach on 2009/04/24 19:54:13
I have one quick tip. Make sure that when you place your func_train brushes in the editor, it is positioned so that the lowermost extent exactly on the first path_corner. To find the lowermost extent, consider the smallest bounding box which will surround the entire model. Then take the coordinates of the corner of the box where x, y and z are all smallest. This will make sure the train doesn't get moved when it spawns, which might be getting the vores stuck.
And I'm Assuming
#8464 posted by Lardarse on 2009/04/24 20:21:26
That all other path corners should be placed with the same logic?
Just Tried It
#8465 posted by madfox on 2009/04/24 23:37:41
but as long as the distance between func_train and vormit holds 24 units it rides fine.
http://members.home.nl/gimli/trainvore.zip
Good idea!
Vores On A Train
#8466 posted by robot on 2009/04/25 00:41:00
Yea it does work, just make sure the train is
triggered a little after the vores are spawned
onto the train. So, use a trigger_once for the
train.
Lardarse
#8467 posted by Preach on 2009/04/25 00:50:47
Yeah, the path_corners always indicate the minimum point on the bounding box. The spawn function for a train always "teleports" the func_train to the first path_corner. So you need to place the vores in such a way to anticipate when the train will be once it's been teleported in this way. The easiest way to do that is to already place the brushes in the right place in-editor.
And
#8468 posted by ijed on 2009/04/25 16:12:51
That can help you light the thing better, to stop dark patches etc.
So you can place it wherever you like, where it'll be lit properly, but the paths in the correct place.
That's assuming it doesn't need to carry vores though.
Does
#8469 posted by ijed on 2009/04/26 18:04:45
Anyone have a method for finding a missing enemy?
I've got one left over and can't find him - there's spawning going on so most likely I'm not calling one that is spawned.
I tried reading the .sav but it lists everything - there doesn't seem to be a way to search the correct term.
#8470 posted by JneeraZ on 2009/04/26 18:12:09
Could be a zombie that is knocked down below water and can't get up. I've seen that before.
No Zombies
#8471 posted by ijed on 2009/04/26 18:24:36
That reminds me to put a fix in for stuck zombies though.
#8472 posted by JneeraZ on 2009/04/26 20:03:27
What fix would that be? I had a huge problem with stuck zombies in the warehouse section of White Room.
Func_breakable And Rubble Texture
#8473 posted by Ankh on 2009/04/26 20:05:39
I'm using the func_breakable from qouth. If I set the rubble texture to glass the rubble isn't textured in-game. What could be the cause of this?
Ijed
#8474 posted by spy on 2009/04/26 20:07:15
you should check the save file, look for health value, every dead monster has negative health value[something like this]
"classname" "monster_army"
"model" "progs/soldier.mdl"
....
....
....
"health" "-10.000000"
alive monster will have positive h/val.
Well
#8475 posted by ijed on 2009/04/26 20:08:11
What I have in mind is adding to an unused field for each time the zombie tries and fails to get up, like ammo_shells.
If ammo shells reaches 3 then the zombie gibs itself. If it gets up then it resets ammo_shells to 0.
#8476 posted by JneeraZ on 2009/04/26 20:40:09
Oh, a code solution, OK. I thought there was some map trick you were doing. :)
The Answer
#8477 posted by RickyT33 on 2009/04/26 21:55:35
Email it to AguirRe and ask him ;P
|