PDA

View Full Version : Fatgun Projectile help.


Euphoric Beaver
6th Nov 2001, 08:34 AM
I've coded a projectile that when it hits a pawn it increases it's fatness till it reaches 200, then they take 1000 damage. :D

But when they respawn they keep the fatness before they died, usually 195. :(

Is there anyway of getting the original fatness and apply it before they die?

I've attached the projectile in a .txt file so you can take a look what I've done.

2COOL4-U
6th Nov 2001, 10:05 AM
Chagne the fatness of the person who was hit back to 128 after you gave him the 1000 damage :)

Euphoric Beaver
6th Nov 2001, 10:19 AM
:D I was thinking that but our mod team are making a class based mod so I'm not sure if this is possible.

Unless all our models are 128 fatness. Suppose I could do lots of further If statements to find out what class there in.

Are there any other ways?

Magus
6th Nov 2001, 10:31 AM
pawn(victim).fatness = pawn(victim).default.fatness;

2COOL4-U
6th Nov 2001, 10:31 AM
128 fatness is normal for all models :) You also can alter the RestartPlayer function in your custom gametype(If you have one)

Euphoric Beaver
6th Nov 2001, 10:36 AM
Originally posted by Magus
pawn(victim).fatness = pawn(victim).default.fatness;

Will that work?
I'm already editing the fatness. Does UT keep the original default properties?

Magus
6th Nov 2001, 10:45 AM
Yes , thats all you need

pawn(victim).fatness = pawn(victim).default.fatness;
pawn(victim).takedamage(....);

You can reset in pretty much all values back to its default value by this method.

Euphoric Beaver
6th Nov 2001, 10:48 AM
:)

I'll try that tonight and report back.

Euphoric Beaver
6th Nov 2001, 10:58 AM
Just tried it then. :D

And it works! :tup:

Thanks for info people. :)

EasyRaider
7th Nov 2001, 11:10 AM
But what if a player dies from something else when he is fat? He will then restart fat. I think you might be better of with a custom restart function.

Euphoric Beaver
7th Nov 2001, 11:28 AM
I believe it resets it to it's original default properties before anything messed with it.