Jump to content

Need help with scripting


Grolll

Recommended Posts

Dear experienced modders and scripters,

 

im working on some content that in my opinion are missing in the world of skyrim but im more the kind of visual-modder having some issues with proper scripting. So i really would appreciate the help of a nice guy/girl who has experience with papyrus-scripting.

Right now i only got problem with one specific script that actually should be dead simple... but well it doesnt work though.

But in the future i´ll definitely will need more assistance on that topic so i would be glad if someone also would cooperate on future work.

 

so far

Gaedel

Link to comment
Share on other sites

Sorry for that. I was also looking for someone who might be interested in future coop-work so i kinda forgot to post the script:

 

The script i want for a DwemerButton is supposed to check the inv for an MiscItem (let´s call it MagicalKey - I didn´t add the "if" so far...). If the MKey count is >=1 I want the Event to anim the button and FastTravel the player to an xmarkerheading in another cell. ((It would be great if there is a posibility to game.fadeout bevor travel and fadein after but that aint necc)). If The MKey count is below I want the script to block the anim and debug a LackTheItem mes. I tried different versions but right now the fastTravel aint even working. It is starting but it always brings the player back to the original position...

""

 

Scriptname ButtonPortalScript extends ObjectReference

 

objectreference property XMark1 auto

sound property QSTAstrolabeButtonPressX auto

objectReference property objSelf auto hidden

 

event onCellAttach()

objSelf = self as objectReference

playAnimation("Open")

endEvent

 

 

auto state open

event onActivate(objectReference akActivator)

goToState("waiting")

playAnimationAndWait("Trigger01","done")

if QSTAstrolabeButtonPressX

QSTAstrolabeButtonPressX.play(objSelf)

endif

gotostate("open")

game.fasttravel(XMark1)

endEvent

endState

 

state waiting

endState

""

Link to comment
Share on other sites

Do you have your properties linked up with the correct objects? I was trying to do a script to give and object and it didn't do anything until i figured that trick out.
Link to comment
Share on other sites

Yes i tried to change them time by time but it didnt do anything. In the end the script should look something like this:

 

""

 

Scriptname ButtonPortalScript extends ObjectReference

 

sound property QSTAstrolabeButtonPressX auto

objectreference property XMark1 auto

objectReference property objSelf auto hidden

miscObject property MagicalKey auto

message property lackTheItem auto

 

 

event onCellAttach()

_objSelf = self as objectReference

_playAnimation("Open")

endEvent

 

 

auto state open

_event onActivate(objectReference akActivator)

__ifif (getPlayer().getItemCount(MagicalKey)>=1)

___goToState("waiting")

___playAnimationAndWait("Trigger01","done")

___if QSTAstrolabeButtonPressX

____QSTAstrolabeButtonPressX.play(objSelf)

___endif

___goToState("open")

___game.fasttravel(XMark1)

__else

__trace (Self + "waiting")

__LackTheItem.show()

_endEvent

endState

 

state waiting

endState

""

 

Btw: Does the scripted fasttravel ignore "CantTravelfromHere"? Or is it only usable to fasttravel from ext to ext cell?

Link to comment
Share on other sites

I don't really see anything wrong with your script. I don't know, but I doubt the fast travel script function would work if you can't normally fast travel from the cell. You can try replacing "game.fasttravel(XMark1)" with "akActivator.MoveTo(XMark1)" for now and see if the script works. Also, you should post your script inside the code tags to preserve formatting.
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...