need help with my script
Im tring to do a script. Its my first ever! 'cause its my first one I dont know whats wrong? Here it is:
// the tree
void hit( void )
{
&tree = 1;
say_stop("`4Ouch!", current_sprite);
}
void talk ( void )
{
if (&tree == 1)
{
freeze(1);
playmidi("1.mid");
say_stop("That is a nice tree.", 1);
wait(500);
say_stop("`4Thank you, human.", ¤t_sprite);
&tree = 2;
unfreeze(1);
}
}
void talk(void)
{
if (&tree == 2)
{
freeze(1);
say_stop("Yepp, this is a nice tree.", 1);
wait(500);
say_stop("`4I already know that.", ¤t_sprite);
&tree = 3;
unfreeze(1);
}
}
void talk(void)
{
if (&tree == 3)
{
freeze(1);
say("This is a very very very VERY nice tree.", 1);
wait(500);
say("`4Whats wrong with you?.", ¤t_sprite);
&tree = 4;
unfreeze(1);
}
}
void talk(void)
{
if (&tree == 4)
{
freeze(1);
say_stop("Nothing at all.", 1);
wait(500);
say_stop("`4Go and burn yourself.", ¤t_sprite);
&tree = 5;
unfreeze(1);
}
}
}
void talk(void)
{
if (&tree == 4)
{
say_stop("...", 1);
}
// the tree
void hit( void )
{
&tree = 1;
say_stop("`4Ouch!", current_sprite);
}
void talk ( void )
{
if (&tree == 1)
{
freeze(1);
playmidi("1.mid");
say_stop("That is a nice tree.", 1);
wait(500);
say_stop("`4Thank you, human.", ¤t_sprite);
&tree = 2;
unfreeze(1);
}
}
void talk(void)
{
if (&tree == 2)
{
freeze(1);
say_stop("Yepp, this is a nice tree.", 1);
wait(500);
say_stop("`4I already know that.", ¤t_sprite);
&tree = 3;
unfreeze(1);
}
}
void talk(void)
{
if (&tree == 3)
{
freeze(1);
say("This is a very very very VERY nice tree.", 1);
wait(500);
say("`4Whats wrong with you?.", ¤t_sprite);
&tree = 4;
unfreeze(1);
}
}
void talk(void)
{
if (&tree == 4)
{
freeze(1);
say_stop("Nothing at all.", 1);
wait(500);
say_stop("`4Go and burn yourself.", ¤t_sprite);
&tree = 5;
unfreeze(1);
}
}
}
void talk(void)
{
if (&tree == 4)
{
say_stop("...", 1);
}
You can't have 4 void talk(void)
Try this.
void hit( void )
{
&tree = 1;
say_stop("`4Ouch!", current_sprite);
}
void talk ( void )
{
if (&tree == 1)
{
freeze(1);
playmidi("1.mid");
say_stop("That is a nice tree.", 1);
wait(500);
say_stop("`4Thank you, human.", ¤t_sprite);
&tree = 2;
unfreeze(1);
}
if (&tree == 2)
{
freeze(1);
say_stop("Yepp, this is a nice tree.", 1);
wait(500);
say_stop("`4I already know that.", ¤t_sprite);
&tree = 3;
unfreeze(1);
}
if (&tree == 3)
{
freeze(1);
say("This is a very very very VERY nice tree.", 1);
wait(500);
say("`4Whats wrong with you?.", ¤t_sprite);
&tree = 4;
unfreeze(1);
}
if (&tree == 4)
{
freeze(1);
say_stop("Nothing at all.", 1);
wait(500);
say_stop("`4Go and burn yourself.", ¤t_sprite);
&tree = 5;
unfreeze(1);
}
if (&tree == 4)
{
say_stop("...", 1);
}
}
void hit( void )
{
&tree = 1;
say_stop("`4Ouch!", current_sprite);
}
void talk ( void )
{
if (&tree == 1)
{
freeze(1);
playmidi("1.mid");
say_stop("That is a nice tree.", 1);
wait(500);
say_stop("`4Thank you, human.", ¤t_sprite);
&tree = 2;
unfreeze(1);
}
if (&tree == 2)
{
freeze(1);
say_stop("Yepp, this is a nice tree.", 1);
wait(500);
say_stop("`4I already know that.", ¤t_sprite);
&tree = 3;
unfreeze(1);
}
if (&tree == 3)
{
freeze(1);
say("This is a very very very VERY nice tree.", 1);
wait(500);
say("`4Whats wrong with you?.", ¤t_sprite);
&tree = 4;
unfreeze(1);
}
if (&tree == 4)
{
freeze(1);
say_stop("Nothing at all.", 1);
wait(500);
say_stop("`4Go and burn yourself.", ¤t_sprite);
&tree = 5;
unfreeze(1);
}
if (&tree == 4)
{
say_stop("...", 1);
}
}
thanks but it doesent work. if hir it nothing happends. If use it nothing happends... and the status bar isent uptating before selectiong a weapon.
you need to make a global called &tree in main.c
after that do what glenn said, except reverse it so that if (&tree == 4) is first and if (&tree == 1) is last.
after that do what glenn said, except reverse it so that if (&tree == 4) is first and if (&tree == 1) is last.
If use it nothing happends... and the status bar isent uptating before selectiong a weapon.
Don't use that innocent tree. you need to do
&update_status = 1;
draw_status();
to get the status bar behave.
Don't use that innocent tree. you need to do
&update_status = 1;
draw_status();
to get the status bar behave.