Reply to Re: button
If you don't have an account, just leave the password field blank.
Well yeah, you'd need to store somewhere if the player has the map or not (unless he has it from the beginning of the game), so you could use a global variable for that, or just let it coincide with the &story variable.
You'd need the button6.c script for the button and somewhere else you'd need to change a variable to the the game know that Dink has a map. If a character in the game gives it to Dink, then you can do it there or, in case you want it to be an item Dink can pickup, you'll need to make it similar to a potion/heart.
So in your scripts carrie, you'd indeed need button6 where a variable checks if the player has the map; it can be simplified to this though:
////////// button6.c
void main(void)
{
if (&map == 0)
{
say("I don't own a map yet", 1);
kill_this_task();
return;
}
show_bmp("tiles\map1.bmp", 1, 0);
kill_this_task();
}
And if you want the scroll to be an item that you can pickup, then you could do (similar to rpotion.c):
////////// mapscr.c
void main(void)
{
sp_touch_damage(¤t_sprite, -1);
}
void touch(void)
{
int &hold = sp_editor_num(¤t_sprite);
if (&hold != 0)
{
&map = 1;
editor_type(&hold, 1);
}
playsound(10, 22050, 0, 0, 0);
sp_brain_parm(¤t_sprite, 5);
sp_brain(¤t_sprite, 12);
sp_touch_damage(¤t_sprite, 0);
sp_timing(¤t_sprite, 0);
}
Or you could just set &map to 1 in some other script.
You'd need the button6.c script for the button and somewhere else you'd need to change a variable to the the game know that Dink has a map. If a character in the game gives it to Dink, then you can do it there or, in case you want it to be an item Dink can pickup, you'll need to make it similar to a potion/heart.
So in your scripts carrie, you'd indeed need button6 where a variable checks if the player has the map; it can be simplified to this though:
////////// button6.c
void main(void)
{
if (&map == 0)
{
say("I don't own a map yet", 1);
kill_this_task();
return;
}
show_bmp("tiles\map1.bmp", 1, 0);
kill_this_task();
}
And if you want the scroll to be an item that you can pickup, then you could do (similar to rpotion.c):
////////// mapscr.c
void main(void)
{
sp_touch_damage(¤t_sprite, -1);
}
void touch(void)
{
int &hold = sp_editor_num(¤t_sprite);
if (&hold != 0)
{
&map = 1;
editor_type(&hold, 1);
}
playsound(10, 22050, 0, 0, 0);
sp_brain_parm(¤t_sprite, 5);
sp_brain(¤t_sprite, 12);
sp_touch_damage(¤t_sprite, 0);
sp_timing(¤t_sprite, 0);
}
Or you could just set &map to 1 in some other script.