News | Forum | People | FAQ | Links | Search | Register | Log in
Mapping Help
This is the place to ask about mapping problems, techniques, and bug fixing, and pretty much anything else you want to do in the level editor.

For questions about coding, check out the Coding Help thread: https://www.celephais.net/board/view_thread.php?id=60097
First | Previous | Next | Last
 
"And you could call it mdo! "

Well, sure, but usable on a Mac. :) 
Thanks Preach 
 
Hax4fax 
I might have asked this before, but didn't get an answer or at least can't find it anymore.

Is it possible to use the activatable trigger hack for teleporters and pushes? It doesn't work the regular way (use classname/touch SUB_Null) and I couldn't get it to work by experimenting with the related fields/functions in triggers.qc, so maybe I missed something important - or does it just not work at all with these two?

A func_door can't have it's owner set to the player (1), or what? Works for all funcs I tested but not simple doors. Is there a work-around, am I just too dumb or do I have to use something else here (train etc)? 
But 
Teleports don't activate until triggered if they have a name - ?

I've experimented with the push before but can't remember how it ended up. 
Triggers Are Wonderful Things 
The thing that makes trigger_teleport and trigger_push fail is that both functions precache sounds during their spawnfunctions, an action which is illegal after the frames begin.

As luck would have it, there is a very easy fix in the case of the trigger_teleport. Set spawnflag 2 on your info_notnull. This is the SILENT flag, which means the file will not be precached. This does mean that you lose the ambient sound of the teleporter, but not the sounds when you actually teleport from it.

trigger_push is not so fortunate, so we have to work a bit harder. What we do is directly set the touch function ourselves, and then make the use function perform the trigger initialisation instead. The only other things that the trigger_push spawnfunction does is precache the sound, and set a default .speed on the entity.

The fields should look like:

use InitTrigger
touch trigger_push_touch
speed 1000


The problem with func_door is that .owner is already used for doors - it points to the master door. Even if you could construct an entity which has all the settings of a door except .owner equal to the player, you'd cause crashes as soon as you tried to open it. So a func_train or func_plat is probably the best bet. 
Thanks 
I didn't think it was that easy. There are other teleporters in the map already, so I assumed the precaching was taken care of. It wasn't supposed to have a sound anyway (and if it had been, a train_wait/noise entity could have done the trick).

The door is supposed to ensure that monsters can walk across seperated platforms - since they're skip-textured, it doesn't really matter which kind of func is used.

ijed: A trigger_teleport with a targetname only teleports if it's triggered (=by the player, unless another hack is used). However, I wanted a cleaner, or let's say, less dirty solution which also allows monsters to be teleported. 
Seems It's Not All That Easy After All 
The trigger_teleport is functional, however, since it has a targetname (inevitably), it has to be fired again in order to trigger the teleportation (like a regular one). I tried InitTrigger and teleport_touch, but to no avail. Is it even possible to have an activatable touch-teleporter with this setup? 
Hmm 
I think you should be able to hack around that it by setting nextthink to 999999, or a similarly large number. Then it should work until that time is reached in-game. I imagine that 999999 seconds is long enough that something else breaks first, so it's a fairly safe, if ugly, hack. 
Yes, That Works. 
And now I finally understand what nextthink in QC. 
 
*does 
Preach 
Issues start happening at 9.7 days, where the floats get big enough lose accuracy at the 0.1 seconds order of magnitude. There are 86400 seconds in a day, so that should be high enough, albeit hacky... 
Lol 
... 
Ok For Real This Time 
would it be possible to get monsters mad at something like a hurt trigger or something [like say zombies] so that they attack it? does what i just typed make sense? anyways, it would be cool if i could do that without mod, using quoth for mod btw :O 
 
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 
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 
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 
Good to know 
Creatures In A Func_train 
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. 
 
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... 
 
I've seen monsters use lifts successfully but never, to my memory, a func_train ... dunno! Preach? :) 
 
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. 
 
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 
the vore in hip3m1? 
Tip 
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 
That all other path corners should be placed with the same logic? 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.