|
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. |
|
|
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 :(
#295 posted by - on 2013/05/20 09:34:45
fyi, figured out how to do what I wanted... MOVETYPE_PUSH is required for a train... but you can bypass the crash if you killtarget the train the moment the enemy you telefrag dies (shub removes the train as well as part of her death functions)
New Article
#296 posted by Preach on 2013/07/22 21:02:27
Here's a map hack article that's been sitting half-finished for months. It's a general article on how to build a trigger_ type entity with very little restriction on the keys you can set.
http://tomeofpreach.wordpress.com/2013/05/13/build-your-own-trigger/
I think most of the regulars who read this thread will know this trick, but hopefully it's a good reference for newer mappers - and there might be some new ideas in the concrete examples of the trick.
I didn't know that trick, cool!
Adding Maximum Ammunition ?
#298 posted by Terminal on 2013/08/12 21:53:17
Maybe A Little Too Terse
#299 posted by Preach on 2013/08/13 06:39:00
Could you clarify, are you looking for a hack which fills all the player's ammunition type (easy to accomplish with backpack_touch), or are you trying to increase the maximum ammo the player can carry (almost certainly impossible)?
Apologies, Yes The Latter.I Wanted A Kind Of Increase Carrying Ammo
#300 posted by Terminal on 2013/08/13 06:57:22
More Ammo
#301 posted by Preach on 2013/08/13 12:33:40
You'll want to write a short mod to do that then, it's outside what hacks will do for you. Also, be warned that not all engines can display ammo counts above 255 properly, which means the scope for expanding nail ammo is limited.
Gameplay Changing Thoughts
can you dynamically change the gravity values?
or set a trigger to change a mobs .target value?
I think one of the expansion packs has a way to do this but it doesn't work in coop
Gravity
#304 posted by Preach on 2013/08/20 12:42:13
You pretty much can't change the gravity with stock quake - there's a way to change it exactly once with a hack if you don't mind that you can't have an exit in your map. It's very common in mods though.
Not sure exactly what you're asking in that second question - you literally want to change the string stored in the target field? It might be better to do what you want with logic gates triggered by the monster instead.
#305 posted by Spike on 2013/08/21 06:32:27
global sv_gravity cvar, if you have a trigger or some such to issue localcmds.
or .gravity field, if you have a trigger to apply that field to entities within its boundaries.
I've no idea how to utilise either of those without a mod to do it for you.
in some engines (ie: ones that always register custom fields, ie: fte+dp), you can override .gravity on a per-entity basis by just setting the gravity field. Of course, as this doesn't apply to players, projectiles, or movetype_step (unless you somehow manage to get them airborne), all it can really be used for is to confuse the fiend+dog+spawn attack code. Which might be amusing.
What Are Some Of The Properties That Can Be Given In The "use"
#306 posted by Terminal on 2014/01/23 22:31:18
Quake Wiki Is Not Working For Me.
#307 posted by Breezeep_ on 2014/01/24 23:29:44
the article text won't show up.
|
|
You must be logged in to post in this thread.
|
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.
|
|