This program frustrates me...
July 29th 2004, 03:01 PM

Vedran


How do I refer to a sprite in a script?
sp_nodraw(45, 1);
or what?
sp_nodraw(45, 1);
or what?
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",¤t_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 ¤t_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.
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",¤t_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 ¤t_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

Vedran


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.
I am either overlooking something, or making a stupid mistake. The script doesn't work. And I am not even sure what to ask.
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);
Anyway, if 45 is indeed the editor number of the sprite, then you do this:
int &mysprite = sp(45);
sp_nodraw(&mysprite, 1);