The Dink Network

Reply to Re: Story== question

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
July 13th 2004, 01:30 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Both ways have their own purposes:

if you place &Shop_Keeper = &current_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", &current_sprite);
}
if (&Shop_Keeper == 1)
{
say("Hello, shelfhitter", &current_sprite);
}
}

And it'll say mister if you just speak to it, and shelfhitter if you've hit the shelf.