Beccy Posted February 23, 2014 Author Share Posted February 23, 2014 Possibly not, trying again Link to comment Share on other sites More sharing options...
Beccy Posted February 23, 2014 Author Share Posted February 23, 2014 Hmmm new code same effect, 5s buff but it doesn't trigger over the actors i highlighted, both hostile and non-aggressive like last time :( Link to comment Share on other sites More sharing options...
Xander9009 Posted February 23, 2014 Share Posted February 23, 2014 (edited) I think I might know what's wrong. The looping while I used might have been preventing the other event from firing. I should have realized that. Try this. Event onEffectStart(Actor akTarget, Actor akCaster) if (akCaster.HasMagicEffect(vPHOECDFF)) dispel() debug.trace("FMR ---> Phoenix Strike failed because of cooldown.") return endif caster = akCaster RegisterForCrosshairRef() Endevent Event OnCrosshairRefChange(ObjectReference ref) If ref as Actor Debug.Notification("Found an actor") UnregisterForCrosshairRef() target = ref as Actor TriggerMovement() EndIf EndEvent Function TriggerMovement() if ( target ) && ( target.getFlyingState() == 0 ) if (bMain) vs.UpdateAffinityProgress(sIndex) vs.UpdateXP(sIndex = sIndex, fMin = 5.0, fMax = 10.0, fGrowth = 1.5, bQuiet=0) endif caster.doCombatSpellApply(PHOECD, caster) sfx00.play(caster) efx.play(caster) If !caster Debug.Notification("Caster is empty") EndIf fx1 = caster.getPositionX() fy1 = caster.getPositiony() fz1 = caster.getPositionz() fx2 = target.getPositionX() fy2 = target.getPositiony() ; fx2 = target.getPositionX() + (120 * Math.Sin(target.GetAngleZ())) ; fy2 = target.getPositiony() + (120 * Math.Cos(target.GetAngleZ())) fz2 = target.getPositionz() debug.trace("FMR ---> Phoenix Strike moving the player character now.") caster.translateto(fX2, fY2, fZ2, 0.0, 0.0, 0.0, 3000.0) else dispel() if ( target ) debug.trace("FMR ---> Phoenix Strike failed because target is flying.") else debug.trace("FMR ---> Phoenix Strike failed because target is None.") endif endif EndFunction Edited February 23, 2014 by Xander9009 Link to comment Share on other sites More sharing options...
Beccy Posted February 23, 2014 Author Share Posted February 23, 2014 (edited) do i still need the EndEvent at the bottom of this? because i'm getting this : Starting 1 compile threads for 1 files... Compiling "vRiftEffectScript"... C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\vRiftEffectScript.psc(30,9): function variable target already defined in the containing script C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\vRiftEffectScript.psc(60,0): mismatched input 'EndIf' expecting ENDFUNCTION C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\vRiftEffectScript.psc(62,0): script event oncrosshairrefchange already defined in the same state No output generated for vRiftEffectScript, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on vRiftEffectScript Edited February 23, 2014 by Beccy Link to comment Share on other sites More sharing options...
Xander9009 Posted February 23, 2014 Share Posted February 23, 2014 (edited) Edited it. It should have been EndFunction. For the record I'm going to sleep. If it doesn't work, I'll help when I wake up if someone else hasn't already. Edited February 23, 2014 by Xander9009 Link to comment Share on other sites More sharing options...
Beccy Posted February 23, 2014 Author Share Posted February 23, 2014 <3 Xander, Thank you for all your help so far, sweet dreams! Link to comment Share on other sites More sharing options...
Beccy Posted February 23, 2014 Author Share Posted February 23, 2014 Wish i could report it working so you could sleep easier, but this too has hit a brick wall, the script compiled fine, sadly it has the same effect ingame, the buff runs for 5s but nothing i do will make it have any effect on hostile, or non-hostile actors. Beccy Link to comment Share on other sites More sharing options...
Xander9009 Posted February 23, 2014 Share Posted February 23, 2014 Did you get any notifications? Link to comment Share on other sites More sharing options...
Beccy Posted February 23, 2014 Author Share Posted February 23, 2014 (edited) None that i saw, i was looking. Also, i just had a reply from Ogerboss (Requiem Author) Saying he's no idea how his mod could overide or interfere with the GetCombatTarget function, though the function isn't greatly documented on the CK Wiki Its possible its interfering in a way he's unaware of. He did however point out that for akTarget to function properly the CK aspects of the spell need to be adjusted to Target/Projectile rather than Self - However i think this is going to stop the spell from working because all the other effects of the spell are basically on Self, From what i gather (With my limited brain!) The spell looks for a target, moves you to their position then slows time and knocks down neaby targets, the target of the spell is never the 'epicenter' just the source of the location for your players movement. unless i'm wrong. Beccy *Edit*Oh! and get to bed! :P I've waited 2 weeks to get this far with a fix, you've done more than enough already. Mush, Sleep. Edited February 23, 2014 by Beccy Link to comment Share on other sites More sharing options...
IsharaMeradin Posted February 24, 2014 Share Posted February 24, 2014 Off the wall thinking... Not even sure how to do it... Create another spell that uses target/projectile rather than self.Use the first spell to cause the caster to cast the second spell at the target Since the first spell's script can get the target for moving the caster to that spot, then it should be able to be passed off as the target for the second spell.http://www.creationkit.com/Cast_-_Spell Link to comment Share on other sites More sharing options...
Recommended Posts