YesNoOk
avatar

Remove aura in power mode (Read 3265 times)

Started by DeCeballos, October 03, 2021, 06:49:59 pm
Share this topic:
Remove aura in power mode
#1  October 03, 2021, 06:49:59 pm
  • **
    • Spain
Hello, I put an aura on my char that is activated with its power mode but I don't know how it is removed once the power mode ends, the aura continues in the char.  What should I put in the codes so that it is removed once the power mode ends?

 This is my aura code

 ; Aura
[State -3, Aura]
type = explod
trigger1 = 1
trigger1 = !ishelper
trigger1 = numexplod(99999) = 0
anim = 99999
id = 99999
pos = 0,0
postype = p1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -3
ontop = 0
ownpal = 1
removeongethit = 1
Last Edit: October 17, 2021, 12:11:13 pm by DeCeballos
Re: Remove aura in power mode
#2  October 04, 2021, 06:45:17 am
  • avatar
  • **
    • USA
Code:
[State -3, RemoveExplod]
type = RemoveExplod
trigger1 = var(whatever) = 0 ;; if your power mode is not activated, remove the explod
id = 99999
Re: Remove aura in power mode
#3  October 04, 2021, 10:56:57 am
  • **
    • Spain
I put this before the end of the statedef of the power mode?
Re: Remove aura in power mode
#4  October 04, 2021, 04:25:19 pm
  • avatar
  • **
    • USA
No.  Put it in a negative statedef.  Easiest just to put it in the CMD file at the very bottom.
Re: Remove aura in power mode
#5  October 04, 2021, 07:11:05 pm
  • **
    • Spain
I do not know how to do it, I will extend the explanation. The Aura code that I show places it just below the Statedef 2700. so that it will be activated when starting the power mode. The problem is that after finishing the power mode the aura continues and remains permanent in the char. The code that you have given me if I put it in another statedef gives me an error when starting the character. E to add something else to the code? (where it says whatever and 0 for example)
Re: Remove aura in power mode
#6  October 05, 2021, 06:47:48 am
  • avatar
  • **
    • USA
Yes, I put a comment to explain this...

Your "power mode" literally must be using a variable.  Even if it just the variable for a timer.  Change the variable in the example code to THAT variable, whatever it is.  If the variable is var(15), then the trigger will be "trigger1 = var(15) = 0".

It does not matter what state you use to activate power mode.  It could be 0 or 99999.  This code must be used in a negative state (-1, -2, -3) because it must always be running.  All this code does is say that if the variable (which you need to provide) is 0, then delete the explod for the aura.  The reason it has to work this way is because you are using an explod and not a helper.  Your character will only be in statedef 2700 when it activates the aura, and at no time after that.
Re: Remove aura in power mode
#7  October 05, 2021, 09:47:03 pm
  • **
    • Spain
Great I think it worked, and if I wanted to make it disappear after power mode?

 
[State 1000, flash]
type = PalFX
type = explod
trigger1 = 1
trigger1 = !ishelper
add = 70,-50,-50
mul = 256,256,256
time = 99999

     Posted: October 06, 2021, 08:10:07 pm
I want to add this state so that it changes palette during the super attack

[State 0, RemapPal]
type = RemapPal
trigger1 = AnimElemTime(6)=0
trigger1 = var(58)
source = 1,1
dest = 2,Var(58)

In other characters it works for me but in this one it does not, the 1,1 palette never changes to the 2,1.This is the entire statedef (The remappal state is already inserted). Of course I would also like to know how to remove the remappal after the power mode :

[Statedef 2700]
type = S
movetype = I
physics = S
anim = 2700
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = -2000

[State 0, RemapPal]
type = RemapPal
trigger1 = AnimElemTime(6)=0
trigger1 = var(58)
source = 1,1
dest = 2,Var(58)

[State -3, Aura]
type = explod
trigger1 = 1
trigger1 = !ishelper
trigger1 = numexplod(99999) = 0
anim = 99999
id = 99999
pos = 0,0
postype = p1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -3
ontop = 0
ownpal = 1
removeongethit = 0
;pausemovetime = 99999
;supermovetime = 99999

[State 4500, 1];transform SND
type = PlaySnd
trigger1 = animelemtime(2) = 0
value = 188,0
volume = 255
channel = 2

[State 200, BGPalFX]
type = BGPalFX
trigger1 = time=[0,97]
time = 1
add   = -100,-100,-100
mul   = 256,100,100
invertall = 0
color = 256

[State 3000, superpause]
type = superpause
trigger1 = time=0
time = 97
p2defmul = 1
unhittable = 1
anim = -1
sound = s2350,0
darken = 0
movetime = 97

[State 3000, nhb]
type = nothitby
trigger1 = 1
time = 1
value = SCA

[State 13100, shake]
type = envshake
trigger1 = !(time%12)
time = 12
freq = 130
ampl = 5

[State 3000, Buffer var]
type = varset
trigger1 = !time
var(53) = 1000

[State 3000, Flame var]
type = varset
trigger1 = !time
var(58) = 0

[State 200, Goddammit]
type = playsnd
triggerall = var(55)=0      ;Voice=English
triggerall = var(39)>=18   ;Adult version
trigger1 = !time
value = 2700,0
channel = 0
volume = 300

[State 200, time to end, huuaaaa]
type = playsnd
triggerall = var(55)=0      ;Voice=English
triggerall = var(39)<18      ;Child version
trigger1 = !time
value = 2700,10+random%2
channel = 0
volume = 300

[State 200, snd]
type = playsnd
triggerall = var(55)=1      ;Voice=Japan
trigger1 = animelemtime(3)=0
value = 2700,5
channel = 0
volume = 300

[State 200, snd]
type = playsnd
triggerall = var(55)=2      ;Voice=Eng Sabbat
trigger1 = !time
value = 2700,1
channel = 0
volume = 300

[State 3000, end]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

 
Re: Remove aura in power mode
#8  October 17, 2021, 12:11:32 pm
  • **
    • Spain
Solved, Thanks!