So today I'm going to go over something that you may or may not be able to accomplish. Apparently, there's a bug in the Unreal 3 Editor which will cause the Take Damage triggers to lose some functionality. When this happens, only splash damage weapons like the Shock Ball, Rocket, and Flak Ball will work. Unfortunately, I don't have a fix for that. The best way to make sure something will work with all weapons is to create the Take Damage trigger, alter the damage threshold, and never touch it again. As soon as you start messing with the damage types, this bug will happen.
Anyway, here's how to tell the game to differentiate between those 3 damage types I mentioned above.
So, setup your damage threshold to whatever you want. A rocket is going to do roughly 100 damage every hit. Same can be said for the flak ball, and the Shock Ball is going to do roughly half of that. So I'm going with something that factors by 100. To make it easy, I'm just going with 100.
Have your weapon-blocking actor selected and right click in Kismet to get a new event based on that actor and go to Take Damage. Once you have this, the threshold should already be at 100. Good. Now go into DamageTypes and click the green plus. This will give you a drop down menu. At this point, the bug is probably happening, so the only damage types we need to worry about taking effect are the weapons with splash damage that you're putting in your level. For me, it's flak, shock, and rocket. So I'm going to make this one a shock ball sensor. I'm going to add my shock rifle beam and shockrifle ball from the drop down of DamageTypes. Then, I'm going to add my flak and rocket damage types into the Ignored section so that they don't help get to the threshold.
Once that's done, connect a log or something that you want to happen up to it. I'm going to go off doing a custom event from here, so mine will get much more complicated after this. Make it output to screen so that you know it's working and how often it does so. Now go in game and test out your trigger. It should now only fire off if the correct weapon was used to attack it. If the object you selected to take damage isn't responding at all, make sure that it has collision and is set to at least block weapons.
Any questions or comments, feel free to leave a comment.
No comments:
Post a Comment