Tuesday, March 11, 2014

The following is the changelog for the scripts and objects I built for level construction. I made them with the intention of exposing as much needed behavior and abilities for the level designers without them ever having to touch a line of code.


5:40 PM 1/21/2014

James Ensley



Added:


- Retooled pressure plates so you could throw an object at them in unity, rather than have to monitor
their progress in the level script. You can now do either. This is intended to ease level design, and make
things a lot more plug-n'-play. Currently the only thing this modifies is movers.

- Added movers. Movers require a target, and this target can be anything. When the timer runs up, it'll start
moving towards the target at the speed you set. "stuttering" is for a visual affordance to players that the object
is about to move.

I'm calling them "movers" rather than just "wall movers" as originally intended, because they can be used in any direction.
Note that if it's too fast, or moves too far (hence stutterMaxDist) it /will/ clip right through players and enemies,
and there's not much I can do about that.



To use pressure plates, just make a primative (or, later, do this with a mesh), throw the Pressure Plate script
at it, then make sure "Is Trigger" is checked in the Box Collider component. Movers

Anything with bActive == false does not activate or do anything until it bActive == true. Pressure plates are
currently the only way to activate an object with bActive set to false, though you could also do so in level
scripts.



5:48 PM 1/23/2014


- Renamed "pressure plates" to "triggers", to reflect that their functionality is for internal level development. You can still use them
as pressure plates, of course.

- Triggers now can trip only once, if needed.

- Made "Spawn switcher"s. Throw your player spawns into it in the order you want them to be used, and have triggers target it. Each time a
trigger activates it, it sends the next player spawn in the list to the scene manager. Need to have the triggers only hit once!




6:04 PM 1/25/2014


- Added tool for throwing text on screen. Use triggers to change from one line to the next. Extremely basic, just for quick playtesting.

- If triggers have a sound attached to them, they play when triggered.





7:19 PM 1/28/2014 v 1.2

- TextToScreen tool now has nearly every variable inside it exposed, so you can put it wherever the hell you want.


- Triggers now /should/ have weight limits (untested). If weightLimit is set to anything above zero, the combined charMass of everything touching it needs to be equal to or above weightLimit to trigger it.




4:08 PM 1/29/2014 v1.3


- Movers now truncate position and stop on the aimtarget they're aiming towards, and then deactivate.

- Movers can have one impulse to trigger or many; once activated, they ignore further impulses until they reach their next waypoint, at which point they snap to it and deactivate. Another impulse at that point will turn them back on, and they'll move to their next waypoint. For this reason I'd highly recommend any trigger that triggers them be one use ONLY if you are absolutely certain it'll be at a complete stop when triggered - otherwise the level might be broken and they'd have no way to get the mover moving again.

- Movers now support multiple targets, and effectively have a wapoint system. But it's a little wonky - you have to tell it how many targets you're using twice: one or the actual array, and one for the script because I have no way of getting the actual number in the array. 

- Movers can now cycle between different waypoints. Does not return to start position though


- Portals now implimented. Anything touching it is sent to whatever target gameobject you give it. If you want a two-way portal system, rather than a one-way teleport, set the target to another Portal instance and check bEndPortal. bEndPortal needs to be checked because it will send information regarding what is being moved to it so it doesn't immediately teleport the object back to the first portal.


- "Pain volumes" implimented. Pain volumes are configurable objects that can deal pulsing damage based on a timer to anything colliding with them. For lava or otherwise insta-gib, decrease the timer to zero and increase the damage to something absurd.

Pain volumes have a damage duration timer, meaning you can have a timer until it damages, and a second timer that controls how long the window is open for something to be damaged. Whenever something is damaged by a pain volume, it's added to a list, and anything inside this list will not further be damaged by the pain volume. The end of the duration timer resets this list.

A third timer is the offset timer. This is a delay before the main damage loop starts, and is intended so that you can have many instances of this volume - as a gyser, for example - and have them all going off at different times, but at the same loop speed.




4:04 PM 2/9/2014

