I'm a programmer

1) you need to copy in your game my *.c/*.h files that p_dynamite.txt imports like lib.c, defines.h, lib_motion.c, etc..
2) main script is in ondrawscript event:
here I simulate the physics like bouncing and frictioning of objects. then here I detect wall/platform to simulate wall bouncing.
bouncing/frictioning are functions:
check_friction(self,0.25,1.030);
check_bouncing(self,0.55,2);
and I use set_tossv(self); to store the y velocity.
3) I make sure that the dynamite explodes just after it has finished bouncing.
you can see that in FOLLOW10 animation.
I store the animation frame in getentityvar(self,10) like a previous anim position: prev_animpos var
than when I run FOLLOW10 anim (so it's in frame == 0) I use changeentityproperty(self,"animpos",prev_animpos+1);
to adjust the prev animation frame (animation was IDLE) in FOLLOW10 to not repeat the same frame.
In my case after frame 9 the dynamite can explode!!