The Dink Network

This program frustrates me...

July 29th 2004, 03:01 PM
anon.gif
Vedran
Ghost They/Them
 
How do I refer to a sprite in a script?

sp_nodraw(45, 1);

or what?
July 29th 2004, 03:09 PM
pq_frog.gif
Ric
Peasant They/Them Canada
 
It varies, but the first # is often the sprite #.
eg; sp_dir(1,3); sprite #1 (Dink is always 1) points to direction 3 (lower right as per num.pad).
But with
eg say_stop("hello",&current_sprite);
the sprite number is last. In this case I used a variable to represent the sprite. (could have used 1 or 5 or whatever, but &current_sprite always refers to the sprite this script is attached to.
Download and browse through 'Dinc C reference'. It explains in detail how each command is used.

July 29th 2004, 03:44 PM
anon.gif
Vedran
Ghost They/Them
 
Thanks.

I am either overlooking something, or making a stupid mistake. The script doesn't work. And I am not even sure what to ask.
July 29th 2004, 03:54 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
Is 45 the number that it has in DinkEdit? Anyway, there are a whole bunch of different number types, including editor sprite numbers and game sprite numbers. Editor sprites numbers will range from 1-99 and will be visible in DinkEdit. Game sprite numbers are created 'on the fly', so they will probably be different from editor sprite numbers due to a different order.

Anyway, if 45 is indeed the editor number of the sprite, then you do this:

int &mysprite = sp(45);
sp_nodraw(&mysprite, 1);