View Full Version : Quick Tut: Slashable cobwebs

2nd May 2006, 14:52
I'll get this posted on my website (http://www.wearytaffer.com/) as soon as I have time. This technique requires the use of Vigil's excellent TGA cobwebs, found at The Well-Equipped Thief (http://www.washboardabs.net/thief/). If you haven't yet checked them out, do so, as they look phenomenal in-game.

The result is a large cobweb which blocks a corridor, and which the player must hack with their sword to get past (alternatively, with one simple change they can walk through it but it will change models as they do so, also cool).


1. Set up some cobwebs in the object hierarchy as Vigil suggests in the readme. I created an archetype called Cobwebs under Decorative, and gave it all the props Vigil suggests other than Shape > Model name - that would be Renderer > Transparency (alpha), Renderer > Extra Light, and the Scale Tweqs. Under Cobwebs, I made four separate archetypes for each of his models; you could just name them cobweb1/2/3/4, but I chose the more descriptive ones you see here:
Each cobweb type simply sets Shape > Model name to cobweb1, cobweb2, cobweb3 or cobweb4, respectively.

2. Under CobwebWhole, create CobwebWholeSlashable. All you need to add to it to make it block the player's path and change to a CobwebDoorway when they slash at it are the following:
Physics > Model > Type -> set to OBB
Physics > Model > Controls -> check Location, Rotation
I also added Physics > Models > Dimensions and accepted defaults (which is the model's size) but I don't think it's necessary
Links > Corpse -> CobwebDoorway
Schema > Material tags -> delete Material Metal (leave blank)
Act/React > Receptrons > Stim:SlashStim, Min:0, Max:none, Effect:Slay Object, Target:Me, Agent:Source

That's it. Now the cobweb will block the player's progress until they hack it, and then it will change models to CobwebDoorway (from Vigil's cobweb2 to cobweb4) when it's "slain". You'll notice I also made a child of that archetype called CobwebWholeSlayImpact, and the only change is to Physics > Misc > Collision type, add Slay on impact. Now, when the player walks through the cobweb it won't block them but will change models as if they partially destroyed the cobweb by walking through it (and is also slashable if they do so before hitting it).

AI Implications: Don't place a CobwebWholeSlashable in the path of a patrolling AI, as they'll either refuse to patrol through it or (more likely unless you set appropriate pathfinding props on the archetype) will walk against it forever. A CobwebWholeSlayImpact wouldn't cause these problems, but would be kind of pointless since the AI would probably slay it before the player ever noticed it used to be larger.

2nd May 2006, 17:16
Great! :)