Reply to Help Wanted?
If you don't have an account, just leave the password field blank.
Hello. I got some problems in adding a new enemy, ninja bot from mystery island to be exactly. I can use it fine in the game, but when the enemy try to walk to right side, he speed lowers dramatically, almost stopped, about 4 steps to walk a pixel. Here's what I done:
I have created the .ff file with the files named like this (I also used the images from Dink Network):
RW1-01.bmp,RW1-02.bmp,RW1-03.bmp......RW1-10.bmp,
RW3-01.bmp,RW3-02.bmp,RW3-03.bmp......RW3-10.bmp,
RW7-01.bmp,RW7-02.bmp,RW7-03.bmp......RW7-10.bmp,
RW9-01.bmp,RW9-02.bmp,RW9-03.bmp......RW9-10.bmp.
Then I've wrote this in the Dink.ini file:
load_sequence graphics\foes\ninjabot\attack\RA4- 882 //attack frames
load_sequence graphics\foes\ninjabot\attack\RA6- 884
SET_FRAME_SPECIAL 882 5 1
SET_FRAME_SPECIAL 884 5 1
load_sequence graphics\foes\ninjabot\walk\RW1- 887
load_sequence graphics\foes\ninjabot\walk\RW3- 889
load_sequence graphics\foes\ninjabot\walk\death- 891
load_sequence graphics\foes\ninjabot\walk\RW7- 893
load_sequence graphics\foes\ninjabot\walk\RW9- 895
And this is the script:
//ninja robot
void main( void )
{
int &mcounter;
sp_brain(¤t_sprite, 9);
sp_speed(¤t_sprite, 1);
sp_distance(¤t_sprite, 60);
sp_range(¤t_sprite, 45);
sp_frame_delay(¤t_sprite, 45);
sp_timing(¤t_sprite, 0);
sp_exp(¤t_sprite, 200);
sp_base_walk(¤t_sprite, 886);
//sp_base_death(¤t_sprite, 680);
sp_base_attack(¤t_sprite, 880);
sp_defense(¤t_sprite, 5);
sp_strength(¤t_sprite, 0);
sp_touch_damage(¤t_sprite, 0);
sp_hitpoints(¤t_sprite, 100);
preload_seq(882);
preload_seq(884);
preload_seq(887);
preload_seq(889);
preload_seq(893);
preload_seq(895);
}
void hit( void )
{
sp_target(¤t_sprite, &enemy_sprite);
//lock on to the guy who just hit us
//playsound
playsound(52, 22050,0,¤t_sprite, 0);
}
void die( void )
{
int &hold = sp_editor_num(¤t_sprite);
if (&hold != 0)
editor_type(&hold, 6);
&save_x = sp_x(¤t_sprite, -1);
&save_y = sp_y(¤t_sprite, -1);
external("emake","xlarge");
}
void attack( void )
{
//Get new sound
playsound(51, 22050,0,¤t_sprite, 0);
&mcounter = random(4000,0);
sp_attack_wait(¤t_sprite, &mcounter);
int &randy = random(8, 1);
if (&randy == 1)
say("`7EAT HOT CLAW", ¤t_sprite);
if (&randy == 2)
say("`7I WILL BREAK YOU TO BITS", ¤t_sprite);
if (&randy == 3)
say("`7SHOW ME WHAT DEATH IS", ¤t_sprite);
}
I'm an amateur in coding, but I don't see what's wrong here. Please, can anyone help me? Thanks!
I have created the .ff file with the files named like this (I also used the images from Dink Network):
RW1-01.bmp,RW1-02.bmp,RW1-03.bmp......RW1-10.bmp,
RW3-01.bmp,RW3-02.bmp,RW3-03.bmp......RW3-10.bmp,
RW7-01.bmp,RW7-02.bmp,RW7-03.bmp......RW7-10.bmp,
RW9-01.bmp,RW9-02.bmp,RW9-03.bmp......RW9-10.bmp.
Then I've wrote this in the Dink.ini file:
load_sequence graphics\foes\ninjabot\attack\RA4- 882 //attack frames
load_sequence graphics\foes\ninjabot\attack\RA6- 884
SET_FRAME_SPECIAL 882 5 1
SET_FRAME_SPECIAL 884 5 1
load_sequence graphics\foes\ninjabot\walk\RW1- 887
load_sequence graphics\foes\ninjabot\walk\RW3- 889
load_sequence graphics\foes\ninjabot\walk\death- 891
load_sequence graphics\foes\ninjabot\walk\RW7- 893
load_sequence graphics\foes\ninjabot\walk\RW9- 895
And this is the script:
//ninja robot
void main( void )
{
int &mcounter;
sp_brain(¤t_sprite, 9);
sp_speed(¤t_sprite, 1);
sp_distance(¤t_sprite, 60);
sp_range(¤t_sprite, 45);
sp_frame_delay(¤t_sprite, 45);
sp_timing(¤t_sprite, 0);
sp_exp(¤t_sprite, 200);
sp_base_walk(¤t_sprite, 886);
//sp_base_death(¤t_sprite, 680);
sp_base_attack(¤t_sprite, 880);
sp_defense(¤t_sprite, 5);
sp_strength(¤t_sprite, 0);
sp_touch_damage(¤t_sprite, 0);
sp_hitpoints(¤t_sprite, 100);
preload_seq(882);
preload_seq(884);
preload_seq(887);
preload_seq(889);
preload_seq(893);
preload_seq(895);
}
void hit( void )
{
sp_target(¤t_sprite, &enemy_sprite);
//lock on to the guy who just hit us
//playsound
playsound(52, 22050,0,¤t_sprite, 0);
}
void die( void )
{
int &hold = sp_editor_num(¤t_sprite);
if (&hold != 0)
editor_type(&hold, 6);
&save_x = sp_x(¤t_sprite, -1);
&save_y = sp_y(¤t_sprite, -1);
external("emake","xlarge");
}
void attack( void )
{
//Get new sound
playsound(51, 22050,0,¤t_sprite, 0);
&mcounter = random(4000,0);
sp_attack_wait(¤t_sprite, &mcounter);
int &randy = random(8, 1);
if (&randy == 1)
say("`7EAT HOT CLAW", ¤t_sprite);
if (&randy == 2)
say("`7I WILL BREAK YOU TO BITS", ¤t_sprite);
if (&randy == 3)
say("`7SHOW ME WHAT DEATH IS", ¤t_sprite);
}
I'm an amateur in coding, but I don't see what's wrong here. Please, can anyone help me? Thanks!