mightymuffin007 Posted August 12, 2012 Share Posted August 12, 2012 I went through the tutorial on the wiki, and I've been reading the wiki to understand scripting better. I thought I had enough understanding to just make simple script. I simply wanted to run a script when an IronSword is equipped. However, I can't even get the script to work on any weapon equipped. Here is what I have so far: Scriptname IronSwordAttempt3 extends ObjectReference {Attempt 3 of Making this script} Event OnEquipped(Actor akActor) if akActor == Game.GetPlayer() Debug.Trace("We were equipped by the player!") endIf endEvent I also tried applying a script onto the player. Here is what I did for that (applying it via a perk):Scriptname IronSwordAttempt5 extends Actor {Attemp 5} Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference) if akBaseObject as Weapon Debug.Trace("This actor just equipped a weapon!") endIf endEvent I attach the first script to the IronSword, while the other is attached to a perk which the player has. I know there are other methods of attaching scripts, but I'm just trying to figure out why my scripts aren't working on the current methods. When the CK compiles the script, it says there are no errors. Am I extending from the wrong scripts? Should there be properties or variables declared? Also - yes, I know these are direct copies from the wikis of these events. However, I thought that by doing that, I could see how I place scripts in the game. It must be something simple, but I just don't understand what it could be. Link to comment Share on other sites More sharing options...
Sjogga Posted August 12, 2012 Share Posted August 12, 2012 (edited) Have you enabled tracing? Otherwise nothing will happen.You can use debug.messagebox() and debug.notification(), instead of debug.trace() if you want to display text in game. Edited August 12, 2012 by Sjogga Link to comment Share on other sites More sharing options...
mightymuffin007 Posted August 12, 2012 Author Share Posted August 12, 2012 Holds up his hand for others to wait for him. Proceeds to place his forehead onto the desk at high speeds several times. Proceeds to ask others to facepalm at simple oversight. Thank you Sjogga for the response and help. Sorry to have bothered everyone on something that simple. Now, I need to go check into a hospital...I think that caused a mild concussion... Link to comment Share on other sites More sharing options...
Recommended Posts