Immune to custom damages

Archive of the old editing forum
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.
Locked
User avatar
devildemon
Posts: 292
Joined: Wed Apr 28, 2010 4:49 pm

Immune to custom damages

Post by devildemon »

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
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

Re: Immune to custom damages

Post by Blue Shadow »

Use [wiki=Actor_properties#DamageFactor]DamageFactor[/wiki] property on the player class with the desired damage type you want them to be immune to.

Code: Select all

DamageFactor "Blah", 0
An actor with that line in its DECORATE code will be immune to the Blah damage type.
User avatar
devildemon
Posts: 292
Joined: Wed Apr 28, 2010 4:49 pm

Re: Immune to custom damages

Post by devildemon »

can make it were they get a powerup or a custom inventroy then the damage factor goes to 0 that way?
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Immune to custom damages

Post by Gez »

Yes. Put the damage factor on a PowerProtection item.
User avatar
devildemon
Posts: 292
Joined: Wed Apr 28, 2010 4:49 pm

Re: Immune to custom damages

Post by devildemon »

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
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

Re: Immune to custom damages

Post by Blue Shadow »

devildemon wrote:1) can i make the immune power inf or ends when its removed from the players inventory
Yes.

Code: Select all

Powerup.Duration 0x7FFFFFFF
The "0x7FFFFFFF" is practically infinite.

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].
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Immune to custom damages

Post by Gez »

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.
User avatar
Enjay
 
 
Posts: 27063
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Immune to custom damages

Post by Enjay »

Gez wrote:I really doubt anyone would spend longer than two years non-stop on a single map.
Time: Really Sucks

;)
User avatar
devildemon
Posts: 292
Joined: Wed Apr 28, 2010 4:49 pm

Re: Immune to custom damages

Post by devildemon »

Gez 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.
see i did that i put it 2 above the 3d floor but it still dose not work
User avatar
Enjay
 
 
Posts: 27063
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Immune to custom damages

Post by Enjay »

Have you tried with [wiki]Classes:TeleportDest2[/wiki] or [wiki]Classes:TeleportDest3[/wiki]?
Locked

Return to “Editing (Archive)”