Why doesnt this work?
This is really bizzare... This code creates the sprite at a displacement of -85, -110 from where it should be. *scratches head*
int &movx;
int &movy;
freeze(1);
&movx = sp_x (1, -1);
&movy = sp_y (1, -1);
int &rrrrrrr = create_sprite(&movx,&movy, 0,98,1);
sp_size(&rrrrrrr, 50);
int &movx;
int &movy;
freeze(1);
&movx = sp_x (1, -1);
&movy = sp_y (1, -1);
int &rrrrrrr = create_sprite(&movx,&movy, 0,98,1);
sp_size(&rrrrrrr, 50);
I doubt this is it (because it shouldn't even work with this mistake) but a create sprite command has 5 arguments, x-pos, y-pos, brain, seq, and frame.
Oh... I guess i accidentally deleted that when I posted it.. it's in the actual code. Ill fix the post though.
I'm guessing your depth dot is off?
February 1st 2004, 06:13 PM

Paul


The only two other things I can think of:
Are &movx and &movy used in any other scripts, sometime local variables can confilct, (even though they clearly shouldn't) and I haven't quite figured out when it's likely to happen.
It's not just that the sprite's depth dot is in the wrong place, is it? In other words you can't just fix it in Dink.ini, right?
Are &movx and &movy used in any other scripts, sometime local variables can confilct, (even though they clearly shouldn't) and I haven't quite figured out when it's likely to happen.
It's not just that the sprite's depth dot is in the wrong place, is it? In other words you can't just fix it in Dink.ini, right?
I'm not sure. How do I go about doing that? Sorry, Iv'e never really added new graphics before...
Sounds like it's probably the detph dot. From (the mostly useless) tut1.txt:
*** EDITTING THE HARDBOX & DEPTH DOT OF A SPRITE *****
Ok, back to the editor. Let's say you don't like the hardbox on the
tree and want to change it. You COULD edit the DINK.INI file with a text
editor, find the SEQUENCE and SPRITE # of that tree and change it's hardbox,
but there is an easier way.
Go into sprite edit mode - click on the tree. Press E. (it will go directly
to that sprites frame, instead of having to manually select it like
normal) Now, press E again.
The screen will go blank except for the tree graphic - this is where you
can set it's depth dot (the exact point that Dink walks behind this
graphic, usually about where the shadow starts) and it's hard box.
Hit TAB a few times, this is how you cycle through the different
things. Use the arrow keys to change it. Hold down SHIFT to move in
larger increments as usual.
Ok, you probably really don't need to change the trees hardbox, it's fine,
but I wanted to show you how to do it, because you would want to do this
with any new sequences you added. (your own graphics)
Oh, if you want to actually save your changes, hit S. You should hear
a dorky boing sound. (a line has just been added to your DINK.INI to
set those attributes)
*********************
That should give you the basic idea. If this is an inimated sprite, it's slightly more complicated.
*** EDITTING THE HARDBOX & DEPTH DOT OF A SPRITE *****
Ok, back to the editor. Let's say you don't like the hardbox on the
tree and want to change it. You COULD edit the DINK.INI file with a text
editor, find the SEQUENCE and SPRITE # of that tree and change it's hardbox,
but there is an easier way.
Go into sprite edit mode - click on the tree. Press E. (it will go directly
to that sprites frame, instead of having to manually select it like
normal) Now, press E again.
The screen will go blank except for the tree graphic - this is where you
can set it's depth dot (the exact point that Dink walks behind this
graphic, usually about where the shadow starts) and it's hard box.
Hit TAB a few times, this is how you cycle through the different
things. Use the arrow keys to change it. Hold down SHIFT to move in
larger increments as usual.
Ok, you probably really don't need to change the trees hardbox, it's fine,
but I wanted to show you how to do it, because you would want to do this
with any new sequences you added. (your own graphics)
Oh, if you want to actually save your changes, hit S. You should hear
a dorky boing sound. (a line has just been added to your DINK.INI to
set those attributes)
*********************
That should give you the basic idea. If this is an inimated sprite, it's slightly more complicated.