Jump to content

[LE] Help with script for onTriggerEnter ?


javaplaza

Recommended Posts

Scriptname DFLTOonTriggerEnter extends ObjectReference  

scene property myscene auto
quest property myquest auto
int property nextStage auto

Event OnTriggerEnter(ObjectReference akTriggerRef)
	if  akTriggerRef == Game.GetPlayer() && myQuest.GetStage() == 10
			myQuest.GetStage(nextStage)
			debug.notification("you entered the trigger area")
		endif
EndEvent

hopefully this is self explanitory... here is the error I'm getting..

 

 

 

 

Starting 1 compile threads for 1 files...

Compiling "000onTriggerEnter"...
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\temp\000onTriggerEnter.psc(9,11): too many arguments passed to function
No output generated for 000onTriggerEnter, compilation failed.
Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on 000onTriggerEnter

 

Link to comment
Share on other sites

That part of the script (the if statement) is correct, i meant the first line underneath the if statement

 

 

Scriptname DFLTOonTriggerEnter extends ObjectReference

scene property myscene auto
quest property myquest auto
int property nextStage auto

Event OnTriggerEnter(ObjectReference akTriggerRef)
    if akTriggerRef == Game.GetPlayer() && myQuest.GetStage() == 10
            myQuest.GetStage(nextStage)   ;<---- this one
            debug.notification("you entered the trigger area")
        endif
EndEvent

 

I'm not sure what you are trying to do with that one, the line above it will make sure that anything inside the if statement will only occur if the quest is at stage 10

Link to comment
Share on other sites

ive moved the script to a quest alias instead of on the trigger itself, and set a condition for the quest being on stage 10.

 

heres the new script. but nothing happens when i enter the trigger area.

Scriptname DFLTOonTriggerEnter extends ObjectReference  

scene property myscene auto
quest property myquest auto
int property nextStage auto

Event OnTriggerEnter(ObjectReference akTriggerRef)
	if  akTriggerRef == Game.GetPlayer()
			myQuest.setStage(nextStage)
			debug.notification("you entered the trigger area")
		endif
EndEvent
Link to comment
Share on other sites

  • Recently Browsing   0 members

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