YesNoOk
avatar

Custom bar help (Read 1690 times)

Started by Ichisennen, May 08, 2011, 03:17:58 pm
Share this topic:
Custom bar help
#1  May 08, 2011, 03:17:58 pm
  • **
  • That guy who did that thing back then just because
I'm working on putting this custom card bar which dictates what helper you will summon. I haven't gotten very far, since there's this bug wherein all of my other helpers disappear because of this one helper, for some reason. 

I don't have any experience as of yet about adding bars and such to a character, and so I need some help from those here who might.

So here's the code:

Code:
;The "card bar" helper 
[Statedef -2]

[State -2, Helper]
type = Helper
trigger1 = !NumHelper(4823)
trigger1 = numenemy
helpertype = normal ;player
name = "Cardbar"
ID = 4823
stateno = 6823
pos = 0,0
postype = back   ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
bindtime = -1
supermovetime = 99999999999999
pausemovetime = 99999999999999

;The empty helper's state
;-------------------------------------------------------------------
[Statedef 6823]
anim = 6701 (this is an empty anim with -1 time.)
sprpriority = 0
ownpal = 1

[State 6000, helper]
type = Helper
trigger1 = !NumHelper(6010)
id = 6010
name = "Card"
pos = 0,0
postype = back
stateno = 6010
helpertype = normal
bindtime = -1
keyctrl = 0
ownpal = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

;The Card itself
;------------------------------------------------------------------------------
[Statedef 6010]
anim = 6701 (this is an empty anim with -1 time.)
sprpriority = 0

[State 0, Explod]
type = Explod
triggerall = teamside = 1
trigger1 = 1
anim = 6700
ID = 6722
pos = 25,205
postype =left ;p2,front,back,left,right
facing = 1
bindtime = -1
supermovetime = -1
pausemovetime = -1
scale = 1,1
ontop = 1
ownpal = 1

I stopped there, since I tried to see if the bar appeared, only to find out what I did.

I think I'm doing something wrong. The card appears, oh it does, but all my other helpers (effects, hitspark helpers) disappear. Heck even hitsparks disappear.

Help would be appreciated, thanks.
Re: Custom bar help
#2  May 08, 2011, 10:30:15 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Um, are all your other FX explods? Because you have a constantly triggered explod in a state that never ends.

If that explod has a removetime that's not 1, and it lasts a while, you're reaching the limit and preventing further explod creation.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Custom bar help
#3  May 09, 2011, 11:37:05 am
  • **
  • That guy who did that thing back then just because
Thanks Cyanide. Just a follow up question. 

So I'm not gonna use a permanent explod in my helper anymore since a lot of my FX use helpers that have explods in their states, and etc etc. So instead I replaced the anim of the helper(6010) into the anim of the card. It does show, but it's not binding into the pos that I want it to, aka it follows the character not the screen.

So, how do I make bind to the lower corner of the screen without using the explod sctrl? Or do I really have to use an explod?
Re: Custom bar help
#4  May 09, 2011, 10:20:01 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
You can use an explod. Just don't re-trigger it every tick. Or if you DO trigger it every tick, have it remove itself so you never have more than 1 out at once.

You need to use posset on helpers to position them where you wish.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Custom bar help
#5  May 10, 2011, 09:46:15 am
  • **
  • That guy who did that thing back then just because
*Double Facepalm*

Gah. Posset. I feel so dumb now. Thanks again, Cyanide.  :sugoi:

EDIT:

*Double Facetable*

Okay, i didn't notice till I superjumped. The x-axis is alright, but the helper doesnt follow the camera when I jump. Posset is just setting pos anyway. Is there any way I can make it sort of bind relative to the camera? Like how the powerbar is?

 And I tried using explods inside the helper. No good, since I can't ever remove it because it's a custom power bar of sorts so it has to be always there. The sudden disappearing of it just seems so wrong.
Last Edit: May 10, 2011, 01:16:52 pm by Ichisennen
Re: Custom bar help
#6  May 10, 2011, 10:21:30 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
You remove it and re-add it every tick

trigger1 = 1
removetime = 1

Or, trigger1 = time = 0
removetime = -1

Either or. Not however

trigger1 = 1
removetime = -1

Which spawns billions of them.

Do the posset more than once to constantly re-bind it to the right place.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Custom bar help
#7  May 18, 2011, 12:02:27 am
  • **
  • That guy who did that thing back then just because
Sorry for the sort of necro bump. Just got to it now  --;

