Cutstuff Home
CMM's Twitter
MM8BDM Wiki
ZDoom Wiki
Zandronum
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Login
Register
Advanced Search
Cutstuff Forum
»
Mega Man 8-bit Deathmatch
»
Help & Editing
»
Activate on damage
Print
Pages: [
1
]
Author
Topic: Activate on damage (Read 1019 times)
0 Members and 1 Guest are viewing this topic.
October 03, 2016, 01:29:47 PM
Read 1019 times
Xhatahx
Standard Member
*sregnif sevaelretni* stenet wef a evah I
Date Registered: September 03, 2016, 07:21:47 AM
Activate on damage
«
on:
October 03, 2016, 01:29:47 PM »
I want to make a weapon that activates when the player takes damage, but only if you're damaged by another player. It's not like Skull Barrier where every hit activates it. How do I do this?
Logged
October 03, 2016, 05:38:30 PM
Reply #1
Russel
MM8BDM Extender
Doc Croc
>
>
>
>
>
>
>
>
>
Date Registered: December 17, 2010, 11:11:25 PM
Re: Activate on damage
«
Reply #1 on:
October 03, 2016, 05:38:30 PM »
I'm not sure of a reliable way to check that outside of damage types, which means that weapon might act strange in certain custom maps.
Even then, I'm not sure how to fully keep track of such a trigger since the only way you can check damage types is through specific pain states on the player itself. Leaf Shield and Mirror Buster both work by spawning a shootable actor over a location near the player and responding when it takes damage, but this doesn't work for things like pits.
If it were me, I would simply do what Leaf Shield does [which was derived from CBM Woodman to some extent] and have it ignore stage damage types such as those of fire traps and ice blocks. The largest downside to this is it provides a weird form of protection in that non-ripping projectiles will deal no damage and be destroyed upon impacting the effective range of the damage check.
So in short, the only ways that I at least know of either rely on checking that you lose health, which is indiscriminate of damage types and damage sources, or checking that a projectile came just short of hitting you, which removes the projectile if it isn't a ripper or an explosion.
For reference I'm the one who put together Skull Barrier and Leaf Shield for this last version. Skull Barrier has a really stupid way to handle what happens when you get hit by Laser Trident that will be getting removed next version for purposes of abstraction.
Logged
Print
Pages: [
1
]
Cutstuff Forum
»
Mega Man 8-bit Deathmatch
»
Help & Editing
»
Activate on damage