• Welcome to Freedom Reborn Archive.
 

new idea for armor damage

Started by bearded, February 03, 2008, 03:29:58 AM

Previous topic - Next topic

bearded

the car has different levels for when damages.  plus the car can "attack".
i am wondering if there might be some way to utilize this to being a bad guy, replacing the car nif with a character nif, to simulate armor being damaged?
is there a way to code a car ai to attack heroes?

C4

Vehicles all have one Ai that is assigned to any object that is selected as a vehicle. They follow road nodes and are very much uncontrollable. So it is not the ai but the object that gets the desired damage replacement.

Doing what you are mentioning will be much simpler by way of scripting an attribute using normal character templates.
In other words if hero a has 40 armour hp to start with, when he reach 20hp you replace his model with a damaged version with spawnat command and when he has zero armour hp you replace his his model once again. This is not really that complicated to do. (for a scripter) 

The problem with coding a vehicle to attack a hero is he must follow road notes to get to him. And I don't even know what powers will he use. I am not sure if maybe cleargoals() is called if the road note ai might be cancelled.

C4

Now that I think about this a bit something like what I mentioned could work for invulnerable opponents. Let me explain. What I never liked of the invulnerable attributes was that you see you are being punched for 60 damage though your Superman only takes 30 damage.

But if we found a decent way to visualize the armour/invulnerabilty to the player we can have a sups with 240 hp and 180 hp Inv. Then when he is punched for 60 damage 40 comes of inv and 20 of Hp. the player sees the 20 coming of the Hp and we must just show clearly that he remains with 140 Inv. If he does not takes further damage we add a lesser regeneration code to the Inv to restore it over time back to full 180. But the crucial part is to have a visual que of the Invulnerability level.   

*Edit*

I think I have it. add a custom command on the character like: what is my Arm/Inv level then the system prints 140 or 140 out of 180. So this way the player has a way of tracking the damage done to him and micromanaging his Arm/Inv level.

*Edit*

Since Stumpy did a body armour code and I have been thinking if your Inv hp reaches zero anything can hurt you might not be 100% right, this is probably not the answer I was looking for in a proper Invulnerability code.

Epimethee

Quote from: C4 on February 03, 2008, 04:50:55 AM
Doing what you are mentioning will be much simpler by way of scripting an attribute using normal character templates.
In other words if hero a has 40 armour hp to start with, when he reach 20hp you replace his model with a damaged version with spawnat command and when he has zero armour hp you replace his his model once again. This is not really that complicated to do. (for a scripter) 
The easiest way to approximate this would be to use Accidental Change with the trigger set to isLowOnHealth (30% of max HP). Of course, this is a one shot-deal instead of having multiple stages, but in game terms, I'd think it's actually better.

detourne_me

Actually it's even easier using the Russian Doll attribute,  and you can string as many Russian Dolls together if you like.