v1.4:

- Changed "activateMe" to "Activate", because it'd be easier to change the tools on my end than figure out what would break on Eugene's.

- Triggers now can be player-activated only. Because it's annoying to have bots offscreen change your spawn points.

- Triggers now support having multiple targets.





5:28 PM 2/11/2014

v1.5


- Movers can now deactivate at each stop, or cycle through them. (bConstantMove = true)

- Movers can now go through a complete cycle before stopping. (bDeactivateAtEnd = false)


- Rather than going through the trouble of setting up movers to use as resetable falling platforms, I just made a simple falling platform script. You just throw in the distance you want it to fall, and when triggered, it stutters, then falls. It comes back on its own, though you can configure it not to (bNoReturn).





11:02 AM 2/16/2014
v1.6

- Movers no longer move when game is paused.

- Movers can push characters away. (Eugene)

- Movers optimized slightly in that you don't have to set the number of targets twice. Most things no use this method, and can have multiple targets.

- Timer implimented. This is mostly intended to be used to help in offsetting things - such as having enemy spawners be able to spawn at different times - but can also be used to delay anything from being activated.

- Counter implimented. This records every Activate impulse sent to it, and once that reaches a customizable number, it activates another target. This is generally how you'd handle levels where you're required to kill x number of enemies; the spawners would send an Activate impulse to this once their spawns were all killed, and once those were handled, this would Activate an EndRoom object. MAKE SURE ANYTHING THAT SENDS TO THIS ONLY TRIGGERS ONCE.

- EndRoom implimented. Level devs now have a way to directly move from one room to the next by simply sending an Activate impulse to it. I named it EndRoom rather than EndLevel because "level" is a word that has multiple meanings in this game (it's referred to both as the play area and the thing you need to accuire to win the game) and I wanna reduce confusion.


- Destructable objects in. This is very much a hacked-together thing, and unlike everything else, isn't just a script you can throw on an object to make it work. Destructable objects are literally handled as an enemy, and have to be set up as such, then with this script on top of it.

I took the liberty of making them shake when hit, as a visual affordance that attacking it does something.



9:48 AM 2/17/2014
v1.7

- "Splitter". Nodule that when an enemy passes through it, it differentiates what player hit it last, and sends an Activate impulse to the target in that slot. In other words, it activates different things based on which player hit the enemies that pass through it.

- Counter script now has the option to have a visual component. Throw textures at it, and it'll start with the first texture. (Will overwrite normal textures on it.) Every texture past that will be changed to each time the counter is triggered.


- Stutter effect now repeatable for movers. Once they hit the end of the line, if they loop, they'll turn stutter back on again.


- Chest script done. Needs two box colliders - one set to be a trigger, and one without. One will block the player, the triggering one will record when and by who it gets hit. When a player smacks it three times, it'll pop up a little "+XP" thing, give the player who hit it XP, and despawn. Uses ItemXP instead of GiveXP, specifically because GiveXP gives 25% of that exp to everyone else.

The chest you want to use is GrindChest. The other chest object is being retarded and I'm stuck in a situation where I can't do anything to it, so I made a prefab of it, but the new prefab uses the meshes in the old one, so not sure what to do here.


- Destructable wall fixed to not need other scripts to work; Eugene's iteration not needed.

- Death trigger. When it takes damage, it sends an activate pulse to everything in its list. Useful for levels with obstacles and lava; when the lava rises, it could take out this object, which could move to another spawn, so players won't use the previous one that would drop them in the now-higher lava.

- Falling platforms. Are a simplified mover, and just fall straight down by a configurable amount when triggered.

- Music box. Drop a song in it and it'll play that song when the level loads. Basic for now.


- temporary "popup" scripts. Literally just for showing when something is receiving bonus exp or losing it in a non-conventional manner (read: Snatcher syphoning it.)


11:56 AM 3/7/2014
v1.8

Triggers and most objects capable of sending an activate impulse now have visual representations in-editor; they draw green lines to the things they're connected to.

No comments:

Post a Comment