Jump to content

How do I activate a trigger box on a specific quest step?


badassmthfck

Recommended Posts

I'm trying to spawn a boss enemy after dealing with several smaller mobs. After some help here on the forums I managed to build a script that advances the objective by 10 on each kill, however I'm not sure what script to use in order to activate a trigger box. Is there an existing script I could plug in that let's me do that or do I need to write one myself? If the latter is true I would very much appreciate any help with writing it, I'm less than fluent in papyrus syntax.



This is the script I'm using for advancing the objective, although I haven't been able to test if it's working properly because I don't know how to start the trigger on a specific step:


int myInt


Event OnDeath(Actor killler)

myInt = Advquestondeath.getstage() + 10

Advquestondeath.setstage(myInt)

endEvent


I should also mention, I have the trigger box setup to spawn the boss enemy when the player enters, that part is working. What I'm wondering is how to activate it on a specific event

Link to comment
Share on other sites

I'm just gonna tell you that OnDeath does not work in Triggers. If I go into more details, someones will just say how wrong I am.

Oh, I should've clarified, that script is attached to the skeletons the player kills first, not the trigger

Edited by badassmthfck
Link to comment
Share on other sites

the way i do it is drag an x marker into the scene. double click the trigger box and make the x marker a parent.


set the x marker as "disabled" then name it and make an "objectreference" in the scripts drop down properties list in the quest.



The trigger box will be disabled at start of game until you "enable" it. which you do after the last known stage.


in the stages type:



myxmarkername.Enable()



for instance if the trigger is just to spawn the enemy boss, make a new setstage player trigger that sets the stage to trigger the trigger :tongue:


or in this case, atthe death of the first skeleton, use the utility wait function then spawn the trigger,



I wouldn't use a trigger box to spawn the boss, just have him disabled, and enable him after say 10 seconds.


How long do you think it would take to kill the skeletons once you set the stage then use.



Utility.Wait(10)


MyXmarkername.Enable()



or



MyBoss.Enable()



if the Boss is unique, you must check the "is disabled" box in the aliases tab if he is an alias.


if not then just make an actor property for him in the scripts, property drop down box. No need to a trigger.


Link to comment
Share on other sites

  • Recently Browsing   0 members

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