YesNoOk
avatar

randomizing anim used in helper (Read 524 times)

Started by Sol Knight X, January 24, 2019, 06:23:34 am
Share this topic:
randomizing anim used in helper
#1  January 24, 2019, 06:23:34 am
  • ***
  • Yo I'm the best maang. I diiiiiiiiiid it.
    • Puerto Rico
    • Skype - solknightx
I'm attempting to make something akin to a MK "TOASTY" on a current project, and im unsure of how to implement an idea a friend gave me where there's a small chance a different person appears at the corner of the screen.

I tried using this to make it work, but i didnt count on the two helpers processing seperately from one another.

Code:
[State 1000, 4]
type = Helper
trigger1 = movecontact && (random=[0,249])
helpertype = normal
name = "ANNOUNCER"
ID = 1012
pos = 75, 45
postype = left
size.xscale = .25
size.yscale = .25
stateno = 1012
ownpal = 1

[State 1000, 4]
type = Helper
trigger1 = movecontact && (random=[250,999])
helpertype = normal
name = "ANNOUNCER2"
ID = 1013
pos = 75, 45
postype = left
size.xscale = .25
size.yscale = .25
stateno = 1013
ownpal = 1

I'm assuming it can be alleviated by using an ifelse trigger, but Im unsure of how to use it in the helper.
Re: randomizing anim used in helper
#2  January 24, 2019, 09:04:35 am
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
1) You don't need 2 different helpers. All code could be included in a single helper/state that plays different animations and sounds
2) every "random" instance will play independently. In your example, you can have both helpers playing at the same time, because each "random" is evaluated separately.
3) Also, use !Numhelper(xxx) to prevent the same helper to be spawned multiple 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: randomizing anim used in helper
#3  January 24, 2019, 04:55:15 pm
  • ***
  • Yo I'm the best maang. I diiiiiiiiiid it.
    • Puerto Rico
    • Skype - solknightx
That last one got it to work exactly as needed. Thanks! :D