The Dink Network

Help Wanted?

March 13th 2005, 07:29 PM
duckdie.gif
seth25
Peasant They/Them
 
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(&current_sprite, 9);
sp_speed(&current_sprite, 1);
sp_distance(&current_sprite, 60);
sp_range(&current_sprite, 45);
sp_frame_delay(&current_sprite, 45);
sp_timing(&current_sprite, 0);
sp_exp(&current_sprite, 200);
sp_base_walk(&current_sprite, 886);
//sp_base_death(&current_sprite, 680);
sp_base_attack(&current_sprite, 880);
sp_defense(&current_sprite, 5);
sp_strength(&current_sprite, 0);
sp_touch_damage(&current_sprite, 0);
sp_hitpoints(&current_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(&current_sprite, &enemy_sprite);
//lock on to the guy who just hit us
//playsound
playsound(52, 22050,0,&current_sprite, 0);

}

void die( void )
{
int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
editor_type(&hold, 6);
&save_x = sp_x(&current_sprite, -1);
&save_y = sp_y(&current_sprite, -1);
external("emake","xlarge");

}
void attack( void )
{
//Get new sound
playsound(51, 22050,0,&current_sprite, 0);
&mcounter = random(4000,0);
sp_attack_wait(&current_sprite, &mcounter);
int &randy = random(8, 1);

if (&randy == 1)
say("`7EAT HOT CLAW", &current_sprite);
if (&randy == 2)
say("`7I WILL BREAK YOU TO BITS", &current_sprite);
if (&randy == 3)
say("`7SHOW ME WHAT DEATH IS", &current_sprite);

}

I'm an amateur in coding, but I don't see what's wrong here. Please, can anyone help me? Thanks!
March 13th 2005, 09:18 PM
pq_frog.gif
Ric
Peasant They/Them Canada
 
sprite base walk must be the whole set of sequences rounded down to the nearest 10.
in this caseSprite_base_walk = 880, exept that some are in the 890s!. For eg, base walk 880 will automaticly use 881 to go to lower-left, 883 to go to lower-right, 887 to goto upper-left, 889 to goto upper-right, and 885 for death.
It's realy wierd that your guy can walk right at all...
Erm... here is some details.
March 13th 2005, 09:45 PM
girl.gif
joshriot
Peasant They/Them United States
keep it real 
ill add this in cause i went through like the whole kill the hippies dmod time period without ever knowing that the base walk directions are based on the numpad. up down left right = 8 2 4 6
March 15th 2005, 02:17 PM
duckdie.gif
seth25
Peasant They/Them
 
Thanks you two!