oldyz
Well-known member
basically , i have a barrel -
if it only has has anim idle &anim fall - if you hit it from righjt to left, it will fly to the left blinking, hit it from left to right, it will fly to the right blinking
unfortunately it cant spawn, summonframe o spawnframe anything correctly with anim fall - so i had to change it to this:
using death & jumpframe things are better - the only problem is, i can't make it do its backdeath animation - if you hit the barrel from right to left - it still does the normal animdeath and do a jump/die to the right-
in this example i can verify for sure because if it would die towards the left or do its backdeath, the barrel would turn into an axe graphic
if it only has has anim idle &anim fall - if you hit it from righjt to left, it will fly to the left blinking, hit it from left to right, it will fly to the right blinking
unfortunately it cant spawn, summonframe o spawnframe anything correctly with anim fall - so i had to change it to this:
Code:
name barelX
type obstacle
#lifespan 3
health 1
gfxshadow 1
#facing 2
backpain 1
noatflash 1
flash bflash
noquake 1
#nodieblink 1
diesound data/sounds/drum.wav
bounce 1
nolife 1
jumpheight 3
load mutant2Xtest
load barelex2
animationscript data/scripts/spawn.c
anim idle
loop 1
offset 29 84
bbox 7 5 44 71 5
delay 1000
seta 0
platform 29 85 -45 -45 45 45 16 1070
frame data/chars/misc/barel1
frame data/chars/misc/barel1
anim BACKDEATH
offset 29 84
bbox 0 0 0 0
flipframe 0
jumpframe 0 3 -7 0
landframe 4
delay 30
@script
void self = getlocalvar("self");
if( frame == 0){
int r = rand()%30;
if( r > 11){
changeentityproperty(self, "animpos", 4);
} else if( r < -10){
changeentityproperty(self, "animpos", 9);
} else if( r < 0){
changeentityproperty(self, "animpos", 0);
} else if( r > 0){
changeentityproperty(self, "animpos", 13);
}
}
@end_script
#spawn#
#
frame data/chars/misc/axeb8 ##### 0 #######
frame data/chars/misc/axeb8 #################
frame data/chars/misc/empty.png ###########
frame data/chars/misc/empty.png #################
frame data/chars/misc/barel3 ###### 4 ######
#spawn#
#
frame data/chars/misc/barel3 #################
frame data/chars/misc/empty.png ###########
frame data/chars/misc/empty.png #################
frame data/chars/misc/empty.png #################
frame data/chars/misc/barelb2 ###### 9 ######
#spawn#
#
frame data/chars/misc/barelb2 #################
frame data/chars/misc/empty.png ###########
frame data/chars/misc/empty.png #################
frame data/chars/misc/empty.png #################
frame data/chars/misc/barelb1 ###### 13 ######
delay 10
@cmd spawn01 "mutant2Xtest" 0 0 3
frame data/chars/misc/barelb1 #################
delay 10
frame data/chars/misc/empty.png ###########
frame data/chars/misc/empty.png #################
frame data/chars/misc/empty.png
anim death
offset 29 84
bbox 0 0 0 0
jumpframe 0 3 -1 0
landframe 4
delay 30
@script
void self = getlocalvar("self");
if( frame == 0){
int r = rand()%30;
if( r > 11){
changeentityproperty(self, "animpos", 4);
} else if( r < -10){
changeentityproperty(self, "animpos", 9);
} else if( r < 0){
changeentityproperty(self, "animpos", 0);
} else if( r > 0){
changeentityproperty(self, "animpos", 13);
}
}
@end_script
landframe 1
#spawn#
#
frame data/chars/misc/barel2 ##### 0 #######
frame data/chars/misc/barel2 #################
frame data/chars/misc/empty.png ###########
frame data/chars/misc/empty.png #################
frame data/chars/misc/barel3 ###### 4 ######
#spawn#
#
frame data/chars/misc/barel3 #################
frame data/chars/misc/empty.png ###########
frame data/chars/misc/empty.png #################
frame data/chars/misc/empty.png #################
frame data/chars/misc/barelb2 ###### 9 ######
#spawn#
#
frame data/chars/misc/barelb2 #################
frame data/chars/misc/empty.png ###########
frame data/chars/misc/empty.png #################
frame data/chars/misc/empty.png #################
frame data/chars/misc/barelb1 ###### 13 ######
delay 10
@cmd spawn01 "mutant2Xtest" 0 0 3
frame data/chars/misc/barelb1 #################
delay 10
frame data/chars/misc/empty.png ###########
frame data/chars/misc/empty.png #################
frame data/chars/misc/empty.png
using death & jumpframe things are better - the only problem is, i can't make it do its backdeath animation - if you hit the barrel from right to left - it still does the normal animdeath and do a jump/die to the right-
in this example i can verify for sure because if it would die towards the left or do its backdeath, the barrel would turn into an axe graphic