YesNoOk
avatar

sprpriority (CNS) (Read 14631 times)

Started by JustNoPoint, October 02, 2015, 08:36:38 pm
Share this topic:
sprpriority (CNS)
#1  October 02, 2015, 08:36:38 pm
  • ******
    • www.justnopoint.com/
Part of the Statedef
If this parameter is present, the player's sprite layering priority will be set to the value specified. If omitted, the sprite priority will be left unchanged. common1.cns (the CNS file that is inherited by every player) defines the sprite priority of standing or crouching players to be 0, and jumping players to be 1. For most attack states, you will want to set sprpriority = 2, so that the attacker appears in front.

See SprPriority in the sctrls documentation for how to change sprite priority using a controller.
Last Edit: October 13, 2015, 08:02:59 pm by Odb718
Re: sprpriority (CNS)
#2  October 02, 2015, 09:51:20 pm
  • *****
  • Thanks and God bless
    • USA
    • ricepigeon.neocities.org
I seem to recall that sprpriority, when defined in the statedef of a state, tends to be overwritten if the player has an active hitdef and makes contact with an opponent, even if you omit the sprpriority parameter from your hitdefs. This is due to the sprpriority parameter of hitdefs defaulting to 1 if the line is omitted, so this is something to keep in mind if your state defines a different value.
Re: sprpriority (CNS)
#3  February 17, 2017, 08:44:00 am
  • ***
hi, i'd like to know how to solve the issue that sprpriority will not work when the attack makes contact with the opponent, i've tried several things but it doesn't work.. :( :(
Re: sprpriority (CNS)
#4  February 17, 2017, 11:32:38 am
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
hi, i'd like to know how to solve the issue that sprpriority will not work when the attack makes contact with the opponent, i've tried several things but it doesn't work.. :( :(

http://mugenguild.com/forum/topics/hitdef-sctrls-169450.0.html

Hitdef has the following default settings:
p1sprpriority = drawing_priority (int) This is the drawing priority of P1's sprite if the move hits or is guarded by P2. Together with the p2sprpriority parameter, it controls whether or not P1 is drawn in front of or behind P2. The default value is 1.

p2sprpriority = drawing_priority (int) This is the drawing priority of P2's sprite if the move hits or is guarded by P2. The default value is 0.

This means, if you don't add and change these parameters, everytime you hit the enemy, sprpriority will be fucked up in the majority of the times
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: sprpriority (CNS)
#5  February 17, 2017, 12:21:57 pm
  • ***
thanks, i had placed that p1sprpriority = in the wrong place.

now it works!

many thanks! ;)