Jump to content

Papyrus Script Help


AntiiMatter

Recommended Posts

Sooo I've downloaded the Creation Kit just recently, and through experimentation I've managed to add in a new spell, magic effect, and spell tome. I managed to get the player access to the spell via the spell tome that I placed in game somewhere. (in a test location for now)

 

Im actually trying to script that will teleport the player to the spells impact location, but none of the events I've put into my script seem to ever fire.

This is what I have in my script so far:

 

Scriptname ConjureSelfScript extends activemagiceffect  
{Used in the ConjureSelf Spell Mod}

Event OnEffectStart(Actor akTarget, Actor akCaster)
 Debug.MessageBox("Magic effect was started on " + akTarget)
endEvent

Not much, I know. But like I said I cant even get the OnEffectStart event to fire. Is there another event that I might need to use?

Also, the 'explosion' property in my magic effect doesnt seem to do anything at all when it hits a target.

And.... finally, the Hit Effect Art only seems to show when it hits an actor, not a location like the ground or a surface.

 

Thanks for any help you might be able to give me :)

Link to comment
Share on other sites

  • 4 months later...
  On 2/14/2012 at 8:27 PM, Mysticyx said:

http://skyrim.nexusmods.com/downloads/file.php?id=8535

 

That mod does what you described. The way he does it, is by summoning an invisible actor, copying the location, deleting the invisible actor and then moving the player to that location.

 

How exactly do you get the position of the invisible actor? Specifically im asking, once you summon something... How do you get its location exactly?

Link to comment
Share on other sites

Dunno why he used an invis actor. He could simply use a marker object, such as the XMarker.

 

float Xpos = XMarker.GetPositionX()

float Ypos = XMarker.GetPositionY()

float Zpos = XMarker.GetPositionZ()

 

or a possible shortcut because the x,y and z positions are defined as properties in ObjectReference script:

 

float Xpos = XMarker.X

float Ypos = XMarker.Y

float Zpos = XMarker.Z

Edited by steve40
Link to comment
Share on other sites

  On 2/9/2012 at 12:39 AM, AntiiMatter said:

But like I said I cant even get the OnEffectStart event to fire.

 

Then the Magic Effect isn't being applied. Check that there isn't a Condition Function on the magic effect that might be preventing it from activating.

 

Oh, and I think it is the Impact Data Set that applies a hit effect to the ground, the Hit Effect Art is for the actor. If the explosion effect doesn't work, either it's because the magic effect isn't firing (even though the spell is casting) or the effect that you've selected isn't suitable to be used as an explosion effect.

Edited by steve40
Link to comment
Share on other sites

  • Recently Browsing   0 members

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