Reply to Help needed
If you don't have an account, just leave the password field blank.
I added a new monster to my Dmod, one which I created.Ok, I add it to a screen, give it a script, base walk, base attack etc. Now when I play my DMod, this monster just floats on the screen stuck in the same frame instead of walking nicely on the screen. Any possible explanations to what is happening??? Here are the Dink.ini lines and the script I have used for this foe:
I intend add the depth dot and the co-ordinates for the hardbox later on. So whether this or any other reason is there for the graphics not working properly.
load_sequence GRAPHICS\water\walk\walk2- 882 90
load_sequence GRAPHICS\water\walk\walk4- 884 90
load_sequence GRAPHICS\water\walk\walk6- 886 90
load_sequence GRAPHICS\water\walk\walk8- 888 90
load_sequence GRAPHICS\water\atk\attack2- 892 90
load_sequence GRAPHICS\water\atk\attack4- 894 90
load_sequence GRAPHICS\water\atk\attack6- 896 90
load_sequence GRAPHICS\water\atk\attack8- 898 90
//892 is the attack sequence
set_frame_special 892 3 1
set_frame_special 894 3 1
set_frame_special 896 3 1
set_frame_special 898 3 1
Script:
//script for the water monster
void main();
{
int &mcounter;
sp_brain(¤t_sprite, 9);
sp_speed(¤t_sprite, 1);
sp_nohit(¤t_sprite, 0);
sp_distance(¤t_sprite, 50);
sp_range(¤t_sprite, 30);
sp_exp(¤t_sprite, 200);
sp_base_walk(¤t_sprite, 880);
sp_base_attack(¤t_sprite, 890);
sp_defense(¤t_sprite, 30);
sp_strength(¤t_sprite, 10);
sp_touch_damage(¤t_sprite, 5);
sp_hitpoints(¤t_sprite, 100);
preload_seq(882);
preload_seq(884);
preload_seq(886);
preload_seq(888);
preload_seq(896);
preload_seq(894);
preload_seq(893);
preload_seq(898);
wait(500);
int &mtarget = get_sprite_with_this_brain(9, ¤t_sprite);
if (&mtarget > 0) { sp_target(¤t_sprite, &mtarget); }
set_callback_random("target",2000,0);
}
void target( void )
{
&mtarget = sp_target(¤t_sprite, -1);
if (&mtarget == 0) { //get new target
&mtarget = get_sprite_with_this_brain(9, ¤t_sprite); if (&mtarget > 0) { sp_target(¤t_sprite, &mtarget); }
}
}
void hit( void )
{
playsound(29, 18050,0,¤t_sprite, 0);
sp_target(¤t_sprite, &enemy_sprite);
//lock on to the guy who just hit us
//playsound
}
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","large");
}
void attack( void )
{
playsound(31, 18050,0,¤t_sprite, 0);
&mcounter = random(2000,0);
sp_attack_wait(¤t_sprite, &mcounter);
}
Help!!
I intend add the depth dot and the co-ordinates for the hardbox later on. So whether this or any other reason is there for the graphics not working properly.
load_sequence GRAPHICS\water\walk\walk2- 882 90
load_sequence GRAPHICS\water\walk\walk4- 884 90
load_sequence GRAPHICS\water\walk\walk6- 886 90
load_sequence GRAPHICS\water\walk\walk8- 888 90
load_sequence GRAPHICS\water\atk\attack2- 892 90
load_sequence GRAPHICS\water\atk\attack4- 894 90
load_sequence GRAPHICS\water\atk\attack6- 896 90
load_sequence GRAPHICS\water\atk\attack8- 898 90
//892 is the attack sequence
set_frame_special 892 3 1
set_frame_special 894 3 1
set_frame_special 896 3 1
set_frame_special 898 3 1
Script:
//script for the water monster
void main();
{
int &mcounter;
sp_brain(¤t_sprite, 9);
sp_speed(¤t_sprite, 1);
sp_nohit(¤t_sprite, 0);
sp_distance(¤t_sprite, 50);
sp_range(¤t_sprite, 30);
sp_exp(¤t_sprite, 200);
sp_base_walk(¤t_sprite, 880);
sp_base_attack(¤t_sprite, 890);
sp_defense(¤t_sprite, 30);
sp_strength(¤t_sprite, 10);
sp_touch_damage(¤t_sprite, 5);
sp_hitpoints(¤t_sprite, 100);
preload_seq(882);
preload_seq(884);
preload_seq(886);
preload_seq(888);
preload_seq(896);
preload_seq(894);
preload_seq(893);
preload_seq(898);
wait(500);
int &mtarget = get_sprite_with_this_brain(9, ¤t_sprite);
if (&mtarget > 0) { sp_target(¤t_sprite, &mtarget); }
set_callback_random("target",2000,0);
}
void target( void )
{
&mtarget = sp_target(¤t_sprite, -1);
if (&mtarget == 0) { //get new target
&mtarget = get_sprite_with_this_brain(9, ¤t_sprite); if (&mtarget > 0) { sp_target(¤t_sprite, &mtarget); }
}
}
void hit( void )
{
playsound(29, 18050,0,¤t_sprite, 0);
sp_target(¤t_sprite, &enemy_sprite);
//lock on to the guy who just hit us
//playsound
}
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","large");
}
void attack( void )
{
playsound(31, 18050,0,¤t_sprite, 0);
&mcounter = random(2000,0);
sp_attack_wait(¤t_sprite, &mcounter);
}
Help!!






