jboyd4 Posted February 10, 2016 Share Posted February 10, 2016 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 AutoActor Property Victim Auto Actorbase Property Statue AUTOOBJECTREFERENCE objStoreOBJECTREFERENCE newRefStoredunTransmogrifyAnimal mainScriptEVENT 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() endEVENTEVENT 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 AutoActor Property Victim Auto Actor Property Statue AUTOEvent 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 More sharing options...
firepower02 Posted February 13, 2016 Share Posted February 13, 2016 How about you use enableai(false) it will freeze the target in place, and won't knock them over, add setunconscious(true) and they will be ignored, and just give them a stony effect shader. Link to comment Share on other sites More sharing options...
jboyd4 Posted February 13, 2016 Author Share Posted February 13, 2016 (edited) Good thought, I never considered having the ai shut of for a bit. So, The script would be Spell Property GGlare AutoActor 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 February 13, 2016 by jboyd4 Link to comment Share on other sites More sharing options...
firepower02 Posted February 15, 2016 Share Posted February 15, 2016 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 More sharing options...
jboyd4 Posted February 15, 2016 Author Share Posted February 15, 2016 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 More sharing options...
firepower02 Posted February 16, 2016 Share Posted February 16, 2016 The setunconscious() should work. Did you still use the paralyze instead of disabling the ai? Did you want targets to fall down, or just stand in place unable to move? Link to comment Share on other sites More sharing options...
jboyd4 Posted February 17, 2016 Author Share Posted February 17, 2016 I forgot to take the paralzye off. I wanted the spell art but forgot that the ai off would paralyze the target. I will test it out in the morning. Link to comment Share on other sites More sharing options...
firepower02 Posted February 17, 2016 Share Posted February 17, 2016 The ai off will not paralyze the target. It will just make them stand in place immobile. The unconscious will make them unconscious, but they can still move. You need both ai off and unconscious. Can you post your script? Link to comment Share on other sites More sharing options...
jboyd4 Posted February 18, 2016 Author Share Posted February 18, 2016 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 More sharing options...
firepower02 Posted February 18, 2016 Share Posted February 18, 2016 It should have worked, I have a similar spell, and when the target is hit with the spell, they are ignored until it wears off. Did you make sure the target is actually affected by the spell? Like they stop moving, and the followers still attack them? Link to comment Share on other sites More sharing options...
Recommended Posts