Yargh, bumwaffle!
Woah I'm tired. When I close my eyes I feel like I'm going through some sort of vortex thing. Anyways, I got this script see (suprise suprise) and it almost doesent run. the last sign of it working is when it plays the midi. Or it unfreezes, whichever is last. So, heres the script type animal. Its probobly something stupid, but its really bothering me.
void main(void)
{
if(&story == 8);
{
stopmidi("9");
freeze(1);
wait(1000);
say_stop("Hmmm... I'ts a little quite...", 1);
wait(800);
say_stop("Too quite...", 1);
wait(300);
move_stop(1, 8, 300, 1);
wait(400);
screenlock(1);
wait(700);
say_stop("That is not a good sign.", 1);
playmidi("4.mid");
wait(500);
unfreeze(1);
int &where = (random(1, 400));
int &wheere2 = (random(1, 2));
int &wheeere3;
int &dir;
int &sequence;
loop:
&where = (random(1, 400));
&wheere2 = (random(1, 2));
If(&wheere2 == 1)
{
&wheere2 = 370;
&wheeere3 = 270;
}
If(&wheere2 == 2)
{
&wheere2 = 270;
&wheeere3 = 370;
}
if(&wheere2 = 370)
{
&dir = 4;
&sequence = 531;
}
if(&wheere2 = 370)
{
&dir = 6;
&sequence = 533;
}
int &boncabonc = create_sprite(&wheere2, &where1, 16, &sequence, 1);
sp_speed(&boncabonc, 1);
sp_base_walk(&boncabonc, 530);
move(&boncabonc, &dir, &wheeere3, 1);
wait(2000);
goto loop;
}
}
Thanks.
void main(void)
{
if(&story == 8);
{
stopmidi("9");
freeze(1);
wait(1000);
say_stop("Hmmm... I'ts a little quite...", 1);
wait(800);
say_stop("Too quite...", 1);
wait(300);
move_stop(1, 8, 300, 1);
wait(400);
screenlock(1);
wait(700);
say_stop("That is not a good sign.", 1);
playmidi("4.mid");
wait(500);
unfreeze(1);
int &where = (random(1, 400));
int &wheere2 = (random(1, 2));
int &wheeere3;
int &dir;
int &sequence;
loop:
&where = (random(1, 400));
&wheere2 = (random(1, 2));
If(&wheere2 == 1)
{
&wheere2 = 370;
&wheeere3 = 270;
}
If(&wheere2 == 2)
{
&wheere2 = 270;
&wheeere3 = 370;
}
if(&wheere2 = 370)
{
&dir = 4;
&sequence = 531;
}
if(&wheere2 = 370)
{
&dir = 6;
&sequence = 533;
}
int &boncabonc = create_sprite(&wheere2, &where1, 16, &sequence, 1);
sp_speed(&boncabonc, 1);
sp_base_walk(&boncabonc, 530);
move(&boncabonc, &dir, &wheeere3, 1);
wait(2000);
goto loop;
}
}
Thanks.
int &where = (random(1, 400));
int &wheere2 = (random(1, 2));
No need for the extra parenthesese.
int &where = random(1, 400);
int &wheere2 = random(1, 2);
is correct, I imagine. You also do it later.
int &wheere2 = (random(1, 2));
No need for the extra parenthesese.
int &where = random(1, 400);
int &wheere2 = random(1, 2);
is correct, I imagine. You also do it later.
Also, stopmidi(); works fine... no need to specify which midi you're stopping.
Haha you said,
"When I close my eyes I feel like I'm going through...vortex..."
You went through me...like woah
"When I close my eyes I feel like I'm going through...vortex..."
You went through me...like woah
August 6th 2005, 07:53 AM

Hog of space


