dink x and y
When I use a magic I want to create a sprite at dink run it's frames and die. ( the Sprite is a "Animation" for the heal spell.) There isn't a variable for dinks x and y, how can I create it at his current location?
You can find his location by checking out the value of sp_x and sp_y.
int &dinkx = sp_x(1,-1); int &dinky = sp_y(1,-1);Then create the sprite at &dinkx and &dinky. -1 is a special value that returns what value an attribute has, it doesn't change it.
I never knew that trick...
It doesn't work. The Sprite doesn't appear at all. When i change brain to 6, reapeat, the first frame appear but the seq doesn't run.
void use(void)
{
say("Cure!!", 1);
int &dinkx = sp_x(1,-1);
int &dinky = sp_y(1,-1);
create_sprite(&dinkx,&dinky,7,890,1);
&life += 5;
&life += &magic;
If (&life > &lifemax)
{
&life = &lifemax;
}
playsound(24,22050,0,0,0);
&magic_level = 0;
draw_status();
}
void use(void)
{
say("Cure!!", 1);
int &dinkx = sp_x(1,-1);
int &dinky = sp_y(1,-1);
create_sprite(&dinkx,&dinky,7,890,1);
&life += 5;
&life += &magic;
If (&life > &lifemax)
{
&life = &lifemax;
}
playsound(24,22050,0,0,0);
&magic_level = 0;
draw_status();
}
Try putting
If it doesn't animate even with brain 6, though, the problem is probably in the sequence/graphics.
sp_frame(&return,1);right after the create_sprite command. IIRC, brain 6 should animate automatically, but the other brains need this to start.
If it doesn't animate even with brain 6, though, the problem is probably in the sequence/graphics.
Sequence 890 sounds like a sprite that doesn't exist or a sprite you've added yourself, that might be your problem

Still doesn't work.
If I add the sprite in windinkEdit and set the brain to 6 and base idle to 890 it run all scripts over and over again. But when created in script it just run first frame...
And... It's my own graphics...
Anyone know what to do? D:
If I add the sprite in windinkEdit and set the brain to 6 and base idle to 890 it run all scripts over and over again. But when created in script it just run first frame...
And... It's my own graphics...
Anyone know what to do? D: