skinnytecboy Posted November 14, 2015 Share Posted November 14, 2015 Ah I see (I think) Simply lock your door (requires key) and make an object reference to your door. To unlock and open (if you want to open it) MyDoor.lock(false)MyDoor.SetOpen Link to comment Share on other sites More sharing options...
Feralkyn Posted November 14, 2015 Author Share Posted November 14, 2015 Hey, thanks again for the answers :) Unfortunately it's not exactly what I'm after. I need to be able to actually disable and enable them; some are invisible load doors, as well as other markers and NPCs. Surely there's an enable/disable on quest stage script function? I have another portion where yes, the door is locked, and the player is meant to receive the key, but the script fragment to add the alias (key) to inventory (the original key is inside the locked house, the alias points to that) isn't functioning. Compiles fine, doesn't do anything. The other thing I'm still struggling with is compass pointers not working. I've set aliases for markers, objects and so on; the objectives and stages update, but only the first compass marker works. After that, there's nothing. Link to comment Share on other sites More sharing options...
skinnytecboy Posted November 14, 2015 Share Posted November 14, 2015 Oh.. (Again) Same trick with object reference properties (of course you need to set them as "initially disabled" in the render window). MyObjectReference.Enable() or MyObjectReference.Disable() You can call this function from wherever; a quest stage or a trigger box or even dialogue Link to comment Share on other sites More sharing options...
Feralkyn Posted November 14, 2015 Author Share Posted November 14, 2015 (edited) Thanks! I do need to do it inside a quest stage, specifically. Now, it looks to me like that snippet would need to be in an actual script, whereas the quest stages only accept code fragments? Ex. I'd need to be able to set a property to be referenced, and I can't. I tried using the alias instead, so it looks something like: Alias_NAME.GetReference().Enable() where NAME is of course the alias name. Now, I tried this with an actor and a horse NPC, and neither worked; it compiles, but the initially disabled NPC remains disabled. I'm unsure if I would need a different code for NPCs rather than inanimate objects such as doors. I'm probably misunderstanding where I'm meant to put the code you listed there, but hey, at least my compass markers are working now! (If anyone else happens across this, I had some quest stage numbers that were a little off--i.e. SetObjectiveCompleted(20) and SetObjectiveDisplayed(30) type of thing. Fixing them and starting a fresh savegame fixed the markers, not sure which did it!) Edited November 14, 2015 by Feralkyn Link to comment Share on other sites More sharing options...
skinnytecboy Posted November 14, 2015 Share Posted November 14, 2015 Where actors are concerned, they can't be "initially disabled". Objective references can however. Where aliases are concerned, you can use an XMarker to spawn the npc (watch the link I posted earlier). The real trick is, it doesn't matter where you put a script, but you need to at least understand functions (do this scripts) Hope I don't sound cruel. I remember what it was like. My advice remains the same.... Google it until your fingers hurt ;) Link to comment Share on other sites More sharing options...
Feralkyn Posted November 14, 2015 Author Share Posted November 14, 2015 (edited) It isn't a matter of where to put the script--it's a matter that you cannot put full scripts into Quest Stage papyrus fragment boxes? You wouldn't be able to edit the properties then, or what am I missing? I understand how functions, references and so forth work, I just need a script fragment to enable/disable references (via alias or what have you). Trust me, I have been Googling, couldn't find it, that's why I'm here. I'd think it'd be something very simple, but I can't find it anywhere. I did not know you couldn't disable actors at first, though. It worked with an animal follower, but it won't work with the horse? Thanks for your time, regardless; it's definitely a learning experience. I'll look into X-Marker linking in a moment and see if that works! Edit--aaaare you aware that for tutorials you linked your own vid with a "backstage moment" easter egg?! xD (The other, earlier one is how to create a follower, which is sadly unrelated and doesn't have anything about enabling/disabling) Edited November 14, 2015 by Feralkyn Link to comment Share on other sites More sharing options...
skinnytecboy Posted November 15, 2015 Share Posted November 15, 2015 (edited) Doh! https://youtu.be/Qfcet5hf5bs This chap shows you how to enable an alias via an XMarker. (Think it's the 2nd tutorial). Scripts in the quest tab are really only used for native functions... myhorse.DoThis() If you need a quest stage to do something more with with scripts, then look into script casting or kmyquest. Are you just trying to simply enable/disable a horse? If so, why not instead look at teleporting him elsewhere? Edited November 15, 2015 by skinnytecboy Link to comment Share on other sites More sharing options...
Feralkyn Posted November 15, 2015 Author Share Posted November 15, 2015 Ahh, I'd gone through this tutorial yeah. I didn't remember there being a bit about an x-marker, so I'll watch again! Thanks. And as I said it's going to be a lot of things. I need to know how to enable/disable for: - Doors- Invisible Doors- Actors- Horse- Sound/Trigger Boxesetc. It seems like it'd be a pretty vital thing to know for generally making an immersive quest! Link to comment Share on other sites More sharing options...
skinnytecboy Posted November 15, 2015 Share Posted November 15, 2015 (edited) Here's the clip: https://youtu.be/G3VBVF3vaGA For objects placed in the game (render window inside ck) For enabling/disabling objects In your quest stage tab add an object reference property and point it to the object in question. Then write the code MyObjectReference.Enable() Or MyObjectReference.Disable()(note: if you're enabling an object, you'll need to set it as initially disabled in the render window) For aliases Create an XMarker in your cell.Create an alias that points to it, call it spawnmarker. Create an alias for your actor,(MyActor) But select the "create reference to object" and create at spawnmarker. Set the alias to initially disabled. In your quest stage tab Alias _ myactor.getreference().Enable() Note: The marker alias must be placed above the actor alias. Also, always test from a clean save. You can test via console right from the game menu coc mycellname Setstage myquestname 5 You can also check if things are firing correctly Sqv myquestname will tell you if aliases are loaded. Edited November 15, 2015 by skinnytecboy Link to comment Share on other sites More sharing options...
Feralkyn Posted November 15, 2015 Author Share Posted November 15, 2015 (edited) Yeah, I've definitely been having to test by cocing directly from the loadscreen. These scripts are temperamental xD The enable with an object reference set through a property/alias worked beautifully, thank you. Should open up a lot of possibility! I'll try the x-marker for my actor once I've sorted out a few other kinks, but it's much appreciated :D Edited November 15, 2015 by Feralkyn Link to comment Share on other sites More sharing options...
Recommended Posts