heartbeat
I've been looking through the DinkC Reference and can't find what I'm looking for. Is there no 'heartbeat' function? How can I execute a script once every x number of intervals? I'm trying to figure out the movement capabilities of Dink. Can I only move something in one of the 8 directions? Not circular or complex motions using redink1's included trig functions or anything?
"set_callback_random(char name_of_proc[20], int min, int max);
tells Dink to run this proc inside of the current script every
min + random (max) thousandths of a second."
I think studying Mystery Island's source should be interesting (mainly, the break-all-camera's part).
move and move_stop do the basic moves.
tells Dink to run this proc inside of the current script every
min + random (max) thousandths of a second."
I think studying Mystery Island's source should be interesting (mainly, the break-all-camera's part).
move and move_stop do the basic moves.
i did a lot of this in anarchy halloween party. check out jh/wiz.c for a pretty basic example.
Yes, it's too bad there aren't sine/cosine functions in Dink, and you'll need floats too. But I guess you could do something sp_mx() and sp_my(). I don't know exactly what they do, but I think it sets the x/y component of the speed of the sprite.
I didn't check redink.exe, but if it has sine/cosine and floats you can make circular movements, setting the sp_x and the sp_y. You'll have to change the sp_dir manually, though.
I didn't check redink.exe, but if it has sine/cosine and floats you can make circular movements, setting the sp_x and the sp_y. You'll have to change the sp_dir manually, though.