Sprpriority

Started by Spaz_Atack145, September 26, 2009, 05:25:05 PM

Previous topic - Next topic

Spaz_Atack145

I was trying to do a full screen special attack but this always happens

Dark Athena's, you can see them in between the back and front. And its normal sized.


Mine on the other hand... Way to big, and it comes over p1 and p2.


I kinda used a helper to code this... :-\
[StateDef 60001] ; Holy Helper
type = S
movetype = A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 60001
poweradd = -9999
sprpriority = 4

[State 60001, Helper]
type = Helper
trigger1 = animelem = 8
helpertype = normal ;player
name = "Holyga"
ID = 60000
stateno = 60000
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 60001, Explod]
type = Explod
trigger1 = animelem = 1
anim = 5400
ID = 5400
pos = 0,11
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 2,2
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[state 6004, Playsnd]
type = playsnd
trigger1 = animelem = 1
value = S15, 1
volume = 155

[State 6004, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;===========================================================================
[StateDef 60000] ; Holyga hitdef
type = S
movetype = A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 60000
poweradd = 0
sprpriority = 2

[State 60000, HitDef]
type = HitDef
trigger1 = animelem = 160
attr = S,HA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = M         ;HLA
getpower = 0,0
givepower = 0,0
animtype = diagup          ;light,medium,hard,back,up,diagup
air.animtype = Hard
priority = 7,Hit   ;Hit,Miss,Dodge
damage = 1000,500
pausetime = 0,50
proj.scale = 0,0
sparkno = 0
guard.sparkno = 0
sparkxy = 0,0
hitsound = 0,0
guardsound = 0,0
ground.type = High      ;Low,Trip,None
air.type = High
air.hittime = 20
ground.velocity = 0,0
air.velocity = 0,0
sprpriority = 2
fall = 1
fall.yvelocity = -4.5
fall.recover = 0
fall.recovertime = 4
fall.damage = 300
hitonce = 1
numhits = 1

[State 60000, PosSet]
type = PosSet
trigger1 = animelem = 1
x = 300
y = -50

[state 60000, Playsnd]
type = playsnd
trigger1 = time = 1
value = S15, 4
volume = 155

[State 6000, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0


I'm a noob, so please tell me a different way to code the Holyga like Athena did!

Thank you!
I got nothin...

Rajaa Retired

- Change the sprpriority so the characters are in the middle. The background should be -5 and the frontground should be 5 make the characters 2 or 3 or something.


- Use an assertspecial to take away the stage's background and frontground.

Byakko

If the helper's animation is too big, use type = AngleDraw to scale it down. Do you add transparency to your animation ?
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Spaz_Atack145

Angledraw... how does it work (e.g AngleDraw = ???). and would the transparency be "trans = 1" or whatever number?
I got nothin...

Rajaa Retired

You can change the size in the sctrl itself. Read up on the helper/explod sctrl, what you need to know is there.

helper explod

The trans ca be done in the animation itself:

9,0, 0,0, 1,, A

That makes that specific frame in that animation transparent. Alternatively, you can use the trans sctrl.

trans


Click the purple texts in the codes.

Byakko

Quote from: Spaz_Atack145 on September 26, 2009, 06:44:19 PM
Angledraw... how does it work (e.g AngleDraw = ???). and would the transparency be "trans = 1" or whatever number?
Uuuuuhhh... Read the docs ??
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Spaz_Atack145

#6
Wait...
So does that mean I will have to put 272 "trigger1 ="  (according to how many sprites there are).
o_O                o_O                  o_O                  o_O


please don't get mad if I'm wrong... :'(
I got nothin...

Cyanide

Why the hell would you need to do that? Triggering NEVER needs to be that complex. > and < exist for a reason.


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.

Byakko

And why do you need a trigger related to sprites ?
You have a helper. This helper has one animation.
If your sprites are too big, just scale the helper. Using type = AngleDraw, constantly triggered.
If you want the stuff behind your animation to be visible, just make that animation transparent. Normally done through the .air file, but the AngleDraw usually prevents that for some reason, so you simply have to add a type = Trans, also constantly activated, after the AngleDraw.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Spaz_Atack145

I'm getting tired of this now. >:(

Just tell what's wrong with this, and how I can code it to be normal sized!
[State 60000, AngleDraw]
type = AngleDraw
trigger1 = animelem =1 >= 272
value = 6480
scale = -1
I got nothin...

Cyanide

You don't learn as much if we give you the answer.

Scale = -1

Come on, how does that work? What sort of scale is -1. If you look at the information you'll see it takes an X scale and a Y scale. These are float or decimal point values. 2 is twice the size, 1 is the size it is in the sff and 0.1 is really tiny, you work out half size from that.

value = 6480, isn't needed, have a look at angleset for the values an angledraw can take.

Lastly, your trigger is awful. I'll tell you what your current trigger means. Check animelem 1, wait 272 or more ticks, then apply effect. Second, don't use animelem as your trigger, it's deprecated and there are far better options like animelemtime or just plain time.


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.

Spaz_Atack145

Thank you Cyanide!

Now I got it, but I did this
[State 60000, AngleDraw]
type = AngleDraw
trigger1 = animelem =1 >= 1
value = 6480
scale = 0.6, 0.6


The only thing I can't do now is make p2 stay in between all of it...
I got nothin...

Xinos

Quote from: Spaz_Atack145 on September 27, 2009, 02:20:49 PM
Thank you Cyanide!

Now I got it, but I did this
[State 60000, AngleDraw]
type = AngleDraw
trigger1 = animelem =1 >= 1
value = 6480
scale = 0.6, 0.6


The only thing I can't do now is make p2 stay in between all of it...

In your helper's hitdef, make it so the opponent enters a custom state, where they can't move. This would mean you'd have to make another statedef, so the opponent can get there.

p2stateno = *number here* Add this to your hitdef.

Byakko

P2StateNo isn't the best thing to use, you should rather use a type = TargetState triggered by "NumTarget && MoveHit".
But... What do you mean by "stay between all of this" ??
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Spaz_Atack145

Like, in between the black background and the holy light, but its all one sprite put together, do you get it?
Like in the first pic. The Athena's are in between that even though it's one sprite
I got nothin...

Byakko

.........
That's...
Not possible. you need two images. One background, and one foreground. You can't insert the character in the middle of your big image as if there was one part in front and one part behind, because there's only one part.
What you can do is remove the entire background (a type = BGPalFX to turn it all black) then put your big picture in front of everything and make it transparent. A transparent black doesn't show anything, while a transparent white hides everything - the black parts of your big image will not show, and the white parts of your image will hide everything. The colors inbetween will simply be transparent.
Like I said earlier, add a type = Trans after your type = AngleDraw (normally you could do with just making the animation transparent from the .air file, but a bug with AngleDraw removes that, so you have to add it back again with a type = Trans).
And I've said that before in this topic...
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Spaz_Atack145

I got nothin...