Scale Hitbox

Started by inktrebuchet, March 02, 2017, 05:00:14 PM

Previous topic - Next topic

inktrebuchet

I have been working on a small project but ran into a snag that I'm thinking I should have known about before starting...

Is it possible to scale a hitbox in game? The idea in a nutshell was to make a platform that changes size at random. I just didn't want to fill my air file with a bunch of random sized platforms...

JustNoPoint


inktrebuchet

Bummer... thanks for the quick response.

I should've realized that from the start.

altoiddealer

Yeah you are aware that you can use separate anims.  Suggestion for coding it:

[State 0, ChangeAnim]
Trigger1 = Time%600 = 0 ;triggers every 10 seconds
anim = 200+random%4 ;picks one of 3 different anims at random

Just be sure to draw the hitbox correctly for each of the anims.
It's not really clutter if you organize it nicely.  I have like 200 1-tick anims in my char so Jailbot can look around lol.


If there are other controllers you need to use, per platform, then just use "anim = XXX" as a trigger for each of those controllers to apply the appropriate behavior.


XGargoyle

You can even use the same animation and have different clsn boxes for each frame, and just use the elem parameter to change to the right element

[State 0, ChangeAnim]
Trigger1 = Time%600 = 0 ;triggers every 10 seconds
anim = 200
elem = random%4 ;picks one of 3 different frames at random
Using Altoid's base code as reference


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!

inktrebuchet

Thanks guys, that's very helpful info. The elem parameter that was added does make me feel better about working on it.