Jump to content

[CK] Making an ability toggleable


craxmerax

Recommended Posts

I've been trying to make a spell toggleable. The one I wanted to edit was Midas' Shapeshift Wolf. I managed to make it toggleable and with no duriation, but I can't figure how to make it so that I can use the "Z" key to exit the shapeshift. As of now, I can shapeshift into a wolf, but not out of it. Hope there is an easy way to do this, but I can't seem to figure out how.

 

Thanks in advance!

Link to comment
Share on other sites

I think you just need to add a bit to the Event OnEffectStart function in the MidasSCPTShapeShift. Make it look like this, it just switches you back to your own race if you are currently the same race as the spell changes you too.

 

 

Event OnEffectStart(Actor Target, Actor Caster)
if (Target == None)
; 		Debug.Trace("Trying to transform something that's not an actor; bailing out.", 2)
	return
endif
OrigRace = Target.GetActorBase().GetRace()
if (OrigRace != PolymorphRace)
	Target.placeAtMe(appearExplosion)
	Target.SetRace(PolymorphRace)		
     else
	;change back to original
	Target.placeAtMe(appearExplosion)
	Target.SetRace(OrigRace)

endif
EndEvent

Link to comment
Share on other sites

  • Recently Browsing   0 members

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