The Dink Network

Problem with walking monsters

October 24th 2009, 12:27 PM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
When I add a monster that I've created myself they seams to prefer walking in just two directions (7 and 3), wich make them look really wierd. I noticed this while makeing the 'members of the order' in 'the bomb' too, but I didn't really care about it. So, is there any way to solve this?

Here's the monsters script if it's anything wrong with it:

//Stone worm

void main( void )
{
int &mcounter;
sp_brain(&current_sprite, 9);
sp_speed(&current_sprite, 1);
sp_distance(&current_sprite, 50);
sp_timing(&current_sprite, 33);
sp_exp(&current_sprite, 15);
sp_base_walk(&current_sprite, 860);
sp_base_death(&current_sprite, -1);
sp_defense(&current_sprite, 1);
sp_touch_damage(&current_sprite, 5);
sp_hitpoints(&current_sprite, 15);
preload_seq(861);
preload_seq(863);
preload_seq(867);
preload_seq(869);
preload_seq(865);
}

void hit( void )
{
playsound(29, 22050,0,&current_sprite, 0);

sp_target(&current_sprite, &enemy_sprite);
//lock on to the guy who just hit us
//playsound

}

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);
//drops
external("emake","small");
spawn("drop-w");
}
October 24th 2009, 06:18 PM
pillbug.gif
pillbug
Peasant He/Him United States
Love! True love! 
Do they actually move in 4 direction directions, and face only 7 and 3, or do they move in only directions 7 and 3? Try making them brain 10.
October 24th 2009, 07:35 PM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
It's moveing in all directions but only faceinng 7 and 3, yes.

I'll try to change brain to 10 tomorrow, I'm going to bed now ;
October 25th 2009, 09:36 AM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
Same problem with brain 10.
If I use brain 16 it works, but the monster wont attack dink...
October 25th 2009, 04:36 PM
spike.gif
Are the graphics loaded into the correct sequence slots? (861,863,867,869)
October 26th 2009, 06:21 AM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
I'm sure they are, otherwise it wouldn't work with brain 16, would it?
Anyway, here is the .ini lines:
load_sequence_now graphics\stoneh\m_1- 861 150
load_sequence_now graphics\stoneh\m_3- 863 150
load_sequence_now graphics\stoneh\m_5- 865
load_sequence_now graphics\stoneh\m_7- 867 150
load_sequence_now graphics\stoneh\m_9- 869 150
October 26th 2009, 07:14 PM
spike.gif
Hmm, well, I looked at the shadows in The Bomb. I didn't notice any problem, that's pretty much how it's supposed to work. Sprites use the **3 sequence to move down and right, and **7 to move up and left. **1 and **9 only show up when they're moing diagonally, and since brain 9 monsters targeting someone mainly move in lateral directions, those sequences don't show up a lot. If you took away the sp_target() code from the monsters' script, they should also use all their sequences more.

If you don't like how it looks, you could fiddle with the sequence numbering, eg. loading the graphics in the slots 862, 864, 866 and 868 instead.
October 27th 2009, 05:21 AM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
Ok, thanks
I'll just make it brain 16 and change it til brain 9 upon hit, then they will walk in all directions before you hit them atleast