O Ilusionista said:
added openborvariant background in write mode
This means that you can change the background via script?
Thanks for all your hard works.
Yes! Thanks!! ;D
Here new updates:
- fix blockback, blockpain getentityprop
- improvement for AIMOVE2_NOTARGETIDLE it works -> example: aimove chase notargetidle
- minor fix for killentity()
- added subtype boomrang
- changed boomrang_acc to boomrang {acceleration} {horizontal_distance}
- changed entityprop: changeentityproperty(entity,"boomrang",acceleration,horizontal_distance)
getentityproperty(entity,"boomrang",flag)
flag:
0 = acceleration
1 = horizontal_distance
- improvement for boomrang_move (not complete)
more work on boomerang weapon:
- added animation getboomerang and getboomeranginair
- improved boomerang motion
added common_animation_normal (takeaction)
added new script function:
executeanimation(entity, int anim, int resetable);
it works like performattack() but just you play an animation without animation loop.
This function avoid changeentityproperty(entity,"animation",value) loop issue!
Ok guy, now boomerang is complete!!
Test it. Here the tutorial.
Now you have the new subtype boomerang (that set automatically aimove boomerang that you can set manually too).
The enemy/player that can spawn the boomerang need set an animation like:
Code:
anim attack1
spawnframe 0 0 0 1 0
subentity boomrang
loop 0
delay 10
offset 29 57
bbox 24 10 13 49
frame data/chars/Leo/Attack11.gif
frame data/chars/Leo/Attack12.gif
frame data/chars/Leo/Attack13.gif
just to spawn the boomerang.
and here the boomerang entity:
Code:
name boomerang
type enemy
subtype boomerang
#aimove boomerang #automatic with subtype boomerang
#boomerang 0.2 106 # boomerang {acceleration} {horizontal_distance} #OPTIONAL
anim idle
loop 1
delay 15
offset 29 57
frame data/chars/Leo/boom01.gif
frame data/chars/Leo/boom02.gif
frame data/chars/Leo/boom03.gif
than if you want you can grab the boomerang at return with new animations getboomerang/getboomeranginair
Code:
anim getboomerang
loop 0
range 0 20
offset 29 57
bbox 0 0 0 0
delay 10
frame data/chars/Leo/MyToes01.gif
frame data/chars/Leo/MyToes02.gif
frame data/chars/Leo/MyToes03.gif
frame data/chars/Leo/MyToes01.gif
frame data/chars/Leo/MyToes02.gif
frame data/chars/Leo/MyToes03.gif
anim getboomeranginair
loop 0
range 0 20
offset 29 57
bbox 0 0 0 0
delay 10
frame data/chars/Leo/MyToes01.gif
frame data/chars/Leo/MyToes02.gif
frame data/chars/Leo/MyToes03.gif
frame data/chars/Leo/MyToes01.gif
frame data/chars/Leo/MyToes02.gif
frame data/chars/Leo/MyToes03.gif
How you can see you can set (optional) these animation for player/enemy that spawns the boomerang.
IMPORTANT: note the range param. It works for getboomerang/getboomeranginair to detect the boomerang distance. You need to set it!!
If you want to set manually the acceleration or the max distance that a boomerang can do... in boomerang entity just set:
boomerang {acceleration} {horizontal_distance} (float values)
speed of boomerang you can set manually or by default is 2.0!!
NOTE: If you want to block your attack animation while boomerang attacking, just use
loop 1
or
loop 1 x y to block at last frame/s

If you want a static animation (no press arrows buttons to move) just set velocity x,z to 0 at first frame!
Enjoy!!