SprPriority (SCTRLs) (Read 2087 times)

Started by Just No Point, October 02, 2015, 08:37:55 pm
Share this topic:
SprPriority (SCTRLs)
New #1  October 02, 2015, 08:37:55 pm
  • ******
Changes the player's sprite priority. Higher-priority sprites are drawn on top of lower-priority sprites.

Required arguments:
value = priority_level (int)
Valid values are -5 to 5.

Optional arguments:

[State 0, SprPriority]
type = SprPriority
trigger1 = time > 24 ;changes the priority after 24 tics
value = 1
;ignorehitpause =  ;HitDefs can adjust SprPriority. You may want to activate this
;persistent =
Last Edit: January 07, 2018, 12:38:26 pm by Odb718
Re: SprPriority (SCTRLs)
#2  October 02, 2015, 08:46:38 pm
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
actually, I think the priority is -10 to 10, but can't test it at the moment
XGargoyle: Battle posing since 1979  <-- Please click that link  <-- Donations welcome!
Re: SprPriority (SCTRLs)
New #3  October 02, 2015, 09:46:32 pm
  • *****
  • Gaps? Where we're going, we don't need gaps...
    • USA
I know the docs explicitly state -5 to 5, but I do recall using a value of 8 and it worked as you would logically expect values higher than 5 to work if the upper limit was 10, so it seems all the more likely.

Also, I seem to recall that sprpriority 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. Of course, adding ignorehitpause=1 to your SprPriority SCTRL will easily circumvent this issue.
Last Edit: October 02, 2015, 09:52:59 pm by Ricepigeon