Thanks for your help, but theres something else stopping the boncas from spawning. I made a couple of other tweaks myself, so i might as well post the script. Cheers.
void main(void)
{
if(&story == 8);
{
stopmidi("9");
freeze(1);
wait(1000);
say_stop("Hmmm... I'ts a little quite...", 1);
wait(800);
say_stop("Too quite...", 1);
wait(300);
move_stop(1, 8, 300, 1);
wait(400);
screenlock(1);
wait(700);
say_stop("That is not a good sign.", 1);
playmidi("4.mid");
wait(500);
unfreeze(1);
int &where;
int &wheere2;
int &wheeere3;
int &dir;
int &sequence;
loop:
&where = random(1, 400);
&wheere2 = random(1, 2);
If(&wheere2 == 1)
{
&wheere2 = 370;
&wheeere3 = 270;
}
If(&wheere2 == 2)
{
&wheere2 = 270;
&wheeere3 = 370;
}
if(&wheere2 = 370)
{
&dir = 4;
&sequence = 531;
}
if(&wheere2 = 270)
{
&dir = 6;
&sequence = 533;
}
int &boncabonc = create_sprite(&wheere2, &where1, 16, &sequence, 1);
sp_speed(&boncabonc, 1);
sp_base_walk(&boncabonc, 530);
move(&boncabonc, &dir, &wheeere3, 1);
wait(2000);
goto loop;
}
}
w00t.
void main(void)
{
if(&story == 8);
{
stopmidi("9");
freeze(1);
wait(1000);
say_stop("Hmmm... I'ts a little quite...", 1);
wait(800);
say_stop("Too quite...", 1);
wait(300);
move_stop(1, 8, 300, 1);
wait(400);
screenlock(1);
wait(700);
say_stop("That is not a good sign.", 1);
playmidi("4.mid");
wait(500);
unfreeze(1);
int &where;
int &wheere2;
int &wheeere3;
int &dir;
int &sequence;
loop:
&where = random(1, 400);
&wheere2 = random(1, 2);
If(&wheere2 == 1)
{
&wheere2 = 370;
&wheeere3 = 270;
}
If(&wheere2 == 2)
{
&wheere2 = 270;
&wheeere3 = 370;
}
if(&wheere2 = 370)
{
&dir = 4;
&sequence = 531;
}
if(&wheere2 = 270)
{
&dir = 6;
&sequence = 533;
}
int &boncabonc = create_sprite(&wheere2, &where1, 16, &sequence, 1);
sp_speed(&boncabonc, 1);
sp_base_walk(&boncabonc, 530);
move(&boncabonc, &dir, &wheeere3, 1);
wait(2000);
goto loop;
}
}
w00t.
preload those sequences.
preload_seq(531);
preload_seq(533);
//just for luck...
preload_seq(535);
preload_seq(537);
preload_seq(531);
preload_seq(533);
//just for luck...
preload_seq(535);
preload_seq(537);
Woohoo! It works now, just needs a lot of tweaking. Thanks very much.
Hmmm, tweaking is proving harder than I thought. Theese lines are all faulty in some way. Thanks.
&where1 = random(1, 400);
//Chooses either 1 or 400, not something in beetween.
sp_script(&boncabonc, bonca);
//just doesent work.
Thanks, there will probably be more because the script is really bad. Cheers.
&where1 = random(1, 400);
//Chooses either 1 or 400, not something in beetween.
sp_script(&boncabonc, bonca);
//just doesent work.
Thanks, there will probably be more because the script is really bad. Cheers.
Int &aappa = random(2,1);
if (&aappa == 1)
&where1 = 1;
if (&aappa == 2)
&where1 = 400;
sp_script(&boncabonc, "bonca");
if (&aappa == 1)
&where1 = 1;
if (&aappa == 2)
&where1 = 400;
sp_script(&boncabonc, "bonca");
Wow, fast reply. Thanks, but the random thing does that, and doesent choose something in beetween. Every time its either 1 or 400.
Ahh I thought you wanted the opposite... try switching the numbers
Woohoo, works, although theres another problem which i'm sure i can fix myself... Hmmm... Anyway, thanks a lot.
Ok, I guess I cant fix it myself... Crap. Thanks for baring with me, here is the main script again, and then there is bonca.c. The problem is, the boncas spawn, but dont move, they are stuck on the same frame and the same spot. Thanks.
void main(void)
{
if(&story == 8);
{
stopmidi("9");
preload_seq(530);
preload_seq(531);
preload_seq(532);
preload_seq(533);
preload_seq(534);
preload_seq(535);
preload_seq(536);
preload_seq(537);
preload_seq(538);
preload_seq(539);
freeze(1);
wait(1000);
say_stop("Hmmm... I'ts a little quite...", 1);
wait(800);
say_stop("Too quite...", 1);
wait(300);
move_stop(1, 8, 300, 1);
wait(400);
screenlock(1);
wait(700);
say_stop("That is not a good sign.", 1);
playmidi("4.mid");
wait(500);
unfreeze(1);
int &where1;
int &wheere2;
int &wheeere3;
int &dir;
int &sequence;
loop:
&where1 = random(400, 1);
&wheere2 = random(2, 1);
If(&wheere2 == 1)
{
&wheere2 = 370;
&wheeere3 = 270;
}
If(&wheere2 == 2)
{
&wheere2 = 270;
&wheeere3 = 370;
}
if(&wheere2 == 370)
{
&dir = 4;
&sequence = 531;
}
if(&wheere2 == 270)
{
&dir = 6;
&sequence = 533;
}
int &boncabonc = create_sprite(&wheere2, &where1, 16, &sequence, 1);
sp_script(&boncabonc, "bonca");
wait(2000);
goto loop;
}
}
void main(void)
{
freeze(¤t_sprite);
sp_speed(¤t_sprite, 1);
sp_brain(¤t_sprite, 16);
sp_base_walk(¤t_sprite, 530);
sp_touch_damage(¤t_sprite, 4);
move_stop(¤t_sprite, &dir, &wheeere3, 1);
sp_active(¤t_sprite, 0);
}
void main(void)
{
if(&story == 8);
{
stopmidi("9");
preload_seq(530);
preload_seq(531);
preload_seq(532);
preload_seq(533);
preload_seq(534);
preload_seq(535);
preload_seq(536);
preload_seq(537);
preload_seq(538);
preload_seq(539);
freeze(1);
wait(1000);
say_stop("Hmmm... I'ts a little quite...", 1);
wait(800);
say_stop("Too quite...", 1);
wait(300);
move_stop(1, 8, 300, 1);
wait(400);
screenlock(1);
wait(700);
say_stop("That is not a good sign.", 1);
playmidi("4.mid");
wait(500);
unfreeze(1);
int &where1;
int &wheere2;
int &wheeere3;
int &dir;
int &sequence;
loop:
&where1 = random(400, 1);
&wheere2 = random(2, 1);
If(&wheere2 == 1)
{
&wheere2 = 370;
&wheeere3 = 270;
}
If(&wheere2 == 2)
{
&wheere2 = 270;
&wheeere3 = 370;
}
if(&wheere2 == 370)
{
&dir = 4;
&sequence = 531;
}
if(&wheere2 == 270)
{
&dir = 6;
&sequence = 533;
}
int &boncabonc = create_sprite(&wheere2, &where1, 16, &sequence, 1);
sp_script(&boncabonc, "bonca");
wait(2000);
goto loop;
}
}
void main(void)
{
freeze(¤t_sprite);
sp_speed(¤t_sprite, 1);
sp_brain(¤t_sprite, 16);
sp_base_walk(¤t_sprite, 530);
sp_touch_damage(¤t_sprite, 4);
move_stop(¤t_sprite, &dir, &wheeere3, 1);
sp_active(¤t_sprite, 0);
}
Yes, but stuff moves after you use move_stop when you use a freeze command.
Local variables only work inside the same script... simple fix is to do the following in the bonca script:
int &bonx = sp_x(¤t_sprite, -1);
if (&bonx == 270)
move_stop(¤t_sprite, 6, 370, 1);
if (&bonx == 370)
move_stop(¤t_sprite, 4, 270, 1);
btw, your script is quite unnecessarily complex.
int &bonx = sp_x(¤t_sprite, -1);
if (&bonx == 270)
move_stop(¤t_sprite, 6, 370, 1);
if (&bonx == 370)
move_stop(¤t_sprite, 4, 270, 1);
btw, your script is quite unnecessarily complex.

Uh, no, he meant "quite." "Quiet" is to be silent.
This is quite silly, so quit it and be quiet...
Ahh, I see, DaVince's post was in reference to spacehoggy's script instead of scratcher's use of "quite."
Thanks for the clarity, cough.
Thanks for the clarity, cough.