Dink/Guard Hit Sequence
Yup, it's me again.. I'm sorry for all the questioning but I really want to make a good dmod so I need some help.
I want Dink to hit something in a certain cutscene. That means I must make him play the hit sequence once, but the problem is, it won't. Do I have to make dink invicible and make an other dink which has to move somewhere, then disappear, create a dink hitting sequence, let him appear again, do the rest of the cutscene and in the end delete that one and draw dink back? Is that the only way? Or is there another way? Please tell me!
Regards, Sjoerdje
I want Dink to hit something in a certain cutscene. That means I must make him play the hit sequence once, but the problem is, it won't. Do I have to make dink invicible and make an other dink which has to move somewhere, then disappear, create a dink hitting sequence, let him appear again, do the rest of the cutscene and in the end delete that one and draw dink back? Is that the only way? Or is there another way? Please tell me!
Regards, Sjoerdje
haha, hell no! just paste these lines from item-fst.c to wherever in your script you want Dink to hit in.
&basehit = sp_dir(1, -1);
&basehit += 100; //100 is the 'base' for the hit animations, we just add
//the direction
sp_seq(1, &basehit);
sp_frame(1, 1); //reset seq to 1st frame
sp_kill_wait(1); //make sure dink will punch right away
sp_nocontrol(1, 1); //dink can't move until anim is done!
wait(1);
playsound(8, 8000,0,0,0);
&basehit = sp_dir(1, -1);
&basehit += 100; //100 is the 'base' for the hit animations, we just add
//the direction
sp_seq(1, &basehit);
sp_frame(1, 1); //reset seq to 1st frame
sp_kill_wait(1); //make sure dink will punch right away
sp_nocontrol(1, 1); //dink can't move until anim is done!
wait(1);
playsound(8, 8000,0,0,0);
But where is the direction noted? Cause that's not really working you know... how do I make him hit right for instance...
You can do that with just this:
sp_seq(1, 106);
In case you didn't know, 2 is down, 4 is left, 6 is right, 8 is up. Look at the numpad on your keyboard.
sp_seq(1, 106);
In case you didn't know, 2 is down, 4 is left, 6 is right, 8 is up. Look at the numpad on your keyboard.
Yes I did know that and I did use that, but it just doesn't work...
Edit: Ow dang, it seems I was editing the wrong part of the script sorry I was editing something at the &basehit. Thanks Dan!
Ah well while I'm at it:
There is no such file for a knight right? So for a knight I do have to int. different characters to make him hit right?
Edit: Ow dang, it seems I was editing the wrong part of the script sorry I was editing something at the &basehit. Thanks Dan!
Ah well while I'm at it:
There is no such file for a knight right? So for a knight I do have to int. different characters to make him hit right?
Anyone??? *dog eyes*
move(&pim, 4, 450, 1);
move_stop(&sla, 6, 400, 1);
sp_seq(&pim, 724);
sp_pframe(&pim, 1);
sp_nocontrol(&pim, 1);
This is the current script but he just won't hit... scratcher says you can stop him first or something? How? And is that needed?
move(&pim, 4, 450, 1);
move_stop(&sla, 6, 400, 1);
sp_seq(&pim, 724);
sp_pframe(&pim, 1);
sp_nocontrol(&pim, 1);
This is the current script but he just won't hit... scratcher says you can stop him first or something? How? And is that needed?
Strange. Try this:
sp_pframe(&pim, 1);
sp_seq(&pim, 724);
Setting the game after you give it the sequence seems like it might stop it from playing.
sp_pframe(&pim, 1);
sp_seq(&pim, 724);
Setting the game after you give it the sequence seems like it might stop it from playing.
if that doesn't help you can always just kill the sprite, create an exact copy at it's place and make him do
sp_seq(&pim, 724);
sp_pframe(&pim, 1);
I've noticed that when making moving sprites perform sequences they don't always play.
It might be just me though.
sp_seq(&pim, 724);
sp_pframe(&pim, 1);
I've noticed that when making moving sprites perform sequences they don't always play.
It might be just me though.
It's not just you. Sometimes you need to preload a sequence to make the sprite perform it.
Well I did the following. I made pim inactive and did this:
int &pi = create_sprite(450, 315, 0, 291, 1);
sp_pframe(&pi, 1);
sp_seq(&pi, 724);
sp_frame(&pm, 1); / sp_frame(1, 1);
sp_kill_wait(1);
sp_nocontrol(&pm, 1)
wait(1);
playsound(8, 8000,0,0,0);
}
but now, he will hit, but you won't hear it neither will he bend back after he struck his axe in the ground... howcome?
int &pi = create_sprite(450, 315, 0, 291, 1);
sp_pframe(&pi, 1);
sp_seq(&pi, 724);
sp_frame(&pm, 1); / sp_frame(1, 1);
sp_kill_wait(1);
sp_nocontrol(&pm, 1)
wait(1);
playsound(8, 8000,0,0,0);
}
but now, he will hit, but you won't hear it neither will he bend back after he struck his axe in the ground... howcome?