NateFreakinGreat Posted August 14, 2012 Share Posted August 14, 2012 I would like to start by offering my thanks for stopping in and taking the time to read over my post. Much obliged. I'm a long term member of these sites. I LOVE to mod, and I've even donated to the sites to support those that mod and keep this stuff up and running. Giving back is important. I'm sure this has become an issue for many people in the modding community. This new language that Skyrim's scripts seem to be using has thrown me for a loop. Getting used to the Papryus language is going to take me some amount of mental adjustment no doubt, but I'm stubborn, thick skinned, and readily willing to do whatever it takes to get my current mods ported over to Skyrim as fast as possible. I have a few decent pieces of work that I would LOVE to share with Skyrim as well. That being said, I want to ensure the quality of my mods remain intact as well during the transfer between languages. I like my effort to show through in the results. So having a complete understanding of the functions is a must. I'm just now looking into this, because I have recently acquired Skyrim and now I have the time. My intent here is simple, to get this damn ring's script working. Lol. It's not a long or difficult task, I'm sure. An experienced Skyrim modder will probably be able to fix it up in a jiffy. I would appreciate an explanation of what you recommend doing, and why it was necessary. I'm not simply here to copy and paste. I want the learning experience as well. I will value THAT more than the solution itself. The beauty lies in the details, my friends. The script is meant to simply disable the game's AI and the game's NPC detection features (hearing and sight), by using the respective commands upon equipping/unequipping the ring. The purpose for this is because due to my current mod in progress, I use these functions A LOT (more than you realize), so I am attempting to save myself the maddening, repetitive typing time through the console. Plus, I think it's simply freakin' cool and it's a learning experience for me, hence this spiel. At any rate, here is my ring's script, which will currently not compile. It is a script with no properties attached yet (I don't even know if I need them right now), simply added onto a ring via the "Add" button, attached to the bottom right hand corner of the ring's editor menu. I gave it a basic name, and entered the commands I thought might do the trick. Here is what I have so far. Don't laugh. I know it's probably way off. I've never done ANY work with Papyrus yet. Just because I've modded for Oblivion for years doesn't mean I'm beyond being humbled by new things. Scriptname AAAToggleDetection extends ObjectReference Event OnEquipped(Actor akActor) If akActor == Game.GetPlayer() Game.ToggleAI 0 Game.ToggleDetection 0 EndIf EndEvent Event OnUnequipped(Actor akActor) If akActor == Game.GetPlayer() Game.ToggleAI 1 Game.ToggleDetection 1 EndIf EndEvent I don't know what I'm doing wrong. It won't save without a compilation error, and obviously won't work in game either. Before anyone asks, here is the script's error output: Starting 1 compile threads for 1 files...Compiling "AAAToggleDetection"...c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\AAAToggleDetection.psc(5,5): no viable alternative at input 'ToggleAI'c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\AAAToggleDetection.psc(6,5): no viable alternative at input 'ToggleDetection'c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\AAAToggleDetection.psc(12,5): no viable alternative at input 'ToggleAI'c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\AAAToggleDetection.psc(13,5): no viable alternative at input 'ToggleDetection'No output generated for AAAToggleDetection, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on AAAToggleDetection Again, thanks in advance for the help, whoever offers it to me. I'm here to learn. Someone teach me something. Link to comment Share on other sites More sharing options...
gsmanners Posted August 14, 2012 Share Posted August 14, 2012 I think what you want is EnableAI, which is a method for an Actor. Link to comment Share on other sites More sharing options...
tonycubed2 Posted August 20, 2012 Share Posted August 20, 2012 OK. You can import the Game scritp and save typing and clutter. Then, use EnableAi . Remember that console commands and papyrus commands are not interchangeable. In any case, I can get you halfway there, I could not find the papyrus equivalent for toggle detection. Scriptname AAAToggleDetection extends ObjectReference Import Game Event OnEquipped(Actor akActor) If akActor == Game.GetPlayer() akActor.EnableAI(false) ; turns it off EndIf EndEvent Event OnUnequipped(Actor akActor) If akActor == Game.GetPlayer() akActor.EnableAI() ; turns it on EndIf EndEvent Link to comment Share on other sites More sharing options...
Recommended Posts