Immune to custom damages
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- devildemon
- Posts: 292
- Joined: Wed Apr 28, 2010 4:49 pm
Immune to custom damages
I was wondering if i could make the player immune to custom damage types that he could not get hurt kind of like PHD flooper on zombies stops explosions from hurting the player
-
- Posts: 5043
- Joined: Sun Nov 14, 2010 12:59 am
Re: Immune to custom damages
Use [wiki=Actor_properties#DamageFactor]DamageFactor[/wiki] property on the player class with the desired damage type you want them to be immune to.
An actor with that line in its DECORATE code will be immune to the Blah damage type.
Code: Select all
DamageFactor "Blah", 0
- devildemon
- Posts: 292
- Joined: Wed Apr 28, 2010 4:49 pm
Re: Immune to custom damages
can make it were they get a powerup or a custom inventroy then the damage factor goes to 0 that way?
Re: Immune to custom damages
Yes. Put the damage factor on a PowerProtection item.
- devildemon
- Posts: 292
- Joined: Wed Apr 28, 2010 4:49 pm
Re: Immune to custom damages
ok 2 more questions
1) can i make the immune power inf or ends when its removed from the players inventory
2) with using acs can i spawn a enemy on a 3d floor and teleport a player on a 3d floor with acs because i tried and he did not appear on it
1) can i make the immune power inf or ends when its removed from the players inventory
2) with using acs can i spawn a enemy on a 3d floor and teleport a player on a 3d floor with acs because i tried and he did not appear on it
-
- Posts: 5043
- Joined: Sun Nov 14, 2010 12:59 am
Re: Immune to custom damages
Yes.devildemon wrote:1) can i make the immune power inf or ends when its removed from the players inventory
Code: Select all
Powerup.Duration 0x7FFFFFFF
For taking the powerup away, use [wiki]TakeInventory[/wiki]/[wiki]A_TakeInventory[/wiki] while specifying the [wiki=Classes:Powerup]powerup[/wiki] actor itself, not the [wiki=Classes:PowerupGiver]powerup giver[/wiki].
Re: Immune to custom damages
Inf? You mean infinite? ZDoom doesn't allow infinite-duration powerups; however if you set a duration of 0x7FFFFFFF, it will last about two years of real-time, which should be good enough to be considered infinite. I really doubt anyone would spend longer than two years non-stop on a single map.
You can place teleport destinations and map spots on 3D floors. Just set the Z-height to be high enough for that.
You can place teleport destinations and map spots on 3D floors. Just set the Z-height to be high enough for that.
Re: Immune to custom damages
Time: Really SucksGez wrote:I really doubt anyone would spend longer than two years non-stop on a single map.

- devildemon
- Posts: 292
- Joined: Wed Apr 28, 2010 4:49 pm
Re: Immune to custom damages
see i did that i put it 2 above the 3d floor but it still dose not workGez wrote:Inf? You mean infinite? ZDoom doesn't allow infinite-duration powerups; however if you set a duration of 0x7FFFFFFF, it will last about two years of real-time, which should be good enough to be considered infinite. I really doubt anyone would spend longer than two years non-stop on a single map.
You can place teleport destinations and map spots on 3D floors. Just set the Z-height to be high enough for that.
Re: Immune to custom damages
Have you tried with [wiki]Classes:TeleportDest2[/wiki] or [wiki]Classes:TeleportDest3[/wiki]?