Jump to content

porroone

Members
  • Posts

    237
  • Joined

  • Last visited

Everything posted by porroone

  1. Ok now, seems like what I was trying to do is either impossible through scripting or just more complex than I though, so basically what I wanted to do is make my 1h sword appear on the back using the SetAngle function, but looks like that only works for players, whenever I try to do that on a Weapon or Object it just says the function doesnt exist, so if anyone knows how to do what im trying to do but failing to do, I would really appreciate the help else thanks anyway because im THAT NICE.
  2. Ok got the OnUpdate working, looks like it just works on forms or actors, it doesnt like ObjectReference.
  3. So im trying to make my weapon show a message when its drawn, but im not havin much luck, I dont know how the OnUpdate event operates so I was hoping someone could shed some light into it. Here is the code: Scriptname TestScript extends ObjectReference Weapon Property WarGlaiveR auto Actor Property Player auto Function Register(Actor akActor) akActor.RegisterForUpdate(1) Debug.MessageBox("registed") endFunction auto State Iddle Event OnEquipped(Actor akActor) Register(akActor) GoToState("Update") endEvent endState State Update Event OnUpdate() if Player.IsWeaponDrawn() Debug.MessageBox("hello there") endIf endEvent Event OnUnequipped(Actor akActor) Debug.MessageBox("Back to idle") UnRegisterForUpdate() GoToState("Iddle") endEvent endState As you can see basically what im trying to do is to trigger the OnUpdate event when the weapon is equipped and once there well, the first line is to check if the Player has a weapon drawn, that much works since I tested it on the OnEquipped and OnUnequipped events, the OnUpdate event doesnt tho, I tried to add a Message box in the first line just to check if it was even registering the event but it seems it doesnt do anything.
  4. Yep, that was it, after hours of banging my head with the code it wasnt code related, I feel so dumb right now hehe, thanks a lot!! :D
  5. Im starting to think its because I already had the weapon in the inventory when I added the script to it, maybe if I make a new save without the mod then activate the mod again and recraft the weapon, any idea if that could be the reason? I think I had a similar issue back in oblivion but Im not sure.
  6. I think I missunderstood you, I left the original scriptname, the one that matches the name of the file as the wiki says it should, otherwise it doesnt let you compile anyways.
  7. Try Scriptname _Weapon_test extends ObjectReference {Weapon Script} Event OnUnequipped (Actor AkActor) if AkActor == Game.GetPlayer() debug.MessageBox("Hello World!") endif EndEvent Didn't work, I tried several combinations including declaring the weapon as a property, using the WEAPON extend, using event OnObjectUnequipped(Weapon WarGlaiveR), tried so many tings that something should had work, or at least gave me something, but no, instead all I got is a perfect compiled script, with zero results after unequipping the weapon on all attempts which after a few hours I find a bit frustrating, so Im gonna go sleep hoping tomorrow ill see things clearly :P
  8. So basically im trying to add an script to a weapon, but im not sure what im doing wrong, im trying something very simple but it doesnt seem to work, I was hoping somebody could point me in the right direction, here is the code: Scriptname WarGlaiveBack extends Actor import debug import game import utility Event OnObjectUnequipped(Form WarGlaiveR, ObjectReference akActor) Debug.MessageBox("Hello, world!") EndEvent Basically I have a weapon named WarGlaiveR, and I want it to show a messagebox when I unequipped.
×
×
  • Create New...