tonycubed2 Posted March 30, 2012 Share Posted March 30, 2012 Greetings, I am getting the error that there is no such function as IsInterior when I know there is. Any help truly appreciated. Here is the short script: Scriptname FtravelAmbush Extends ObjectReference import Game import Utility ObjectReference Property presentlocal Auto Event OnCellLoad() presentlocal = (GetPlayer().GetCurrentLocation()) if presentlocal.IsInterior()) Utility.Wait(20) GetPlayer().PlaceAtMe (LivingDead ,10) EndIf EndEvent ActorBase Property LivingDead Auto ActorBase Property Warlock Auto Link to comment Share on other sites More sharing options...
fg109 Posted March 30, 2012 Share Posted March 30, 2012 IsInterior is a function of the Cell script. You have 'presentlocal' as an object reference. Another thing that's wrong is that you set 'presentlocal' equal to a location. That won't compile because a location is neither a cell nor an object reference. Link to comment Share on other sites More sharing options...
tonycubed2 Posted March 30, 2012 Author Share Posted March 30, 2012 Thanks for reply. I changed to extending cell, but can't find a papyrus script command to get the location as a cell to see if the payer is outdoors. Can I beg you To be more specific? My skills are average on a good day. But i am trying to learn. Here is my mod: http://skyrim.nexusmods.com/downloads/file.php?id=12452 Link to comment Share on other sites More sharing options...
fg109 Posted March 30, 2012 Share Posted March 30, 2012 I mean that instead of using this: presentlocal = (GetPlayer().GetCurrentLocation()) use this: presentlocal = (GetPlayer().GetParentCell()) Link to comment Share on other sites More sharing options...
tonycubed2 Posted April 1, 2012 Author Share Posted April 1, 2012 Thank you, using that and correcting the quest extended got the script working, had to change a few more things. All I need now is the command for stopping the quest and resetting it. The wiki says to use Function Stop() native with the example being Funquest.Stop() but I cant get that to compile/work. The wiki link is : http://www.creationkit.com/Stop_-_Quest Please see the script below. What am I doing wrong now? The name of the quest is "FastTravelAmbushes2012" . This script is in the script section of the quest which is in turn part of the SM Event Node. The quest is firing off exactly as I want, I just need to reset teh quest so that it will fire off again the next fast travel time. The errors are "varialbe fasttravelambushes 2012 is undefined and none is not a known user-defined type. Scriptname FtravelAmbush Extends Quest import Game import Utility ObjectReference Property presentlocal Auto Event OnStoryChangeLocation(ObjectReference akActor, Location akOldLocation, Location akNewLocation) if !((GetPlayer().GetParentCell()).IsInterior()) Debug.MessageBox("is exterior") Utility.Wait(20) GetPlayer().PlaceAtMe (LivingDead ,10) EndIf FastTravelAmbushes2012.stop() FastTravelAmbushes2012.reset() EndEvent ActorBase Property LivingDead Auto ActorBase Property Warlock Auto Link to comment Share on other sites More sharing options...
tunaisafish Posted April 1, 2012 Share Posted April 1, 2012 Papyrus has no knowledge of the items in the game. If you want to refer to something then you need to tell it. Quest Property FastTravelAmbushes2012 Auto I noticed that this is a quest script, are you trying to stop and start the quest that this script is in?If that's the case then you'd only need Reset() Link to comment Share on other sites More sharing options...
tonycubed2 Posted April 1, 2012 Author Share Posted April 1, 2012 tunaisafish: That worked great, I am very close to having it all work. The script below now compiles and when the player enters a new location the SM Event fires off the quest that fires off the script below. However, I only want the ambushers to be spawned on a major location change, like with FastTravel. Not just moving from one adjacent cell to another. But every couple of minutes running it fires off again. I guess a new location is being entered? the line if !akOldLocation == akNewLocation was supposed to fix that but it has not... Any ideas? Scriptname FtravelAmbush Extends Quest import Game import Utility ObjectReference Property presentlocal Auto Event OnStoryChangeLocation(ObjectReference akActor, Location akOldLocation, Location akNewLocation) if !akOldLocation == akNewLocation if !((GetPlayer().GetParentCell()).IsInterior()) Debug.MessageBox("is exterior") ObjectReference PlayerRef = Game.GetPlayer() PlayerRef.PlaceActorAtMe (Ambushers1, RandomInt(1, 5)).StartCombat(Game.GetPlayer()) EndIf EndIf reset() EndEvent ActorBase Property Ambushers1 Auto ActorBase Property Warlock Auto Quest Property FastTravelAmbushes2012 Auto Link to comment Share on other sites More sharing options...
tunaisafish Posted April 1, 2012 Share Posted April 1, 2012 I'm not sure. I thought OnStoryChangeLocation only fired when the story manager started the quest.I hadn't noticed that event last time I posted. If you're using SM to start the quest then just call Stop() once the quest has done it's thing. Link to comment Share on other sites More sharing options...
Recommended Posts