hi there. i know there are some threads which topic the sharingan. but i dont understand them very well. this is my cns statedef 901 in wich he activates the sharingan and the undefined explod begins:
Spoiler, click to toggle visibilty
; Sharingan Activate
[StateDef 901]
Type = S
movetype = A
physics = S
anim = 901
ctrl = 0
poweradd = -100
[State 901, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S9,20
volume = 80
channel = 0
[State 901, Explod]
type = Explod
trigger1 = !animtime
anim = 903
ID = 1
pos = 0,0
postype = left ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -2
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermovetime = 10000
pausemovetime = 10000
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
[State 901, Explod]
type = Explod
trigger1 = !animtime
anim = 902
ID = 2
pos = 50,-200
postype = left ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
supermovetime = 10000000000
pausemovetime = 10000000000
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
persistent = 0
[State 901, VarSet]
type = VarSet
trigger1 = animelem = 3
v = 3
value = 1
[State 901, End]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1
ok, this one is the statedef 902 which should remove the slowmotion effect as well as the explod with the id = 2:
Spoiler, click to toggle visibilty
; Sharingan Off
[StateDef 902]
type = S
movetype = A ; i tried "I" for idle since it doesnt hit the enemy or myself.doesnt work though
physics = S
anim = 904
velset = 0,0
ctrl = 0
[State 902, RemoveExplod]
type = RemoveExplod
trigger1 = time = 0
id = 2
[State 902, NotHitBy]
type = NotHitBy
trigger1 = time = 0
value = SCA
time = 40 ; its the time of the animation
[State 902, varset]
type = varset
trigger1 = animelem = 3
v = 3
value = 0
[State 902, End]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
ok and here is the statedef -2 needed to check statetypes which must be checked every tick:
Spoiler, click to toggle visibilty
; Statetypes that need to be checked every tick
[Statedef -2]
[State -2, BGPalFX]
type = BGPalFX
trigger1 = var(3) = 1
time = 2
add = 0,0,0
mul = 256,0,0
sinadd = 0,0,0,10
invertall = 0
color = 0
[State -2, Pause]
type = Pause
trigger1 = var(3) = 1 & time%2 = 0
time = 1
movetime = 1
darken = 1
[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = power <= 0
id = 2
[State -2, PowerAdd]
type = PowerAdd
trigger1 = var(3) = 1
value = -1
[State -2, VarSet]
type = VarSet
trigger1 = var(3) = 1 & power <= 0
v = 3
value = 0
well and finally the tiny cmd part:
Spoiler, click to toggle visibilty
;Sharingan ON
[State 901, SharinganON]
type = ChangeState
value = 901
triggerall = power>= 100
triggerall = var(3) = 0
triggerall = command = "Sharingan"
trigger1 = statetype = s
trigger1 = ctrl
;--------------------------------------------------------------------------
;Sharingan OFF
[State 902, SharinganOFF]
type = ChangeState
value = 902
triggerall = var(3) = 1
triggerall = command = "Sharingan"
trigger1 = statetype = s
trigger1 = ctrl
good. thats it. i went through it a million times. but couldnt find any errors. everything seems ok to me. pls help