News:

MFG's Character of the Month: October 2026 Voting

Main Menu

SprPriority (SCTRLs)

Started by JustNoPoint, October 02, 2015, 08:37:55 PM

Previous topic - Next topic

JustNoPoint

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:
none

Example:[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 =

XGargoyle

actually, I think the priority is -10 to 10, but can't test it at the moment


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!

Ricepigeon

#2
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.