wulfy1 Posted June 9, 2011 Share Posted June 9, 2011 At a stage of a quest, an NPC is given an escort package through dialogue and the zone trigger is enabled during that same quest stage in the quest stage result script. The escort runs from just south of Vilverin to Crestbridge. Once at crestbridge, the NPC stops her escort package as the player steps into the previously enabled zone trigger. The zone trigger will not fire about 95% of the time. If I open menu mode, the trigger always fires, if I am standing in the trigger. I can dance in and out of the zone but unless I open menu mode, it wont fire. I have tried multiple script approaches listed below but none of them work. I have deleted the trigger, and the script repeatedly. I have gone from enabling it during a dialogue script result to the quest stage result etc etc, which is probably irrelevant since it is obviously there since i can trigger it by opening menumode (map, dialogue anything) I have gone from the simplest *which works on other triggers I'm using example 1)short triggeredzone begin OnTrigger If triggeredzone == 0 blah blah blahset triggeredzone to 1disableendifend I have also done this variation with "begin ontrigger player" "begin ontrigger playerref" "begin ontriggeractor player" "begin ontriggeractor playerref" example 2) short triggeredzone begin ontrigger if isactionref player == 1 && triggeredzone == 0 blahblahblah set triggeredzone to 1disableendifend example 3) short triggeredzoneshort doonce begin OnTrigger set triggeredzone to 1end begin gamemode If triggeredzone == 1 && doonce == 0 blah blah blahset doonce to 1endifend I really have no idea why this isn't working. It's been driving me crazy for weeks if not months. Any help, guidance etc would be great. Wulf Link to comment Share on other sites More sharing options...
wulfy1 Posted June 9, 2011 Author Share Posted June 9, 2011 This is my current iteration of the script ... still doesn't work SCN SASShaeleighInnEXTMarkerSCRIPT short Triggered begin OnTriggerActor If IsActionRef Player == 1 && Triggered == 0 Set Triggered to 1 EndIf End Begin GameMode If Triggered == 1 Setstage SavingSammiandAshani 151 SASShaeleighRefA.RemoveScriptPackage SASShaeleighRefA.StartConversation Player "SSaSHDDA" SASShaeleighPointACellRefA.enable DisablePlayerControls EndIf End Link to comment Share on other sites More sharing options...
Astymma Posted June 9, 2011 Share Posted June 9, 2011 I do know that IsActionRef does not function inside an OnTrigger but only inside an OnActivate. I would imagine the following would function normally... SCN SASShaeleighInnEXTMarkerSCRIPT short Triggered short doOnce begin OnTriggerActor player if Triggered == 0 set Triggered to 1 endif end begin GameMode if Triggered == 1 && doOnce = 0 Setstage SavingSammiandAshani 151 SASShaeleighRefA.RemoveScriptPackage SASShaeleighRefA.StartConversation Player "SSaSHDDA" SASShaeleighPointACellRefA.enable DisablePlayerControls set doOnce to 1 endif end but you appear to have tried a variation like this... Link to comment Share on other sites More sharing options...
wulfy1 Posted June 9, 2011 Author Share Posted June 9, 2011 I do know that IsActionRef does not function inside an OnTrigger but only inside an OnActivate. I would imagine the following would function normally... SCN SASShaeleighInnEXTMarkerSCRIPT short Triggered short doOnce begin OnTriggerActor player if Triggered == 0 set Triggered to 1 endif end begin GameMode if Triggered == 1 && doOnce = 0 Setstage SavingSammiandAshani 151 SASShaeleighRefA.RemoveScriptPackage SASShaeleighRefA.StartConversation Player "SSaSHDDA" SASShaeleighPointACellRefA.enable DisablePlayerControls set doOnce to 1 endif end but you appear to have tried a variation like this... Yeah, I have tried that too. I just don't get it. Is there some inherent problem with using zone triggers outdoors? Is there a problem with other things colliding with and disabling them, even if you specify that the player is the action ref? Is it bad to make them big to give the player a better chance of triggering them? There has to be something going on here and I just don't get it. Link to comment Share on other sites More sharing options...
fg109 Posted June 9, 2011 Share Posted June 9, 2011 Did you try the script Astymma posted? It looks a lot like the one you have, except that there's a doOnce variable in the gamemode block. If all your scripts were missing something like the doOnce variable there, it would explain what happens in your first post. Link to comment Share on other sites More sharing options...
wulfy1 Posted June 9, 2011 Author Share Posted June 9, 2011 Did you try the script Astymma posted? It looks a lot like the one you have, except that there's a doOnce variable in the gamemode block. If all your scripts were missing something like the doOnce variable there, it would explain what happens in your first post.Yeah, I tried it. Sorry it took me a bit to reply. I think there is something screwed up in my es p or something which super sucks because it is a lot of stuff. Just to reload all the clothing and armor would take a couple of days not to mention remaking all the quests and races etc. Kind of sucks... bad lol. I may have to break off my current esp to a point before I started having this problem. I have probably a dozen or so triggers that work just fine in the earlier parts of this mod. I may just have to remake the current quest as a part II esp or something and try to combine them. Wulf Link to comment Share on other sites More sharing options...
wulfy1 Posted June 9, 2011 Author Share Posted June 9, 2011 Do you guys think its possible that I have a script with a gamemode block clogging up the works, making it only possible to allow a trigger script to fire when i go into menu mode? just so you know, this mod is pretty complex. 6 companions, 12 quests plus the 6 companion quests, all scripted. several cells with triggers and about 40ish npcs. I also noticed that at various times it seems that at the beginning of combat, the combat AI seems to hang when there are more than like 5 targets for the companions to choose from. This is my first mod so I know very little about scripting. Tell me what you think. I know that triggers fire in gamemode BUT what if, when the action of a script spamming the crap out of the world finally ceases it gives that trigger the briefest moment to trigger before menu mode is actually all the way engaged. Wulf Link to comment Share on other sites More sharing options...
Astymma Posted June 9, 2011 Share Posted June 9, 2011 In my code I made an errorif Triggered == 1 && doOnce = 0should beif Triggered == 1 && doOnce == 0 Link to comment Share on other sites More sharing options...
Astymma Posted June 9, 2011 Share Posted June 9, 2011 Do you guys think its possible that I have a script with a gamemode block clogging up the works, making it only possible to allow a trigger script to fire when i go into menu mode? just so you know, this mod is pretty complex. 6 companions, 12 quests plus the 6 companion quests, all scripted. several cells with triggers and about 40ish npcs. I also noticed that at various times it seems that at the beginning of combat, the combat AI seems to hang when there are more than like 5 targets for the companions to choose from. This is my first mod so I know very little about scripting. Tell me what you think. I know that triggers fire in gamemode BUT what if, when the action of a script spamming the crap out of the world finally ceases it gives that trigger the briefest moment to trigger before menu mode is actually all the way engaged. Wulf Well, sometimes if you add something like IsActionRef to anything *besides* an OnActivate block, it will block that thread until you do activate something (menus are included I believe) and then suddenly finish execution. Another possibility is that you have too much scripted activity and npc's in one area. Opening a menu will pause AI and all GameMode block scripts which would suddenly give your script time to execute. Link to comment Share on other sites More sharing options...
wulfy1 Posted June 10, 2011 Author Share Posted June 10, 2011 Do you guys think its possible that I have a script with a gamemode block clogging up the works, making it only possible to allow a trigger script to fire when i go into menu mode? just so you know, this mod is pretty complex. 6 companions, 12 quests plus the 6 companion quests, all scripted. several cells with triggers and about 40ish npcs. I also noticed that at various times it seems that at the beginning of combat, the combat AI seems to hang when there are more than like 5 targets for the companions to choose from. This is my first mod so I know very little about scripting. Tell me what you think. I know that triggers fire in gamemode BUT what if, when the action of a script spamming the crap out of the world finally ceases it gives that trigger the briefest moment to trigger before menu mode is actually all the way engaged. Wulf Well, sometimes if you add something like IsActionRef to anything *besides* an OnActivate block, it will block that thread until you do activate something (menus are included I believe) and then suddenly finish execution. Another possibility is that you have too much scripted activity and npc's in one area. Opening a menu will pause AI and all GameMode block scripts which would suddenly give your script time to execute. Astymma ... you may very well be my new bestest friend. You were right on the money with the IsActionRef suggestion. After a few minutes of thinking about that, I decided to look at an object I made with an IsActionRef on it. Removing the script from this item stopped my problem. Now I know what to look for if it happens again. On the upside, having this problem prompted me to clean up all my scripts and disable overhead processes when they aren't needed. Thank you so much for the enlightening discussion. Kudos go to you. I really appreciate you letting me use your brain. Wulf Link to comment Share on other sites More sharing options...
Recommended Posts