YesNoOk
avatar

Helper layer over the player (Read 339 times)

Started by Malisoulxd, September 20, 2018, 05:47:08 am
Share this topic:
Helper layer over the player
#1  September 20, 2018, 05:47:08 am
  • avatar
    • USA
Anyone knows how i can get my helper to be layered over the player or target instead of behind. similar to like an energy shield.
Last Edit: September 20, 2018, 08:44:49 pm by Malisoulxd
Re: Helper layer over the player
#2  September 20, 2018, 06:02:20 am
  • **
  • 風よ伝えて
    • Brazil
    • deathscythe.co.vu
SprPriority.

Can be used either on the statedef:
[Statedef 1005]
type = S
physics = N
movetype = A
anim = 1005
ctrl = 0
velset = 0, 0
sprpriority = 4

Or as a sctrl:
[State 1005, SprPriority]
type = SprPriority
trigger1 = 1
value = 4

They work as layers, sprpriority = 2 will be in front of sprpriority = 1 and so on.
Re: Helper layer over the player
#3  September 20, 2018, 08:36:43 am
  • *****
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
and if the layering problems happens when hitting the enemy, there's a sprite priority parameter inside the hitdef that can adjust both P1 and P2's sprite priorities
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: Helper layer over the player
#4  September 20, 2018, 08:44:33 pm
  • avatar
    • USA
SprPriority.

Can be used either on the statedef:
[Statedef 1005]
type = S
physics = N
movetype = A
anim = 1005
ctrl = 0
velset = 0, 0
sprpriority = 4

Or as a sctrl:
[State 1005, SprPriority]
type = SprPriority
trigger1 = 1
value = 4

They work as layers, sprpriority = 2 will be in front of sprpriority = 1 and so on.

so that's what it does thanks
Re: Helper layer over the player
#5  September 20, 2018, 09:36:36 pm
  • ******
  • [E]
    • Mexico
note that  helper's code is run before the player's so there migth be some discoordination, if what you want to do can be done with explods, use explods instead, since they are instantaneous.
Re: Helper layer over the player
#6  September 20, 2018, 11:09:34 pm
  • avatar
    • USA
note that  helper's code is run before the player's so there migth be some discoordination, if what you want to do can be done with explods, use explods instead, since they are instantaneous.

good advice