The Dink Network

talking to sprites

November 27th 2005, 09:54 AM
slayer.gif
RANKN67
Peasant He/Him
 
can u talk to variable sprites?
November 27th 2005, 10:03 AM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
I'm not sure I understand your question.
You can use
say("`4Blah, blah, blah", &variable_sprite);
where &variable_sprite can be any number(1 to 99) or variable.
November 27th 2005, 10:06 AM
slayer.gif
RANKN67
Peasant He/Him
 
i mean that u can have a sprite pop on the screen and u can walk up to the sprite and press the space bar and have a conversation
November 27th 2005, 10:08 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
Yes, you can create a sprite using create_sprite, then attach a script to that sprite and place a void talk(void) procedure in that script. Then you can walk up to that sprite and talk using the spacebar.
November 27th 2005, 10:11 AM
slayer.gif
RANKN67
Peasant He/Him
 
could i have an example?
November 27th 2005, 10:13 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
int &sprite = create_sprite(something something);
sp_script(&sprite, "barman");

Then in the script barman.c:

void talk(void)
{
// conversation here
}
November 27th 2005, 10:32 AM
slayer.gif
RANKN67
Peasant He/Him
 
tried it, it doesnt work,

another question-

how do i make a variabel hard?
November 27th 2005, 10:46 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
tried it, it doesnt work,

I quoteth Seth: "Making addons is not for everybody. It's for the for the guy who has some time to kill, doesn't mind getting frusterated and is pretty good with computers in general already."

There are all kinds of reasons why it doesn't work; and when it doesn't work the first time, try again, till it works or until you've tried a dozen times; then give up or change the plan

how do i make a variabel hard?

You can't make a variable hard. A variable is either local or global But I guess you mean how to make a sprite hard that has been created with create_sprite. You can do that with:

sp_hard(&name, 0);
draw_hard_sprite(&name);
November 28th 2005, 02:23 AM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
tried it, it doesnt work
in the create_sprite(something, something), I hope you replaced something, something with the function parameters.
November 28th 2005, 02:37 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
"Making addons is not for everybody. It's for the for the guy who has some time to kill, doesn't mind getting frusterated and is pretty good with computers in general already." Oh man, I feel special right now!