YesNoOk
avatar

Explod:postype=p2 do not work in Win state (Read 4455 times)

Started by Hannah Montana, August 06, 2019, 09:48:43 am
Share this topic:
Explod:postype=p2 do not work in Win state
#1  August 06, 2019, 09:48:43 am
  • ***
  • The Best of Both Worlds
  • SuperStar
Hello this is my code:
[State 184, Explod]
type = Explod
trigger1 = animelem=2
anim = 1830
ID = 1830
pos = 5,0
postype = p2
facing = -1
bindtime = -1
removetime = -1
scale = .5,.5
sprpriority = 99
ownpal = 0
removeongethit = 1
ignorehitpause = 1
persistent=0

I copied it from intro and other states working well in those except winpose,that explods shows in player 1 not in enemy,p2 means it but detected as p1.I don't know what is wrong in my code.help and thanks by read this.

Last Edit: August 27, 2019, 03:42:41 am by Hannah Montana
Re: Explod:postype=p2 do not work in Win state
#2  August 06, 2019, 09:58:40 am
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
That is because on roundstate>2, P2 ceases to exist and is no longer "visible"

If you need to interact with P2, you need to put it into a custom state, because "target" is still valid through after roundstate=2
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: Explod:postype=p2 do not work in Win state
#3  August 08, 2019, 03:16:49 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
...Or, you can also use redirection to compare distance of enemy from your character to position it relative to your character.  Something like
Pos = abs(enemy,Pos X - Pos X),0

Re: Explod:postype=p2 do not work in Win state
#4  August 27, 2019, 03:42:11 am
  • ***
  • The Best of Both Worlds
  • SuperStar
Hello.
First thanks by both replies.
I tried using helper in p1 which works with the enemy position working in some way i wanted.the abs code i will try too.
Thank ya