Script to "force" an Actor to do action when combatt

Post » Sat Nov 17, 2012 5:43 am

Basically, what I want to do is make a script that is tied to an Object (or Reference if there's no other way) - who is a Follower. What the script does is check if the CombatTarget of this actor is a dragon, then do action (let's say shout Dragonrend, or spell Firebolt - either or both)

I have zero experience with the Creation Kit except through the Hello World! tutorial in the website. I liked the tutorial, but it lacked a whole lot especially since it only introduces to us a single event, OnActivation (or something like that).. I'm interested in scripting mainly because I used to make maps for Warcraft III (in GUI though, not in its scripting language), and I wanted to go through the same course of action in TES too.

The outcome I want is similar to something around this:


Event

Actor - Changed CombatTarget //any event that ticks enough to see what the Combat Target is - if it exists

Conditions

Actor - Is type (Object) //or Reference if there's no other way

Boolean - GetCombatTarget HasKeyword ActorTypeDragon equal to True //Yeah, this sound mighty wrong

Shout is not in cooldown //something in the likes - just referring that the shout meter has not been consumed yet

Actions

Actor - Do (Shout - Dragonrend) to CombatTarget //sample, can be anything

Else

just endif; no else



Function EquipShout sounds right, but from my understanding it only forces an equip, and not an action.


EDIT: Looks like the Shout Procedure does this for me if configured correctly. So my question is now this, how would I configure it to do something similar to what I stated?
User avatar
Gwen
 
Posts: 3367
Joined: Sun Apr 01, 2007 3:34 am

Post » Sat Nov 17, 2012 6:29 am

Doing what you want would not be easy ... though you may be able to make it happen, eventually.

But, if you have only done "Hello World" then you should do the much more involved tutorial before you even worry about Shouting-NPCs attacking dragons ...

http://www.creationkit.com/Bethesda_Tutorial_Layout_Part_1

(It's not what ypou wanted to be doing, but it will show you the basics of everything you need to do what you want ... Takes a fair while to do, but is worth it)
User avatar
Samantha hulme
 
Posts: 3373
Joined: Wed Jun 21, 2006 4:22 pm


Return to V - Skyrim