Hm..well, this should be pretty easy with a bit of scripting...but I can't tell waht your familiarity level with that is. You'd literally override a function called TakeDamage and just have it to modify health without calling any animations or anything...but if you're not familiar with scripting it's got a bit of a setup curve to it.
You could replace the TakeDamage animation with a 0-second long anim as a short-term hack...or you could see if there's a pawn class you could use that doesn't have the behaviors you're not liking...but the scripting is probably the proper way to go here.
Ambershee would probably know more--he stops in around here every so often.
actually i am basically a 3d artist, i don't know much about scripting. for the past month, i have been struggling to simply put a playable pawn into udk..is there anyone who could write the code for me? or if it is not possible, is there anyway to do it with kismet? any kind of node that i could use to disable it?... kismet is more userfriendly, i could be able to manage somthing with it.
i posted the same thread into the udk forum but no one responded it, so i was thinking maybe someone here could be gentle enough to help me. it would be appreciated.
hmmm...if you want to go the kismet route, maybe look into the 'consolecommand' kismet node and use it to call 'god' and that should toggle god mode. Maaaybe that will override the animation call. There's also a godmode flag in the enable cinematicmode toggle kismet node...I suppose you could turn everything else off but that on to get the same effect. maybe.
well at some point, i do want the player to die. this is why i was using the lavavolume. the godmode don't actually let the player die....
actually the rules are simple: you run and grab power-up. when you're in-game you are constantly losing your health. more like the movie crank with jason statham if you know what i mean.
yes i tried it but it didn't work. i made a modify health and added a delay at the end and repeat the action but the take damage animation is still here.
That's really lame. Did you try this with different kinds of damageclasses? Maybe there's one that does it..or you could try and set the damage type to HEAL, actually, and just have it heal a negative amount. It's a little hacky, but no more than what's already going on, and it might work?
Offhand, I might suggest a custom variable that tracks health (reduce it as per what you're already doing, but don't touch the player's actual health). Then once that custom var hits zero, you kill the player (set actual health to zero).
it bypass the animation but now, the pawn can't be killed...
is there any command with the console bar to kill the player ? i could maybe tell udk to kill the pawn after the health is reach to 0?
inbetween the two brackets there, try adding this line:
//////////
health=Max(health-damage, 0);
///
If it doesn't auto kill you at zero (it might not...i dont know what calls deaths), you can then try adding something like this right after:
////
If(Health<=0)
{
if (!IsInState('Dying'))
{
GotoState('Dying');
}
}
///////
Dunno if that's the proper method to force a death either... But give it a go and see?
And keep in mind that its generally a BIG NO-NO to edit any base UnrealClass like this...the proper way is to subclass UTpawn, but that involves a bit more setup than you probably want to go through. (google "getting started with unrealscript" if you are interested though).
Is it really playing a hurt animation or is it just stopping you for a second( which makes you blend the animation to the 'exhausted' one). Perhaps you can try and disable the 'Velocity affects Walking'. Perhaps that will prevent your pawn from stopping every 1 second.
AHH good, you're overriding pawn. But you're not overriding the takedamage function anywhere inside there. You'll need to insert the code from above into there (above the defaultproperties).
And then, you have to make sure you actually are USING that pawn.
If you insert this line into the end of takedamage function, then the game should 'ding' and spit this line into the console for you.:
WorldInfo.Game.Broadcast(self,"I am using the running pawn and this is my remaining health:"@Health;
Replies
You could replace the TakeDamage animation with a 0-second long anim as a short-term hack...or you could see if there's a pawn class you could use that doesn't have the behaviors you're not liking...but the scripting is probably the proper way to go here.
Ambershee would probably know more--he stops in around here every so often.
i posted the same thread into the udk forum but no one responded it, so i was thinking maybe someone here could be gentle enough to help me. it would be appreciated.
thank you in advance guys, (sorry for my english)
[
actually the rules are simple: you run and grab power-up. when you're in-game you are constantly losing your health. more like the movie crank with jason statham if you know what i mean.
instead try adding a kismet node that modifies health every few seconds..? I'm not positive, but that might bypass the animation call too.
simulated event TakeDamage(int Damage, Controller EventInstigator, Vector HitLocation, Vector Momentum,
class<DamageType> DamageType, optional TraceHitInfo HitInfo, optional Actor DamageCauser)
{}
it bypass the animation but now, the pawn can't be killed...
is there any command with the console bar to kill the player ? i could maybe tell udk to kill the pawn after the health is reach to 0?
//////////
health=Max(health-damage, 0);
///
If it doesn't auto kill you at zero (it might not...i dont know what calls deaths), you can then try adding something like this right after:
////
If(Health<=0)
{
if (!IsInState('Dying'))
{
GotoState('Dying');
}
}
///////
Dunno if that's the proper method to force a death either... But give it a go and see?
And keep in mind that its generally a BIG NO-NO to edit any base UnrealClass like this...the proper way is to subclass UTpawn, but that involves a bit more setup than you probably want to go through. (google "getting started with unrealscript" if you are interested though).
and here is my code UTPawn Code:
i may have done something incorrect, but as i saied earlier, i am not a programmer, i actually copy and pasted code from around the internet
And then, you have to make sure you actually are USING that pawn.
If you insert this line into the end of takedamage function, then the game should 'ding' and spit this line into the console for you.:
WorldInfo.Game.Broadcast(self,"I am using the running pawn and this is my remaining health:"@Health;