News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Multiple, incorrect explodes playing

Started by Noctis, June 08, 2015, 07:07:30 AM

Previous topic - Next topic

Noctis

This explod keeps playing either the wrong animation or multiple animations at once despite the restrictions and the varset and there are no vars or explod id's or modifyexplods interfering with it anywhere as I've checked multiple times and I've tried doing it the long, easy way with the use of ifelse or just multiple explods only usable depending on what the var is set to and nothing works and I feel like I'm going insane hehehaha....
Is there something I'm missing or not understanding? I have many, many other explods doing things like this without a hitch, but this...this lil' shit is getting on my last nerves. I literally cannot figure out a workaround. I've even tried different vars, fvars, different animations. Nothing works.

Here's the explod and var.
;--| Objective set |--
[State -1]
type = VarSet
trigger1 = Time < 120
var(24) = 1+random%4
ignorehitpause = 1

[State -1]
type = VarSet
trigger1 = var(24)
trigger1 = Time >= 121
var(24) = 0
ignorehitpause = 1

[State -1, Explod]
type = Explod
trigger1 = !numexplod(14110)
trigger1 = Time = 120
anim = 14010+var(24)
id = 14110
pos = 180,60
postype = left
scale = .5,.5
removetime = 505
sprpriority = 8
ontop = 1
ignorehitpause = 1
persistent = 0
ownpal = 1

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

Алексей

Hmm, well the code by itself looks harmless. Is this code actually in State -1 though? If so, "time" might be your contributing factor here. Also, maybe some background about what you're trying to do with this Explod might help as well.

-[Все слова это только слова.]-

Noctis

#2
It's in my intro state, 190. It was in my statedef 5900, but I moved it because I figured that could've been the problem? I don't know.
Anyways, it's randomized all the way up until the explod plays because of the time < 120, and then it sets once it hits 120, but even if I had it set 100 ticks before that, the same problem occurs. It sets, explod plays during intro at 120 ticks, plays the wrong animation and sometimes plays multiple animations at once despite being coded to play no more than one and only during this set var.
Done debug and err'thing. I cannot figure out a workaround. I'm gonna try a helper next to see what that does, but I shouldn't have to? Right? Helper's and extended coding are my last resorts and I hate that something so simple is tripping me up.

      Posted: June 08, 2015, 05:44:19 PM
OHHHHHHHHHHHHHHHHHH!! I figured it out. I forgot to consider the f'ing fact that my opponent, the SAME character, is playing explods based on a freaking var, too! They were overlapping which is why it sometimes appeared to play the wrong one. All I hafta do is disable it for that teamside or when the AI is active. OHHHHHHHHHHHHHHH!!
It has been 3 years don't judge me.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

Алексей

What animation is playing that's wrong? The animation coming back should be 14111~141115. If you DisplayToClipboard numexplod(14110), what gets printed out during that time?

-[Все слова это только слова.]-

Bastard Mami

Quote from: Noctis on June 08, 2015, 07:07:30 AM
trigger1 = Time < 120

trigger1 = Time >= 121

this means that a new value won't get calculated when time = 120, thus the last value will be a random one

Noctis

Yeah! I just liked the way it looked in the debug flippin' through all the numbers. I figured out the problem already and it works fine. P2's explods were playing over P1's explods.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."