Report this content
We want the Dreams coMmunity to be a safe, diverse and tolerant place for everyone, no matter their age, gender, race, sexual orientation or otherwise. If you believe this content to contradict these principles, you can file a report for our coMmunity teams to investigate.
Note that misuse of the reporting tool will not be tolerated.Item being reported:
So that's not all that easy, but here's how you could get started:
- Use wireless transmitters (WT) to broadcast your attack. You'll have to tune your attack animation so you'll send the WT signal at the correct time and for the length you see fit, but other than that, you just have to put in a descriptive label and put a wireless receiver on the blocking enemy.
- Set the label on the receiver to match your attack label. Whenever you attack, the enemy's wireless receiver should now pulse during the damaging part of it.
- Now is where you check whether you block. Since we only really want a signal (for this part of the damage logic, at least) when you both broadcast the attack (because of your attack) and have a blocking enemy at the same time, you'll need an AND gate for both wires.
- You can, of course, wire it all traditionally. The major difference between WT/WR and hardwiring it is that you don't have to bother with scoping at the right level and having to trace wires - as long as you keep track of what broadcasts which signal to whom. Say you make an emitter-based system that keeps spawning baddies for you to kill: if you forget to use enemy-specific trigger zones for your default damaging attack, you might accidentally run your damage logic in all the enemies reacting to your puppet's wireless transmitter - despite you only attacking one of them. So keep an eye out for that.
To summarize this fairly complex topic:
- during your attack animation, fire a signal. Take this signal and put it in an AND-gate with the blocking logic. Whenever both criteria are satisfied, you'll run the low/no-damage logic. Copy the logic, take the same input and put a NOT-gate between the blocking logic and damage logic #2. This is your normal hit and will branch into full-damage logic.
If you're having troubles with any of this, like how to generate a signal during the animation, I'll be happy to look at your project. Just post it here and I'll get the basic setup running for you. Depending on your game, there are tons of different and possibly more suitable approaches.