-
Posts
30 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by SamHe11
-
[LE] Quick Questions, Quick Answers
SamHe11 replied to Elias555's topic in Skyrim's Creation Kit and Modders
How am I supposed to use the MoveTo function? I created a Marker static in the CS and want to move it to the player's location with offsets (hence why i'm not just using SetLocation) so it is placed a few feet in front of the player. This is happening by way of a magic effect script. I created a property on the script and filled it with my Marker object. So the script I have looks similar to this... Actor PlayerRef Static property MyMarker auto PlayerRef = Game.GetPlayer() MyMarker.MoveTo(PlayerRef) ;no offsets for nowBut it doesn't compile and gives me the error.... MoveTo is not a function or does not existI'm not sure why it "doesn't exist" or is "not a function". I can replace MyMarker with PlayerRef in the function and send the player to other ObjectReferences locations. But putting the MyMarker property back in breaks it again. I can't figure out why. Any help? EDIT: Apparently I was supposed to set the property as an ObjectReference, not Static and place a reference of it somewhere in the world. Then fill it with the World Reference name I gave it. Seems to work now. -
I have this script attached to a Quest and I'm hoping someone can inform me how to discern if the ObjectReference variable I fill with GetCurrentCrosshairRef is an Actor type or not. I've tried... Actor TargetRef (more script, then...) TargetRef = Game.GetCurrentCrosshairRef() ...but then the compiler tells me type mismatch while assigning to a actor (cast missing or types unrelated)So I change my variable to... ObjectReference TargetRef...and everything compiles just fine. But doesn't this mean that the meat of my script will happen to any reference under my crosshair? I just want it to only effect Actor references. How can I make it tell them apart? I feel like I should know this, but it's late and I'm blanking. Thanks.
-
[LE] Help with a simple issue compiling a script
SamHe11 replied to SamHe11's topic in Skyrim's Creation Kit and Modders
This is what the problem was. I'd already installed SKSE, but I didn't have it extracted to the proper directories, hence the compiler not recognizing any of the SKSE functions. When I reinstalled it, everything worked perfectly. Thanks for the help. Sorry I'm such a bonehead. -
[LE] Help with a simple issue compiling a script
SamHe11 replied to SamHe11's topic in Skyrim's Creation Kit and Modders
Thanks for the help. I took your comment about the player switching weapons/spells while drawn into consideration and decided to revamp the script to check/force camera perspective when the "Ready Weapon" control is triggered instead. The script I now have compiles, but nothing's happening when I push the Ready Weapon button. Here's how it looks: The first message fires telling me the quest and script are starting correctly, but the debug message isn't popping up when the Ready Weapon control is pressed. I have the quest set to Start Game Enabled and Run Once. Is the script only processing once and then stopping b/c of a quest setting? Or do I just not have the code right? It's compiling...no errors for once...but nothing's happening when the Ready Weapon control is pressed. -
I'm new to papyrus scripting and am having some trouble transitioning from Oblivion script, which I was pretty good at years ago. I've spent a couple nights going over the beginner scripting tutorials on the CS website. I've tried applying what I've learned from them to create a script that forces a third person camera when the player's weapon is drawn, and then forces a first person camera when sheathed. Pretty simple. The script is attached to a quest that auto starts when the game loads. But what I have so far isn't compiling. I'm getting a couple of errors that have me stumped. Here's what it looks like: Scriptname shCameraScript extends Actor {Script for forcing the camera in or out depending on if the player has a weapon drawn.} bool WeaponOut = player.isweapondrawn() Function ForceFirstPerson() global if WeaponOut == true game.forcethirdperson() elseif WeaponOut == false game.forcefirstperson() endif endFunctionAnd the compiler output says this: Starting 1 compile threads for 1 files... Compiling "shCameraScript"... C:\program files (x86)\steam\steamapps\common\Skyrim\Data\Scripts\Source\temp\shCameraScript.psc(4,17): no viable alternative at input 'player' C:\program files (x86)\steam\steamapps\common\Skyrim\Data\Scripts\Source\temp\shCameraScript.psc(4,23): required (...)+ loop did not match anything at input '.' C:\program files (x86)\steam\steamapps\common\Skyrim\Data\Scripts\Source\temp\shCameraScript.psc(4,5): Unknown user flag player No output generated for shCameraScript, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on shCameraScript Not really sure what to do at this point.