At first, I put an explod in the -2 state like this:
Code:
[statedef -2]

[State 0, explod]
type = Explod
triggerall = teamside = 1
trigger1 = 1
anim = 6700
ID=6701
pos=23,210
postype=left  ;p2,front,back,left,right
facing=1
vfacing=1
bindtime=999
vel=0,0
accel=0,0
random=0,0
removetime=1
supermovetime = 9999
pausemovetime = 9999
scale = 1,1
sprpriority = 6
ontop = 1
shadow = 0,0,0
I tried the second method first. Like I said, it blinks whenever other explods are in use. So it looks buggy.

The first method was going well, until such a time came that my character calls out another explod... and a damn carbon copy of the meter stayed in one spot, while another continued to follow the screen.

Since both didnt work, I tried using a helper instead, with:

Code:
;-------------------------------------------------------------------
[statedef 6700]
movetype = I
physics = U

[State 0, explod]
type = Explod
triggerall = teamside = 1
trigger1 = 1
anim = 6700
ID=6701
pos=23,210
postype=left  ;p2,front,back,left,right
facing=1
vfacing=1
bindtime=999
vel=0,0
accel=0,0
random=0,0
removetime=1
supermovetime = 9999
pausemovetime = 9999
scale = 1,1
sprpriority = 6
ontop = 1
shadow = 0,0,0
;-----------------------
[statedef -2]
[State 0, Helper]
type = Helper
trigger1 = 1
helpertype = normal ;player
name = "CardBar"
ID = 6701
stateno = 6700
pos =10,150
postype = left   
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999
pausemovetime = 999
size.xscale = 1
size.yscale = 1

Aside from the shadow above the bar, it also nulls other helpers. I'm guessing Im effed up here.

And yes, I tried destroyself, but it does the same blinking thing.
Re: Custom bar help
#8  May 18, 2011, 08:07:42 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Oh come on...

Quote
[State 0, Helper]
type = Helper
trigger1 = 1
1?! Respawn over and over and over? You've just recreated your first bug. LIMIT things. You've given it an ID. Only create the helper if that ID isn't already out. My solutions were for what you had. If you had stuck with that they would have been fine. But you changed everything.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Custom bar help
#9  May 21, 2011, 11:33:22 am
  • **
  • That guy who did that thing back then just because
EDIT:

I thought it would be better to just modify this thread since my query still concerns the same helper.

The bar is acting like an actual bar now, not flickering or anything, although I've got a problem.

What's supposed to happen:

Bar charges, after charging, bar flashes and a portrait of a character shows underneath it.

What's happening:

Bar charges, flashes, but portrait doesn't show.

Now I know I'm triggering it right, and whenever I change the trigger of the portrait helper to 1 it does show, so its not the sprite. Var(32) isn't taken as well. Code:
Code:
;-------------------------------------------------------------------
;Charging
[statedef 6700]
movetype = I
physics = U
anim=6999
sprpriority = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, explod]
type = Explod
triggerall = teamside = 1
trigger1=time=0
anim = 6700
ID=6999
pos=23,210
postype=left  ;p2,front,back,left,right
facing=1
vfacing=1
bindtime=99999
vel=0,0
accel=0,0
random=0,0
removetime=240
supermovetime = 9999
pausemovetime = 9999
scale = 1,1
sprpriority = 6
ontop = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime=0
value = 6702
ctrl = 0
;-------------------------------------------------------------------
;Flash
[statedef 6702]
movetype = I
physics = U

[State 0, VarSet]
type = VarSet
trigger1 = time=0
v = 32   
value =1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, explod]
type = Explod
triggerall = teamside = 1
trigger1=time=0
anim = 6702
ID=6702
pos=23,210
postype=left 
facing=1
vfacing=1
bindtime=99999
removetime=26
supermovetime = 9999
pausemovetime = 9999
scale = 1,1
sprpriority = 6
ontop = 1
;-------------------------------------------------------------------
;Permanent Cardbar helper underneath
[statedef 6701]
movetype = I
physics = U

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, explod]
type = Explod
triggerall = teamside = 1
trigger1=time=0
anim = 6701
ID=6701
pos=23,210
postype=left 
facing=1
vfacing=1
bindtime=99999
removetime=-1
supermovetime = 9999
pausemovetime = 9999
scale = 1,1
sprpriority = 6
ontop = 0
;-------------------------------------------------------------------
;Helper Portraits
[statedef 6703]
movetype = I
physics = U

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, explod]
type = Explod
triggerall = teamside = 1
trigger1=time=0
anim = 6703
ID=6703
pos=23,210
postype=left 
facing=1
vfacing=1
bindtime=99999
removetime=-1
supermovetime = 9999
pausemovetime = 9999
scale = 1,1
sprpriority = 1
ontop = 1
;=|Statedef -2|=====================================================
;Always execute these.
[Statedef -2]

