The Dink Network

Just a simple dinkc question.

April 22nd 2005, 04:59 PM
pig.gif
Right, ive got a gaurd, who has to walk out of the way in a certian situation, but he wont walk away. I think this is because of him being hard, so what do i do to make it work?

P.S. Heres the script i got:

void talk(void)
{
if(&gladfight == 0)
{
freeze(1);
say_stop("`2do you have an apointment? I think not.", &current_sprite);
unfreeze(1);
}
}
{
if(&gladfight<0)
{
freeze(1);
say_stop("`2Good luck dink!", &current_sprite);
sp_hardness(&current_sprite, 1);
move_stop(&current_sprite, 2, 380, 1);
say("thanks", 1);
unfreeze(1);
}
}
April 22nd 2005, 05:18 PM
peasantmb.gif
Lunacre
Peasant He/Him Finland
 
Have you set speed for guard? If speed is 0, guard won't move anywhere
April 22nd 2005, 05:22 PM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
As I don't see it being created with create_sprite(), I assume the sprite is in the editor right? Then the easiest way to fix it is just to set its hardness in the editor to 1 and the hardness isn't the problem.

Also, the sp_hardness(); command doesn't exist, it's sp_hard(); After you've done that, you'll need to redraw the hard map of that sprite so the hardness goes away and the character can walk. You can do that by doing draw_hard_sprite(&current_sprite); Though, that's only necessary if the sprite's hardness changes from hard to non-hard or vice versa.

Second, the character/sprite would also need a speed to walk so you'd need to give him a speed, either in the editor or by doing sp_speed(&current_sprite, 1); where speed is 1 or 2 or so.

Third, the character would need its sp_base_walk set to whatever the character is. If he's a guard, you can have the red (basewalk = 270), blue (280), silver (290) and gold (300) guard. You can either set that in the editor or by doing sp_base_walk(&current_sprite, xxx);

Fourth, the character preferably should also have a brain, set to 16 in this case but even though there are situations where it's not really necessary (like a cutscene where you only see him, then he walks off screen never to be seen again - ie: not unfrozen after the cutscene and walking around), it doesn't hurt to set it anyway. Either in the editor or sp_brain(&current_sprite, 16);

April 24th 2005, 02:25 AM
pig.gif
Doh! I did something spectacularly dumb. The script I showed you was attached to the room, not the knight.... &current_sprite.... ughhh... sorry to bother you all.