Graesholt Posted January 23, 2011 Share Posted January 23, 2011 Hi, I'm currently working on an Object script, which runs "OnEquip". Now, when I put in what I want the script to do, I put "Player." in front of everything, though I would like the script to work on anyone who equips the item... So what can I put instead of player to make this happen? Thx :D Link to comment Share on other sites More sharing options...
Deleted1848331User Posted January 23, 2011 Share Posted January 23, 2011 scn InsertScriptNameHere ref Self Begin OnEquip Set Self to GetSelf ;insert code here end Link to comment Share on other sites More sharing options...
Graesholt Posted January 23, 2011 Author Share Posted January 23, 2011 But what do i then put instead of player in my script? like: Player.Additem XXXXX Player.Removespell XXXXX They would be called? Link to comment Share on other sites More sharing options...
wetblanket Posted January 23, 2011 Share Posted January 23, 2011 I'm no coder but presumably: Self.Additem XXXXX Self.Removespell XXXXX Make sense :) ? Link to comment Share on other sites More sharing options...
Deleted1848331User Posted January 23, 2011 Share Posted January 23, 2011 Yeah, I see I left that out :sweat: But wetblanket is right, it would be Self.AddItem XXXXX or Self.RemoveItem XXXXX etc. Link to comment Share on other sites More sharing options...
Graesholt Posted January 24, 2011 Author Share Posted January 24, 2011 Nice! Thanks you guys :D Link to comment Share on other sites More sharing options...
Recommended Posts