Reply to Re: Story== question
If you don't have an account, just leave the password field blank.
Both ways have their own purposes:
if you place &Shop_Keeper = ¤t_sprite in the main of the shopkeeper-script, you can then use &Shop_Keeper in other scripts on the same screen to refer to the shopkeeper. So if you hit a shelf with stuff that's inside the shop, you can place
say("Aaaargh!! Don't hit that stuff! It's my precioussss",&Shop_Keeper);
in the hit proc of the shelf, and the shopkeeper will say its text.
In the way Astral does it, it's more used as a flag than as a sprite reference. For example, in the hit proc of the shelf:
{
say("Die, shelf!",1);
&Shop_Keeper = 1;
}
Then in the talk proc of the shopkeeper:
{
if (&Shop_Keeper == 0)
{
say("Hello, mister", ¤t_sprite);
}
if (&Shop_Keeper == 1)
{
say("Hello, shelfhitter", ¤t_sprite);
}
}
And it'll say mister if you just speak to it, and shelfhitter if you've hit the shelf.
if you place &Shop_Keeper = ¤t_sprite in the main of the shopkeeper-script, you can then use &Shop_Keeper in other scripts on the same screen to refer to the shopkeeper. So if you hit a shelf with stuff that's inside the shop, you can place
say("Aaaargh!! Don't hit that stuff! It's my precioussss",&Shop_Keeper);
in the hit proc of the shelf, and the shopkeeper will say its text.
In the way Astral does it, it's more used as a flag than as a sprite reference. For example, in the hit proc of the shelf:
{
say("Die, shelf!",1);
&Shop_Keeper = 1;
}
Then in the talk proc of the shopkeeper:
{
if (&Shop_Keeper == 0)
{
say("Hello, mister", ¤t_sprite);
}
if (&Shop_Keeper == 1)
{
say("Hello, shelfhitter", ¤t_sprite);
}
}
And it'll say mister if you just speak to it, and shelfhitter if you've hit the shelf.