|
Posted by metlslime on 2005/08/30 18:28:13 |
You know about the info_notnull explosion hack. You know about making monsters drop weapons or alternate ammo using the .weapon and .ammo_whatever hacks. You know about making items float in the air by spawning them on a temporary platform. Let's have a thread where we talk about new ways to use existing behavior and get novel gameplay. If you're a "retired" mapper, this is a great time to do some armchair level design and suggest ideas you'll never have a chance to use yourself. |
|
|
Thanks
#270 posted by madfox on 2012/05/23 01:06:14
I will try that, I knew it was somewhere.
I Think
#271 posted by Orbs on 2012/05/26 18:20:35
the thing with grenades has already been done:
check sm129_efdat
Is there any way to have a monster jump start deactivated and then switch on when a trigger fires?
Might As Well Not Jump
#273 posted by Preach on 2012/12/10 21:12:53
The usual way of creating a trigger, detailed here among other places:
http://tomeofpreach.wordpress.com/2012/11/18/mid-map-entity-spawning/
This works just fine for trigger_monsterjump.
Healer
#274 posted by mechtech on 2012/12/19 18:17:25
Wiki Page For These Tricks
#275 posted by than on 2013/03/28 13:34:24
has been added here: http://quakewiki.org/wiki/Map_based_hacks
I'm not really very knowledgeable about these hacks as I've only really used the explosion effect before, so please add and modify what I've written.
Also, do I need to get permission to quote stuff from here or even copy it wholesale? I wanted to use Preach's explanation of the explosion, because it is better than my own, but I wasn't sure if he would mind...
Anyway, like I said, please add more stuff to that page and improve what's there.
Just Remembered
#276 posted by than on 2013/03/28 16:00:43
there is some kind of trick to get particle effects to appear on stuff. I've seen it on keys in a couple of maps, and I think I even saw it on a monster before. It could be used to signify a high health monster using the armortype hack.
Anyone know how it works? Is it as simple as adding an effects field or is there something more to it?
#277 posted by - on 2013/03/28 17:14:36
Is it as simple as adding an effects field
Yes-ish
"effects" "1" works well, a bunch of fireflys
"effects" "literally everything else" either makes a giant glowing flicker light, does nothing, or makes more fireflys and flickering light.
Logic Gates
#278 posted by than on 2013/03/29 05:52:26
I already posted this in mapping help, but I think it might be worth putting it in here to...
Quake logic gate tutorial:
http://www.quaketastic.com/upload/files/misc/tutorial_logic.zip
I will add it to the wiki with images soon.
Logic Gates Again
#279 posted by Preach on 2013/05/11 00:53:47
So I wanted to make a post about logic gates, dug up this thread and found the very last post was about...logic gates!
Than: I read through your tutorials and had two ideas. The first was a simpler construction for the "if...else" device - I think it's easier to understand as well as saving an entity, so I thought I'd share. The idea keeps two spikeshooters aiming at the if and else triggers. Set the two shooters up next to each other, then create a single blocking door just large enough to block one of the shooters. Have that door move up and down between the two firing paths, so it blocks one when it is up, and the other when it is down. Diagram:
Up
>.....|�����[+] (if)
>..........�[+] (else)
Down
>..........�[+] (if)
>.....|�����[+] (else)
The other suggestion I have is more radical: replace the trap_spikeshooter with an axe! Less obliquely use an info_notnull with "use" "W_FireAxe". Set the angle of firing with "v_angle" (although since you're free to build the firing range at any angle you might as well choose to fire due north and not bother setting v_angle at all!).
The axe fires an instant hit traceline which starts 16 units above the info_notnull and traces for 64 units. This removes the need to create a stream of spike entities and wait for some number of frames until they score a hit. The axe has a few advantages over the player's other instant hit attacks - it's quieter, needs no ammo, and doesn't require extra entity hacks to set up the angle of attack.
The big appeal of the axe over the spikes in my mind is the instant reaction of it - making the system much more tidy. This leads me onto the discussion I wanted to raise in the first place. For a few days I've been wondering about trying to find a better hack for the doors. The fastest reaction time a door can have is 0.1 seconds. You can get better reaction times turning an input on by having the spike shooter aim near the bottom of the door, which then moves quickly out of the way. However, this is traded against worse reaction time when turning that input back off.
Another issue with doors is that you might actually miss inputs, if a second input comes in too soon after the first and the door is still moving. This might destabilise a complex set-up which 'knows' how many triggers it takes to turn inputs on and off, essentially inverting subsequent inputs. So there are non-aesthetic, if obscure, reasons for wanting an alternative.
What I want to start with is clarifying the way quake logic gates work right now, compared to silicon ones, and make sure it's the right model to use. Silicon logic gates have a continuous stream of electrons pouring into the inputs, and the output stream responds to changes in the inputs with another ongoing stream. The streams from AND gates begin when both inputs are active simultaneously.
The first challenge in converting that into quake entities is that the triggering in quake is instantaneous, not continuous. This means that it doesn't make sense to talk about two triggers occuring at once: only one can fire at a time. So the model we have is that continuous streams are actually represented by entities with state - currently doors - being toggled to indicate a particular input is turned on or off.
That deals with the input. The output needs to work in reverse - a continuous state (the outcome of the logic gate) needs to be converted back into an instantaneous trigger. We do this by querying the current state of the gate - in practical terms by launching our spikes into it and seeing the trigger fire if the gate is open.
That's the theory as far as I can see it - is that more or less what everyone expects from logic gates? Or is there a better way for them to work conceptually - if only we could find the hack to use?
Thanks For That, Preach
#280 posted by than on 2013/05/11 04:01:24
I had no idea you could fire the player's weapons from an info_notnull. That sounds a little more streamlined, although the spikeshooter method works nice if you actually want the system to be visible to the player of course.
The time lag problem is a little bit crap, but it's not the end of the world, since you can move the spikeshooter closer to the trigger if there is too noticeable of a delay. Of course, the axe trick is better since it minimises the delay.
I had thought of the trick to save doors, but I don't think it works if you want a combination of IF/ELSE and AND. In any case, I thought of it after implementing in the tutorial map :/
Trigger_damagethreshold
#281 posted by Preach on 2013/05/11 10:26:41
While working on a new and improved logic gate contraption, I came up with something short and sweet:
http://tomeofpreach.wordpress.com/2013/05/11/trigger_damagethreshold-simulator/
A new hack to get a trigger_damagethreshold in stock quake. Not the most commonly used entity to be honest, but obviously someone went to the trouble of inventing it. Can you see a use for a logic gate?
Omg...
#282 posted by necros on 2013/05/11 16:47:09
That is such a clever idea o_o
Logic Shooters
#283 posted by sock on 2013/05/11 18:13:26
This mostly what I did with my Q3 "Edge of Forever" map. I even wrote a long article explaining some of the logic I built using entities.
Logical Madness
It's Done
#284 posted by Preach on 2013/05/14 00:39:05
Okay, as promised, an alternate logic gate with the emphasis on instant response and being highly obtuse! There is another selling point on offer here though - it has separate targetnames for opening and closing the gate rather than a toggle. This may be desirable if you have many potential sources for the trigger to open or close.
http://tomeofpreach.wordpress.com/2013/05/13/new-logic-gate-design/
This one now uses both of the mini-hacks I've posted about this week. It also went through a fairly big rewrite in the past 24 hours or so. Originally it worked a lot more like traditional logic gates, so the wierd hacky solid-toggling entity only blocked attacks, rather than receiving them as inputs. It relied on a "touch" function for the off switch, which had a potential race condition. The new way with the unusual use of the damagethreshold hack avoids that, and does away with the separate detector entity as well!
And Some More
#285 posted by Preach on 2013/05/16 00:46:10
The second half, where we restore the logic functions to logic gates:
http://tomeofpreach.wordpress.com/2013/05/15/new-logic-gates-part-two/
The AND gate set-up is a bit lazy, I might try and think about a better way. The OR gate is rather cool though, if a bit more fiddly. Finally we have an IF-ELSE patterned after the OR.
Wow
#286 posted by negke on 2013/05/18 12:13:05
Still need to wrap my head around it, but it certainly looks like a new level of awesome! So now functions can be used in classnames as well?! Thanks for sharing your genious.
And well-timed, too, as I was going to post a brain teaser for you which just may have been already partially solved by your latest discoveries.
How would you go about creating a sort of dynamic counter functionality in an edict-efficient way? I mean something like a pot where counts are added and substracted, almost like a monetary system.
For each monster that you kill or item you pick up, a token (for the lack of a better word) is added to the pot, which then, if a sufficient number has been reached, can be used for different actions such as triggering certain evens, unlocking corresponding doors etc. Using it will deplete the pot by the number of tokens required for the specific action.
So for example, there's a bronze door that opens for 10 tokens, a silver door for 20, and a gold door that needs 30. The player can decide whether to spend his earnings right away or save them until he has enough for a better door. Using them substracts the amount from the pot, so it's an exclusive decision. Having 30, it's possible to either open the gold door, or both bronze and silver.
This could be done with a number logic gates and toggleable triggers, but this would be a rather wasteful setup, especially the more complex the system and its options become.
Any ideas? (Bonus points for an additional system to check the current number of tokens in the pot)
What's In A (class)name
#287 posted by Preach on 2013/05/18 12:59:00
Re. money: I have a few thoughts on what might work there but nothing concrete yet. Watch this space...
Thought I'd pick up on something here:
So now functions can be used in classnames as well
Yeah, essentially classnames ARE functions - when an entity is spawned, QC imbues it with a unique behaviour by running the function whose name matches the classname. The function doesn't have to be very special either, as long as it acts on the entity called "self". So you can often run two functions on a hacked entity by pairing an unusual classname with nextthink and think.
InitTrigger is a really great one to use. Pretty much every spawn-function for a trigger sets some fields on self, applies some default values, then calls InitTrigger to actually make it touchable and invisible. If you are trying to hack the behaviour of a particular trigger and need to override a key set by the spawn-function, often you can just set all the fields manually and change the classname to InitTrigger.
Re. Money:
#288 posted by slapmap on 2013/05/18 15:59:04
Hmm maybe code a 'money/buying' system in qc after all. Its getting crazier and harder to implement as a maphack. And I would love to have some more economics in Quake.
Yeah
#289 posted by Preach on 2013/05/18 17:55:28
Well obviously you could do it in qc in three seconds flat, the fun is in the challenge.
#290 posted by lth on 2013/05/18 18:34:07
Can you not have something like a func_plat which is moved up and down as currency accumulates or is spent? (With spikeshooters at various vertical distances, firing horizontally, that are interrupted by the presence of the platform)
Platform
#291 posted by Preach on 2013/05/19 03:21:01
I agree that could work, but it's the ability to move it up and down by arbitrary amounts that's hard. Platforms, doors and buttons all move to absolute coordinates calculated at spawn time. Even with a hacked entity which didn't use those spawn-functions, you'd be moving between the pos1 and pos2 keys, which are fixed.
It does also have the old race condition like logic gates made out of doors. On the one end of thing, having to wait for a few frames before a deposit is made is something a player would never notice or mind. On the other though, you're opening yourself up to a double-spend attack...
#292 posted by negke on 2013/05/19 10:37:42
'Dynamically'-moving funcs can be done by including a caged monster in the entity (hidden from view and sound). It moves with the func and uses the health or invicibility hack. Then it can be blocked by barriers which prevent the entity from moving onto the next stage until they are removed.
Spliting
#293 posted by Preach on 2013/05/19 11:00:19
Yeah, if you can move another entity dynamically you can get a BSP to follow, It's still not enough for an efficient credit system though, because you'd need one more barrier for each credit the player earns.
#294 posted by - on 2013/05/20 01:02:54
http://www.youtube.com/watch?v=YQ6txkumGlM
playing around with trying to make a misc_teleporttrain that isn't MOVETYPE_PUSH (which apparently crashes Quake when telefragging anything except Shub)... I ended up making hologram Quakeguy.
Still no idea how to get this thing to properly move :(
|
|
You must be logged in to post in this thread.
|
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.
|
|