Solved CANT animation works with freespecials?

Question that is answered or resolved.

rafhot

Member
im trying to put my cant animation  to work with freespecials using energycost, but nothing happends
im doing anything wrong?
 
Solution
Ouch, my eyes hurt when trying to read the quote. Good thing I know how to remedy this.

Anyways, energycost is the reason she still consumes MP. If you already using script like this, it's best not to use energycost at all.

Also, set at which frame you want to do MP check like this:

@script
void vSelf = getlocalvar("self");
int iMP = getentityproperty(vSelf, "mp");
if ( frame == 0 && iMP < 10 )
  {
        //then play can't animation
        performattack(vSelf, openborconstant("ANI_CANT"), 1);
  }
if ( frame == 4 ){
        changeentityproperty(vSelf, "mp", iMP - 10);
        }
@end_script

This way if she consumes 10 MP at 5th frame and her MP falls below 10, she won't accidentally change to CANT...
Bloodbane said:
CANT animation is , as the name implies, can't be played.

Pretty much. I've looked at the code to get it working and never could figure a way to do it without revamping way too much stuff to be worthwhile. The animation itself is valid though, and you can use script to trigger/play it.

DC
 
i did this way, im sure is not the best metohd and not work exactly was i want but, at least she plays his cant animation and shouts "i need more energy"

i had to give +10 mp because each time she plays his cant animation she consumes mp

Code:
anim	freespecial2
	delay	6
	@script
	void vSelf = getlocalvar("self");
	int	iMP = getentityproperty(vSelf, "mp");
	if ( getentityproperty(vSelf,"mp") < 10 )
	  {
        //then play can't animation
        performattack(vSelf, openborconstant("ANI_CANT"), 1);
        changeentityproperty(vSelf, "mp", iMP + 10);
	  }
	@end_script
	offset	35 111
	bbox	16 8 41 104
	throwframe	4	2
	energycost	10 1
	sound	data/chars/sue/shot.wav
	frame	data/chars/sue/sh1.pcx
	offset	35 113
	frame	data/chars/sue/sh2.pcx
	offset	35 112
	frame	data/chars/sue/sh3.pcx
	offset	41 105
	frame	data/chars/sue/sh4.pcx
	offset	35 105
	frame	data/chars/sue/sh5.pcx
	delay	30
	frame	data/chars/sue/sh5.pcx
 
Ouch, my eyes hurt when trying to read the quote. Good thing I know how to remedy this.

Anyways, energycost is the reason she still consumes MP. If you already using script like this, it's best not to use energycost at all.

Also, set at which frame you want to do MP check like this:

@script
void vSelf = getlocalvar("self");
int iMP = getentityproperty(vSelf, "mp");
if ( frame == 0 && iMP < 10 )
  {
        //then play can't animation
        performattack(vSelf, openborconstant("ANI_CANT"), 1);
  }
if ( frame == 4 ){
        changeentityproperty(vSelf, "mp", iMP - 10);
        }
@end_script

This way if she consumes 10 MP at 5th frame and her MP falls below 10, she won't accidentally change to CANT animation.
 
Solution
Back
Top Bottom