Jumping some water...
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?
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?
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
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

another meathod would be changing dink's basewalk the way weapons do
just load up the new graphics over the downward walking graphics
just load up the new graphics over the downward walking graphics
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);

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);
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 ¤t_sprite
sp_flying(¤t_sprite, 1);
startl:
sp_pframe(¤t_sprite, 1);
wait(100);
sp_pframe(¤t_sprite, 2);
wait(100);
sp_pframe(¤t_sprite, 3);
wait(100);
sp_pframe(¤t_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...
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 ¤t_sprite
sp_flying(¤t_sprite, 1);
startl:
sp_pframe(¤t_sprite, 1);
wait(100);
sp_pframe(¤t_sprite, 2);
wait(100);
sp_pframe(¤t_sprite, 3);
wait(100);
sp_pframe(¤t_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...
Thanks! I'll try it tommorow when I'm not quite so drunk...
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)
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!

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!
