Jump to content

Question: Scripting a character so they can't be harmed?


Glitchipedia

Recommended Posts

As many of us know, and as I have just discovered, the Oblivion scripting language is anything but intuitive, and creating what should be a simple command is impossible without knowing that language's obscure intricacies. With any luck, this is the only time I will ever need to create a custom script, so let me just ask: how do I script a character so that they can't be harmed in any way?

 

Let me clarify that this is different from simply marking a character "essential"; while essential characters cannot be killed, they can still take damage and be rendered unconscious. My aim is to create a character that is completely impervious to damage without reflecting it back on the player.

Link to comment
Share on other sites

Thanks, that sounds like a good idea, and I'll keep it in mind as a backup plan in case I can't get the effect I'm really after. I was thinking more along the lines of how the Emperor and Jeelius don't experience a decrease in health even when hit directly.

Link to comment
Share on other sites

Increase their health to a million and have a script that keeps fully restoring it.

 

You could also give them 100% immunity to magic, normal weapons, poison, paralysis and add water breathing. Traps, enchanted weapons (I think) and reflected damage can still hurt the NPC though.

Link to comment
Share on other sites

The problem is I don't know how to make a script that continuously restores health. Although I suppose I could create a magical ability that has the same effect?

 

Alright, I'll give that a shot. Thanks!

Link to comment
Share on other sites

Well it sort of worked, except now the NPC won't even acknowledge when he's been hit, and no one else seems to take notice of his suffering either. Even the guards just stand there and watch as I beat up on this poor guy with what would normally be a one-hit knockout weapon. As this is intended to be for my children mod, I would still like for those granted invincibility to call for help when assaulted.

Link to comment
Share on other sites

Since you're still new to scripting try finding a mod that does something similar to that effect,download it and check it out. Also check out this site in case you haven't already: http://cs.elderscrolls.com/index.php?title=Main_Page It's extremely helpful.

Edited by Legotrash
Link to comment
Share on other sites

I have tried the CSWiki already, it doesn't tell me anything I need to know. I can learn the sentence structure of the scripting language there, but as far as vocabulary goes, I seem to be on my own.

 

EDIT: On another note, I think I know what I did wrong. All the damage resistances must make everyone unaware that an attack is occurring. I'll try reducing it to the constant health regeneration and see if that makes a difference.

Edited by Glitchipedia
Link to comment
Share on other sites

  • Recently Browsing   0 members

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