The Dink Network

Jumping some water...

June 19th 2003, 01:25 PM
custom_fish.png
SabreTrout
Noble He/Him United Kingdom
Tigertigertiger. 
In "Kupo", the main character is meant to jump over a stretch of water. He has a jumping sequence, and he is suposed to move downwards while that sequence is going on.
However, the jump sequence is just that, one sequence (as opposed to having jumps in every direction).
Nomatter what I have tried, the main character reverts to walking across the water, and even if it seems to be working, and he jumps up, when he starts to move he reverts to a stationary pose.
Can somebody who is better at scripting help me out?
June 19th 2003, 02:20 PM
old.gif
I think that's because of the base_walk... Just make a "fake" dink and sp_nodraw the real one.

script:

void ****(void)
{
&save_x = sp_x(1, -1);
&save_y = sp_y(1, -1);
sp_nodraw(1,1);
int &fdink = create_sprite(&save_x, &save_y, brain, sequence, frame );
//If you've got more than 1 frame in the sequence, than give him a base_walk...

sp_base_walk(&fdink, seq);
sp_speed(&fdink, 3);
sp_timing(&fdink, 0);
move_stop(&fdink, blablabalbalba);
&save_x = sp_x(&fdink, -1);
&save_y = sp_y(&fdink, -1);
sp_x(1, &save_x);
sp_y(1, &save_y);
sp_kill(&fdink, 1);
sp_nodraw(1, 0);
}

try that one
June 19th 2003, 03:35 PM
knightg.gif
WC
Peasant He/Him United States
Destroying noobs since 1999. 
Well, I'll be danged. No goto's!
June 19th 2003, 11:26 PM
custom_odd.gif
another meathod would be changing dink's basewalk the way weapons do

just load up the new graphics over the downward walking graphics
June 20th 2003, 02:32 AM
pig.gif

well my shoes are broken
June 20th 2003, 08:37 AM
custom_fish.png
SabreTrout
Noble He/Him United Kingdom
Tigertigertiger. 
Hmm, those are the methods I had been using, but with my poor scripting I probably left some suff out! I'll just give your methods a try...
Oh, and thanks everybody!

********

OK, I tried it with your script theprophet. It's still not working, he seems to get stuck in the first frame, and move just in that frame...the script is as follows...

say_stop("`3It's quite a jump, but I'll give it a go!", 1);

move_stop(1, 8, 70, 1);
move_stop(1, 2, 190, 1);

&save_x = sp_x(1, -1);
&save_y = sp_y(1, -1);
sp_nodraw(1, 1);
int &fdink = create_sprite(&save_x, &save_y, 9, 467, 1);
sp_base_walk(&fdink, 467);
sp_speed(&fdink, 3);
sp_timing(&fdink, 33);
move_stop(&fdink, 2, 320, 1);
&save_x = sp_x(&fdink, -1);
&save_y = sp_y(&fdink, -1);
sp_x(1, &save_x);
sp_y(1, &save_y);
sp_kill(&fdink, 1);
sp_nodraw(1, 0);

wait(1000);
sp_dir(1, 8);
say_stop("`3Phew! That was a close one!", 1);
unfreeze(1);
June 20th 2003, 01:36 PM
old.gif
cut

sp_base_walk
sp_speed
sp_timing

and paste them in a new script ( fakedink.c for example )

and type sp_script(&fdink, "fakedink"); in the jump script.

In fakedink.c paste it here:

void main(void)
{
//PASTE THE SP'S HERE, change &fdink into &current_sprite

sp_flying(&current_sprite, 1);

startl:
sp_pframe(&current_sprite, 1);
wait(100);
sp_pframe(&current_sprite, 2);
wait(100);
sp_pframe(&current_sprite, 3);
wait(100);
sp_pframe(&current_sprite, 4);
//Add more pframes if you got more frames

goto startl;
}

if the fake one reaches the other side he will be killed so the loop will be killed too...
June 20th 2003, 03:54 PM
custom_fish.png
SabreTrout
Noble He/Him United Kingdom
Tigertigertiger. 
Thanks! I'll try it tommorow when I'm not quite so drunk...
June 21st 2003, 12:10 AM
custom_odd.gif
I'm telling you man, just change the basewalk the way weapons do.. It'd be less scripting, real easy, just change dink, move, change him back... (remember flying too, i forgot that)
June 21st 2003, 01:39 AM
custom_fish.png
SabreTrout
Noble He/Him United Kingdom
Tigertigertiger. 
Tham;s guys, I got it working (using theprophets technique).
I don't know why what you were saying wasn't working OkalyDDude, it's what I was originally trying, but it woldn't do it's job right...it's working well now!