Checking if target is an actor?

Post » Tue May 17, 2011 6:25 am

Heyas

I modified a spell from Supreme Magicka, but I can't figure out how to make it work only on actors instead of anything.

;*****************************************************************************************************************
; Edited SM Blink Spell
;*****************************************************************************************************************
scn XtRushScript

float Num
float AngX
float AngZ
float W
float X
float Y
float Z
float pX
float pY
float pZ

Begin ScriptEffectStart

If GetIsReference Player == 0
Return
Endif

Set AngX to Player.GetAngle X * -1
Set AngZ to Player.GetAngle Z * -1 + 90
Set pX to Player.GetPos X
Set pY to Player.GetPos Y
Set pZ to Player.GetPos Z + 120
Set Num to 0

Set Num to Num + 1
Set W to 50 * Num * Cos AngX
Set X to pX + W * Cos AngZ
Set Y to pY + W * Sin AngZ
Set Z to pZ + (50 * Num * Sin AngX)
SMLOSActivatorRef.SetPos X X
SMLOSActivatorRef.SetPos Y Y
SMLOSActivatorRef.SetPos Z Z

while (Player.GetLOS SMLOSActivatorRef != 0 && Num <= 26.5)
Set Num to Num + 1
Set W to 50 * Num * Cos AngX
Set X to pX + W * Cos AngZ
Set Y to pY + W * Sin AngZ
Set Z to pZ + (50 * Num * Sin AngX)
SMLOSActivatorRef.SetPos X X
SMLOSActivatorRef.SetPos Y Y
SMLOSActivatorRef.SetPos Z Z
loop
;If Player.GetLOS SMLOSActivatorRef == 0 || Num > 26.5
If Num <= 3
PlaySound MagicEnchantHitSoundIllusion
Message "Need more room to rush."
Return
Elseif Num > 26.5
Set Num to 26.5
Endif
Set Num to Num - 1.5
Set W to 50 * Num * Cos AngX
Set X to pX + W * Cos AngZ
Set Y to pY + W * Sin AngZ
Set Z to pZ + (50 * Num * Sin AngX)
Set Z to Z - 50
PlaySound SPLDetectLifeCast
Player.PME SHLD 1
Player.SetPos X X
Player.SetPos Y Y
Player.SetPos Z Z
Return
;Endif

End

User avatar
MR.BIGG
 
Posts: 3373
Joined: Sat Sep 08, 2007 7:51 am

Post » Tue May 17, 2011 12:53 pm

Nevermind, I figured it out. SM sets up the spell in an odd way, having it cast on self and then having a dummy effect on target. There was no reason why it couldn't be cast on target so removed the dummy and set the on self to on target and added an IsActor statement. :D
User avatar
Ricky Meehan
 
Posts: 3364
Joined: Wed Jun 27, 2007 5:42 pm


Return to IV - Oblivion