Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

Explosions

Asked by 10 years ago

With rockets and bombs, do force fields stop them from damaging the player. I dont think it does, is there a certain block of code you can insert to make the explosion not damage an FF'ed player?

3 answers

Log in to vote
7
Answered by
trogyssy 221 Moderation Voter
10 years ago

The forcefield should prevent damage from the explosion itself.

If there are any additional scripts used to deal damage, make sure they go like this (I'll use 20 for an example):

pathtohumanoid:TakeDamage(20)

Rather than like this:

Humanoid.Health=Humanoid.Health-20

Or like this

Humanoid.Health=0
0
TakeDamage(20)* trogyssy 221 — 10y
2
Ok, so the FF stops player from taking damage but is useless when it sets a health. ConnorVIII 448 — 10y
0
Correct trogyssy 221 — 10y
Ad
Log in to vote
4
Answered by
DrJonJ 110
10 years ago

Not sure how helpful this is, but you could also set the BlastPressure to 0. Then it's just cosmetic and removes the need for a ForceField.

2
Does the explosion still do the damage though? ConnorVIII 448 — 10y
1
No it won't. :) DrJonJ 110 — 10y
Log in to vote
0
Answered by 10 years ago

If you have a permanent FF, Example: Kohls admin, :ff (Player)

The explosion would not inflict the player, Only to trip the player or fling him.

Answer this question