dang theese danged faulty scrips....
Sorry about the frequency of theese posts, its just i've forgotton most of what i used to know. anyway, the void die procedure doesent run at all. I think I might also put the other script that leads to it on incase it has something to do with the problem.
Arena.c - this is the room in which the fight happens.
void main(void)
{
if(&gladfight == 1)
{
screenlock(1);
&vision = 1;
say("here goes nothing", 1);
playmidi("f1.mid");
int &bob = create_sprite(460, 220, 7, 390, 1);
say("`3I shall eat you!", &bob);
sp_base_walk(&bob, 390);
sp_frame(&bob, 1);
sp_seq(&bob, 390);
sp_brain(&bob, 9);
sp_speed(&bob, 1);
sp_exp(&bob, 100);
sp_script(&bob, opponent-bob);
sp_base_walk(&bob, 390);
sp_target(&bob, 1);
sp_touch_damage(&bob, 2);
sp_hitpoints(&bob, 10);
sp_dir(bob, 1);
}
}
opponent-bob.c - the script that has the die procedure for bob. its not attached to anything because bobs not in the editor.
void die(void)
{
say("owww, that fellow took a bite out of my arm!", 1);
script_attach(1000);
&player_map = 140;
fade_down();
wait(400);
load_screen();
sp_x(1, 295);
sp_y(1, 370);
sp_dir(1, 2);
draw_screen();
fade_up();
Kill_this_task();
}
Thanks.
EDIT: fellow is actualy funnier than ba*****
Arena.c - this is the room in which the fight happens.
void main(void)
{
if(&gladfight == 1)
{
screenlock(1);
&vision = 1;
say("here goes nothing", 1);
playmidi("f1.mid");
int &bob = create_sprite(460, 220, 7, 390, 1);
say("`3I shall eat you!", &bob);
sp_base_walk(&bob, 390);
sp_frame(&bob, 1);
sp_seq(&bob, 390);
sp_brain(&bob, 9);
sp_speed(&bob, 1);
sp_exp(&bob, 100);
sp_script(&bob, opponent-bob);
sp_base_walk(&bob, 390);
sp_target(&bob, 1);
sp_touch_damage(&bob, 2);
sp_hitpoints(&bob, 10);
sp_dir(bob, 1);
}
}
opponent-bob.c - the script that has the die procedure for bob. its not attached to anything because bobs not in the editor.
void die(void)
{
say("owww, that fellow took a bite out of my arm!", 1);
script_attach(1000);
&player_map = 140;
fade_down();
wait(400);
load_screen();
sp_x(1, 295);
sp_y(1, 370);
sp_dir(1, 2);
draw_screen();
fade_up();
Kill_this_task();
}
Thanks.
EDIT: fellow is actualy funnier than ba*****
1. I've always prefered 8-character script names, although I don't think longer cause problems. Also, the dash makes me queasy.
2. Quote marks in the sp_script command:
sp_script(&bob, "opponent-bob");
2. Quote marks in the sp_script command:
sp_script(&bob, "opponent-bob");
8 characters is better. Although it won't give problems when you keep them in .c format, the .d file will have a ~1 behind it (or ~2 etc...)
April 24th 2005, 01:27 PM

spacehoggy


Ah, brilliant, thanks milo. It was due to the, lack of speechmarks in sp_script();. I thought that to about dash, but in the actual game, theres loads of things like that. En-pill, S1-cave ect.
I've got another script thats faulty. sorry again agout all this, its just i spend hours trying to get scripts to work before i post them, but i can never get em to work. if you dont mind, keep on reading... excellent, thanks. Heres the script with the problem, and the problem is that it doesent run at all.
ccahier.c - it doesent fun at all.
void talk(void)
{
freeze(1);
say_stop("`8Hi Dink, you have &credit credit left. What do you want to do with it?", ¤t_sprite);
choice_start()
"Take out all money."
"leave"
choice_end()
if(&result == 1);
{
&gold = (&gold += &credit); //I think this might be where the problem is...
}
unfreeze(1);
}
Thanks guys.
ccahier.c - it doesent fun at all.
void talk(void)
{
freeze(1);
say_stop("`8Hi Dink, you have &credit credit left. What do you want to do with it?", ¤t_sprite);
choice_start()
"Take out all money."
"leave"
choice_end()
if(&result == 1);
{
&gold = (&gold += &credit); //I think this might be where the problem is...
}
unfreeze(1);
}
Thanks guys.