Jump to content

Gorgon Stone Curse spell script


jboyd4

Recommended Posts

Hey all, I'm working on a gorgon race, have the snake hair and the snake lower body, and I've even created a spell that will turn someone to stone. But I'm having problems with it. One version paralyzes the target and turns his skin stone, which isn't bad. The issues with it are, the target falls over after being paralyzed and any followers the player may have will continue to attack the now stone target, killing them.

 

The second version replaces the target with a statue(eventually will make statue look like a vague humanoid) but for some reason the spell never ends. It is only supposed to last 30 seconds.

 

I used a modified version of the transmogrify script to cause the switch. here is the script.

 

Spell Property GGlare Auto

Actor Property Victim Auto

Actorbase Property Statue AUTO

OBJECTREFERENCE objStore
OBJECTREFERENCE newRefStore

dunTransmogrifyAnimal mainScript

EVENT onEffectStart(ACTOR akTarget, ACTOR akCaster)

objStore = akTarget
akTarget.disable()

newRefStore = akTarget.placeAtMe(Statue)

; //setting the master script to be the one with the stored vars
mainScript = newRefstore AS dunTransmogrifyAnimal
mainScript.storedActor = objStore

akTarget.stopCombat()


endEVENT

EVENT onEffectFinish(ACTOR akTarget, ACTOR akCaster)

;newRefStore.disable()
;akTarget.moveTo(newRefStore)
;akTarget.enable()

endEVENT

 

I also tried to write a completely new script, and while it half way works, for some reason the replacement model won't appear. Here's the script.

 

Spell Property GGlare Auto

Actor Property Victim Auto

Actor Property Statue AUTO

Event onEffectStart(Actor akTarget, Actor akCaster)

victim = akTarget
victim.Disable()
victim.placeatme(Statue)
Statue.Enable()
Utility.Wait(30)
Statue.Disable()
victim.Enable()

EndEvent

 

Both scripts compile fine, so I have no idea why neither works like I want. Now on the second one I change the property to actor instead of actor base because when it was actor base the script wouldn't compile saying that enable wasn't a function. Thanks for any help you can give.

Link to comment
Share on other sites

Good thought, I never considered having the ai shut of for a bit. So, The script would be

 

Spell Property GGlare Auto

Actor Property Victim Auto

 

Event onEffectStart(Actor akTarget, Actor akCaster)

victim = akTarget
victim.enablea.(false)
victim.setunconscious(true)
Utility.Wait(30.0)

victim.setunconscious(false)

victim.Enableai(true)

EndEvent

 

Do you think that would work?

 

One question though, what would shutting the ai off do to the player character. Because I intend the gorgons to be a playable race, but also to be enemy npcs.

Edited by jboyd4
Link to comment
Share on other sites

Yes, but what's with the utility.wait(30.0) line? If you want to make it last 30 secs, you can give it a 30 sec duration, and enable ai and consciousness with oneffectfinish. Is this spell cast through hands, or whenever the victim looks at the eyes of the gorgon? The script could stack up and repeat each time the spell is triggered, the 30 sec part could cause lag.

 

Disabling the pc's ai does nothing, because the player has no ai. if you want the pc to not move, you could disable player's controls, there's a script for that.

Link to comment
Share on other sites

I didn't think about that, I'll be honest scripts are really not my thing. I already have the spell set for 20 seconds(recently changed it from 30). But when I tested out that script in game, the followers still attacked the paralyzed target. So, either the setunconscious didn't work or something else is a problem there.

 

No, I was just worried that there would be some kind of glitch if the game tried to take away the player's ai and since the player doesn't have ai it would have issues, but if you think that wouldn't be a problem then never mind. And the spell is a lesser power(activated by using the power/shout button).

Link to comment
Share on other sites

Still didn't work, the followers still attack the target, here's the script

 

Scriptname TurnToStone extends activemagiceffect

 

Spell Property GGlare Auto

 

Actor Property Victim Auto

 

Event onEffectStart(Actor akTarget, Actor akCaster)

 

victim = akTarget

victim.enableai(false)

victim.setunconscious(true)

 

endEvent

 

Event onEffectFinish(Actor akTarget, Actor akCaster)

 

victim = akTarget

victim.enableai(true)

victim.setunconscious(false)

 

endEvent

 

I also wrote one for if the target is the player character.

 

Scriptname TurnPlayerToStone extends activemagiceffect

 

Spell Property GGlare Auto

 

Actor Property Player Auto

 

Event onEffectStart(Actor akTarget, Actor akCaster)

 

if Player == akTarget

Game.DisablePlayerControls()

endIf

 

endEvent

 

Event onEffectFinish(Actor akTarget, Actor akCaster)

 

if Player == akTarget

Game.EnablePlayerControls()

endIf

 

endEvent

Link to comment
Share on other sites

  • Recently Browsing   0 members

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