Jump to content

Scripting help request!


renegade26

Recommended Posts

So for this particular problem I am having I have a bandit type enemy and I am trying to cause them to become aggressive when my quest goes to stage 15, which happens to be at the end of his dialogue. Setting the quest to stage 15 is easy for me. I want the quest to then make the bandit aggressive when it gets to stage 15, but I am not sure how to go about this. I have an alias set up for this bandit and I am wondering what code I would use to have this bandit initiate combat with the player.

 

Please help its these little scripting things that always trip me up for hours!

Link to comment
Share on other sites

So for this particular problem I am having I have a bandit type enemy and I am trying to cause them to become aggressive when my quest goes to stage 15, which happens to be at the end of his dialogue. Setting the quest to stage 15 is easy for me. I want the quest to then make the bandit aggressive when it gets to stage 15, but I am not sure how to go about this. I have an alias set up for this bandit and I am wondering what code I would use to have this bandit initiate combat with the player.

 

Please help its these little scripting things that always trip me up for hours!

 

I looked on the Creation Kit site I would find this Event - aeCombatState looks promising ;)

Event OnCombatStateChanged(Actor akTarget, int aeCombatState)
 if (akTarget == Game.GetPlayer())
   if (aeCombatState == 0)
     Debug.Trace("We have left combat with the player!")
   elseif (aeCombatState == 1)
     Debug.Trace("We have entered combat with the player!")
   elseif (aeCombatState == 2)
     Debug.Trace("We are searching for the player...")
   endIf
 endIf
endEvent

 

 

@11BlueBlood - Not sure what you mean by program to read papyrus ?? You can use Notepad++ to define syntax and check your compilations - this is covered on the Creation kit website HERE

 

 

Just starting up myself and stuck on stuff myself hehe

Edited by Stravides
Link to comment
Share on other sites

Great thanks for the help, going to try some of this stuff tomorrow.

 

Really what my issue is, is that often I will attempt to use functions like setrace or the initiate combat one mentioned and the compiler will notify my "setrace is not a known function" type error for many of these functions.

 

I am only copy pasting from the wiki straight into the script editor and I am wondering how I can get suhc base errors so immediately. As far as I can tell if i am extending objectreference, then functions like setrace will be understood by the script afterwards. If I can get my head around this stuff Ill be sorted but until then sripting in gerneral is just so irritating it makes motivation difficult.

Will try tomorrow anyway.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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