maxattacks {max}
~Sets the maximum number of normal attacks animation i.e ATTACK1, ATTACK2 etc.
~{max} is number of available animations.
~Default is 4.
maxattacktypes {max}
~Sets the maximum number of attack types.
~PAIN,FALL, RISE, BLOCKPAIN and DEATH animations limit is also set together with this.
~{max} is number of available types.
~Default is 10 & maximum value is 99.
Already did that, but what I want is the block to stop moving when it's about to play its DEATH animation.Bloodbane said:@Sammy: Set facing 1 in block's header text to force it face right
name q_block
type obstacle
health 1
gfxshadow 1 2
nodieblink 2
antigravity 100
facing 1
nodrop 0
offscreenkill 50
anim idle
bbox 0 4 22 17
platform 5 22 -5 0 14 17 5 16
loop 0
delay 100
offset 11 17
frame data/chars/misc/block.gif
anim death
platform 5 22 -5 0 14 17 5 16
offset 11 17
delay 10
frame data/chars/misc/block.gif
frame data/chars/misc/block2.gif
name q_block
type obstacle
health 1
gfxshadow 1 2
nodieblink 2
antigravity 100
facing 1
nodrop 0
offscreenkill 50
anim idle
bbox 0 4 22 17
platform 5 22 -5 0 14 17 5 16
loop 0
delay 100
offset 11 17
frame data/chars/misc/block.gif
anim spawn
@script
if(frame==1){
void self = getlocalvar("self");
int x = getentityproperty(self,"x");
setentityvar(self, 1, x);
}
@end_script
platform 5 22 -5 0 14 17 5 16
delay 1
offset 11 17
frame data/chars/misc/block.gif
frame data/chars/misc/block.gif
anim death
@script
if(frame==1){
void self = getlocalvar("self");
int Tx = getentityvar(self, 1);
if(Tx){
changeentityproperty(self, "position", Tx);
changeentityproperty(self, "velocity", 0, 0, 0);
setentityvar(self, 1, NULL());
}
}
@end_script
platform 5 22 -5 0 14 17 5 16
offset 11 17
delay 1
frame data/chars/misc/block.gif
delay 10
frame data/chars/misc/block.gif
frame data/chars/misc/block2.gif
Bloodbane said:Maybe this is a bug
But anyways, here's how I solved that bug:
Code:name q_block type obstacle health 1 gfxshadow 1 2 nodieblink 2 antigravity 100 facing 1 nodrop 0 offscreenkill 50 anim idle bbox 0 4 22 17 platform 5 22 -5 0 14 17 5 16 loop 0 delay 100 offset 11 17 frame data/chars/misc/block.gif anim spawn @script if(frame==1){ void self = getlocalvar("self"); int x = getentityproperty(self,"x"); setentityvar(self, 1, x); } @end_script platform 5 22 -5 0 14 17 5 16 delay 1 offset 11 17 frame data/chars/misc/block.gif frame data/chars/misc/block.gif anim death @script if(frame==1){ void self = getlocalvar("self"); int Tx = getentityvar(self, 1); if(Tx){ changeentityproperty(self, "position", Tx); changeentityproperty(self, "velocity", 0, 0, 0); setentityvar(self, 1, NULL()); } } @end_script platform 5 22 -5 0 14 17 5 16 offset 11 17 delay 1 frame data/chars/misc/block.gif delay 10 frame data/chars/misc/block.gif frame data/chars/misc/block2.gif
void Ispawn(void vName, float fX, float fY, float fZ)
{//Spawns item next to caller.
//
//vName: Spawned item
//fX : X speed.
//fZ : Y speed.
//fY : Z speed.
void vSpawn = spawner(vName, 0, 0, 0); //Spawn object.
changeentityproperty(vSpawn, "direction", 1); //Set direction.
tossentity(vSpawn, fY, fX,fZ); // Toss item.
return vSpawn; //Return spawn.
}