Reply to Re: my stupid first item, HELP
If you don't have an account, just leave the password field blank.
Try this (most of this was suggested by Magic man):
void arm(void)
{
int &form = sp_base_walk(1, -1);
if (&form != 640) { &form = 0; }
if (&form == 640) { &form = 1; }
int &bw;
int &ba;
int &bi;
int &bd;
}
void use(void)
{
if(&form == 0)
{
&bw = sp_base_walk(1, -1);
&ba = sp_base_attack(1, -1);
&bi = sp_base_idle(1, -1);
&bd = sp_base_death(1, -1);
sp_base_walk(1, 640);
sp_base_attack(1, 630);
sp_base_idle(1, 610);
sp_base_death(1, 640);
&strength += 10;
draw_status();
&form = 1;
}
if(&form == 1)
{
sp_base_walk(1, &bw);
sp_base_attack(1, &ba);
sp_base_idle(1, &bi);
sp_base_death(1, &bd);
&strength -= 10;
draw_status();
&form = 0;
}
}
void disarm(void)
{
//Uh oh, you lose the values for &bw, &ba etc. so you better change back to normal while you still can
sp_base_walk(1, &bw);
sp_base_attack(1, &ba);
sp_base_idle(1, &bi);
sp_base_death(1, &bd);
&strength -= 10;
draw_status();
kill_this_task();
}
void pickup(void)
{
kill_this_task();
}
void drop(void)
{
kill_this_task();
}
This will screw up if you try to load a game saved after transformation, because the load will kill &bw, &ba, etc. I don't know how PotA solved this problem, but a solution clearly exists (most likely, using explicit values for &bw, &ba, etc.) Also, if you change weapons while transformed, Dink will return to his normal appearance. Sorry I couldn't help more.
void arm(void)
{
int &form = sp_base_walk(1, -1);
if (&form != 640) { &form = 0; }
if (&form == 640) { &form = 1; }
int &bw;
int &ba;
int &bi;
int &bd;
}
void use(void)
{
if(&form == 0)
{
&bw = sp_base_walk(1, -1);
&ba = sp_base_attack(1, -1);
&bi = sp_base_idle(1, -1);
&bd = sp_base_death(1, -1);
sp_base_walk(1, 640);
sp_base_attack(1, 630);
sp_base_idle(1, 610);
sp_base_death(1, 640);
&strength += 10;
draw_status();
&form = 1;
}
if(&form == 1)
{
sp_base_walk(1, &bw);
sp_base_attack(1, &ba);
sp_base_idle(1, &bi);
sp_base_death(1, &bd);
&strength -= 10;
draw_status();
&form = 0;
}
}
void disarm(void)
{
//Uh oh, you lose the values for &bw, &ba etc. so you better change back to normal while you still can
sp_base_walk(1, &bw);
sp_base_attack(1, &ba);
sp_base_idle(1, &bi);
sp_base_death(1, &bd);
&strength -= 10;
draw_status();
kill_this_task();
}
void pickup(void)
{
kill_this_task();
}
void drop(void)
{
kill_this_task();
}
This will screw up if you try to load a game saved after transformation, because the load will kill &bw, &ba, etc. I don't know how PotA solved this problem, but a solution clearly exists (most likely, using explicit values for &bw, &ba, etc.) Also, if you change weapons while transformed, Dink will return to his normal appearance. Sorry I couldn't help more.