[State 0, Helper]
type = Helper
trigger1 = numhelper(6701) != 1
helpertype = normal
name = "CardBar"
ID = 6701
stateno = 6700
pos =10,150
postype = left   
facing = 1
keyctrl = 0
ownpal = 0
supermovetime =-1
pausemovetime =-1
size.xscale = 1
size.yscale = 1
removetime = 1

[State 0, Helper]
type = Helper
trigger1 = numhelper(6702) != 1
helpertype = normal
name = "CardBarCharge"
ID = 6702
stateno = 6701
pos =10,150
postype = left 
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999
pausemovetime = 999
size.xscale = 1
size.yscale = 1
removetime = 1

[State 0, Helper]
type = Helper
trigger1 = var(40)=1
helpertype = normal ;player
name = "HelperPortrait"
ID = 6703
stateno = 6703
pos =10,150
postype = left   
facing = 1
keyctrl = 0
ownpal = 0
supermovetime =-1
pausemovetime =-1
size.xscale = 1
size.yscale = 1
removetime = 1

So, after the flash, explod(6703) should show up underneath explod(6700). Problem is, it ain't.

Help please?  :-\
Last Edit: May 21, 2011, 11:36:56 am by Ichisennen
Re: Custom bar help
#10  May 21, 2011, 11:56:38 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Helpers have their own set of variables. But that's beside the point because

trigger1 = var(40)=1

When do you make var(40) = 1 so as to display this helper? I see no mention of var(40) in your code.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Custom bar help
#11  May 21, 2011, 12:56:32 pm
  • **
  • That guy who did that thing back then just because
Helpers have their own set of variables.

I keep learning new things from you.

Anyway, I changed that into:

Code:
[State 0, Helper]
type = Helper
trigger1 = var(32)=1
helpertype = normal ;player
name = "HelperPortrait"
ID = 6703
stateno = 6703
pos =10,150
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime =-1
pausemovetime =-1
size.xscale = 1
size.yscale = 1
removetime = 1

Guess what, still nada.  :S
Re: Custom bar help
#12  May 21, 2011, 10:22:36 pm
  • ****
  • Hey, I'm Grump!
    • USA
    • soldier.ucoz.net/
Are you trying to make the card spawn and stay in the place it spawned at? You're making things way more complicated than they need to be if thats what you're trying to do.

(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."
Re: Custom bar help
#13  May 22, 2011, 12:17:26 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Yes he is. But whatever.

You're still getting nada because that's the helpers variable. Not your variable. Use ParentVarSet to apply it in the first place.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Custom bar help
#14  May 22, 2011, 12:53:02 am
  • **
  • That guy who did that thing back then just because
Are you trying to make the card spawn and stay in the place it spawned at? You're making things way more complicated than they need to be if thats what you're trying to do.

Would've been better if you actually gave a suggestion on how I could make it simpler, but oh well I made it work already. Tough nuts.

Thanks Cyanide.
Re: Custom bar help
#15  May 23, 2011, 10:00:15 pm
  • ****
  • Hey, I'm Grump!
    • USA
    • soldier.ucoz.net/
Sorry. I would have told you what to do, but that's it. Cyanide wants you to actually learn, so I won't interfere.
I probably should of never posted to begin with, haha.

(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."
Re: Custom bar help
#16  May 24, 2011, 12:13:44 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
You should always show a person how to fix it themselves. You learn more actually coding something than fixing up wht someone has already coded.

People i've been in contact with who have got good have been those who work things out themselves after being pointed in the correct direction.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Custom bar help
#17  May 24, 2011, 05:26:01 am
  • **
  • That guy who did that thing back then just because
You should always show a person how to fix it themselves. You learn more actually coding something than fixing up wht someone has already coded.

People i've been in contact with who have got good have been those who work things out themselves after being pointed in the correct direction.

Truefax.

Sorry. I would have told you what to do, but that's it. Cyanide wants you to actually learn, so I won't interfere.
I probably should of never posted to begin with, haha.

That would've been nice, but everyone has their moments now do they. Locking this since its solved.  ;)