Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Any way to temporarily enable "God Mode"/Immune to damage?
Cyfiawn Offline
Junior Member

Posts: 27
Threads: 8
Joined: Jun 2012
Reputation: 0
#1
Any way to temporarily enable "God Mode"/Immune to damage?

I have a map where the player is in a tranquil environment, with no enemies, but still takes falling damage. Is there a way to make the player immune to damage for this level?

I see in the config you can set regen rates, but I'd prefer if there was no blood splatter at all from falling damage.

Thanks,

Cyfiawn
03-07-2013, 11:12 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Any way to temporarily enable "God Mode"/Immune to damage?

You need a full conversion to that, as making the player immune to damage requires you to meddle with the game's scripts. As for blood spatter......i think you have to edit the decal for that. Again, needs a full conversion as it meddles with the game's decal and scripts.

"Veni, vidi, vici."
"I came, I saw, I conquered."
03-07-2013, 11:14 AM
Find
Cyfiawn Offline
Junior Member

Posts: 27
Threads: 8
Joined: Jun 2012
Reputation: 0
#3
RE: Any way to temporarily enable "God Mode"/Immune to damage?

Ok, that was the answer I was expecting, but didn't want. Tongue

I assume there is no way to edit the config file via a script either?

A last resort would be to "SetPlayerHealth(100);" on a loop throughout the whole level.
03-07-2013, 11:30 AM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#4
RE: Any way to temporarily enable "God Mode"/Immune to damage?

I'm not really sure what you mean. Do you mean that you want the player to be immune from damage the whole level, but still take fall damage? If so, why do you need the player to be completely immune to damage?

There might be a work-around to this, but I need to be sure what it is you want.

[Image: Tv0YgQb.gif]
Image by BandyGrass
03-07-2013, 11:43 AM
Find
Cyfiawn Offline
Junior Member

Posts: 27
Threads: 8
Joined: Jun 2012
Reputation: 0
#5
RE: Any way to temporarily enable "God Mode"/Immune to damage?

(03-07-2013, 11:43 AM)Kreekakon Wrote: I'm not really sure what you mean. Do you mean that you want the player to be immune from damage the whole level, but still take fall damage? If so, why do you need the player to be completely immune to damage?

There might be a work-around to this, but I need to be sure what it is you want.

I want the player to be immune to all damage. It's just that the only damage the player can take during this level currently is fall damage, if that makes it easier.
(This post was last modified: 03-07-2013, 12:21 PM by Cyfiawn.)
03-07-2013, 12:20 PM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#6
RE: Any way to temporarily enable "God Mode"/Immune to damage?

Well, in that case, I can't think of any way you'd be able to do that normally without a full conversion.

There are two ways to solve this if your level allows it though:
1. Design the level so that no heights will allow for fall damage to happen.
2. Teleport the player to a safe place if he is falling from a height that will cause fall damage to happen.

[Image: Tv0YgQb.gif]
Image by BandyGrass
03-07-2013, 12:33 PM
Find
Cyfiawn Offline
Junior Member

Posts: 27
Threads: 8
Joined: Jun 2012
Reputation: 0
#7
RE: Any way to temporarily enable "God Mode"/Immune to damage?

(03-07-2013, 12:33 PM)Kreekakon Wrote: Well, in that case, I can't think of any way you'd be able to do that normally without a full conversion.

There are two ways to solve this if your level allows it though:
1. Design the level so that no heights will allow for fall damage to happen.
2. Teleport the player to a safe place if he is falling from a height that will cause fall damage to happen.

Neither of these are really an option, unfortunately. I'll have to go with a SetPlayerHealth(100) on a loop to trigger every 0.5 seconds, or so.


Thanks for the replies, though. Appreciate it. Smile

Cyfiawn
03-07-2013, 01:47 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#8
RE: Any way to temporarily enable "God Mode"/Immune to damage?

If you have monsters, how about editting them, so they deal 0 damage.

Trying is the first step to success.
03-07-2013, 03:58 PM
Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#9
RE: Any way to temporarily enable "God Mode"/Immune to damage?

If your design allows for it, you could apply a large amount of force on the positive Y axis to the player essentially counter-act the amount of gravity for the player, so that when they fall it is slow enough to not take damage. That kinda requires them being in a low-gravity environment, or some kind of dream-world where normal world physics don't apply.

03-07-2013, 04:27 PM
Find




Users browsing this thread: 1 Guest(s)