THIS PREFAB HAS BEEN UPDATED NOV 1st, 2022. See Overview for most recent info!
[Prefab] Delete [spellbooks] per Player - Spell-casting for Pyro only? Sure!
See this post first for a Disclaimer on using this logic.
This prefab is able to delete all spellbook weapons from players that aren't Pyro.
Theoretically, it can be used for any weapon and/or any player. However this prefab teaches only how to delete spellbooks on classes that aren't Pyro.
This prefab is fully commented. Follow the lines (called landmarks in Visgroups) and comment nodes. Everything is Visgroup'd, as well! Play around with it and you'll see.
You can boot it up immediately and compile it to play. Works like advertised.
Features
Known Issues
[Prefab] Delete [spellbooks] per Player - Spell-casting for Pyro only? Sure!
See this post first for a Disclaimer on using this logic.
This prefab is able to delete all spellbook weapons from players that aren't Pyro.
Theoretically, it can be used for any weapon and/or any player. However this prefab teaches only how to delete spellbooks on classes that aren't Pyro.
This prefab is fully commented. Follow the lines (called landmarks in Visgroups) and comment nodes. Everything is Visgroup'd, as well! Play around with it and you'll see.
You can boot it up immediately and compile it to play. Works like advertised.
Features
- #1) Deletes spellbooks consistently on all classes except Pyro.
- Works by parenting the spellbook weapon to a trigger_multiple,
- trigger_multiple then spawns at spellbook origin, which is the same as the player's,
- Player touches trigger, trigger sends TestActivator to a filter,
- Filter filters Not Pyros: OnPass, deletes the trigger. OnFail, parents the trigger to the player and changes the targetname to a new so it won't be communicated to again.
- #2) Supports a resupply locker.
- The resupply locker's animations actually trigger the master relay.
- #3) The "master relay" description:
- This is a logic_relay that fires the beginning of the "funnel system",
- This funnel system targets all spellbooks in the map, one-by-one, by using an Addoutput to StartTouch trigger_multiple filtered to weapons only. This works because of OnStartTouchAll only selecting one !activator for each queue,
- There are 33 logic_branch entities. Each one is assigns a unique name for each spellbook, makes the spellbook invisible, spawns the trigger_multiple to be parent the spellbook to it.
- Does the rest as in bullet point #1.
Known Issues
- Issue #1: "trigger_spellbook_parent", a trigger_multiple (original name: weapon_strip_spellbook . It's renamed via addoutput from filter_spellbook_pyro)
- This entity will spawn again if a Pyro touches the resupply locker and lets the animation of the locker play out. This can happen any number of times. These ever-spawn entities are parented to the Pyro.
- This is a serious issue. Not cleaning up the entities can easily cause lag.
- Issue #2:The spellbook can accidently parent to the wrong person.
- If a Pyro is close enough to the locker and another class is inside the Pyro's collisions, the trigger might touch the Pyro and the other class will keep their spellbook. Thankfully, it's stripped away on respawn.
- Issue #3:Pyro may lose their spellbook on touching the resupply.
- Unknown.
Last edited: