Jump to content

[LE] Scripting Help Required


Altap214

Recommended Posts

I'm trying to create a character who's explodes every time he loses 10% of his health during a fight. I initially turned him into a destructable object which works during the first fight but the explosions don't reset after triggering so this was a no go. I'm now trying to achieve this using a script, but i've only ever modified vanilla scripts, not created a custom one from scratch and its not going well.

 

I can happily define changeable actor (not sure If needed) and explosion properties through:

 

ACTORBASE PROPERTY ActorName AUTO
EXPLOSION PROPERTY FireballExplosion AUTO
I'm fairly sure I need GetActorValuePercentage(health) defined as the variable but not sure if it should be int or float.

I'm not sure how to define Event On... Should it be OnHit, OnTrigger or something else entirely.

 

The If ElseIf statements after this i'm thinking:

 

If SCHealth == 0.95
placeatme(FireballExplosion)

ElseIf SCHealth == 0.9
placeatme(FireballExplosion)
...etc
with SCHealth defined as GetActorValuePercentage(health) as mentioned above.
Does anyone have any clue how to put this random bits into a workable script? any help would be much obliged.

 

Link to comment
Share on other sites

For some reason the non script way is working today, have to keep testing and see if it keeps working.

 

Hadn't thought of the flame atronach, looking at it might be able to alter it to do what I want though.

 

As to why he's a chicken and if you watch some of the mod shows and use some of the mods I do you'll know chickens in skyrim explode. Although it might also be useful for making a new subspecies of flame atronach that can explode at will.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...