Making a new Idle for dink?
I made a bunch of new idle frames for dink, but, setting a "sp_base_idle(1, #);" doesn't let the sequence reverse like the original dink idle. Is there a like I should add that makes the sequence reverse?
You need to add in
preload_seq(#);
for each idle sequence before setting sp_base_idle().
preload_seq(#);
for each idle sequence before setting sp_base_idle().
Should I add it into Dink.ini or Start1.c?
Here's the .C lines I have
The idle sequence works fine, but it doesnt reverse like the original Dink, so it jumps back to the first frame at the end of the sequence.
Thanks.
Here's the .C lines I have
//Change dink from a mouse pointer into a human being. preload_seq(850); preload_seq(852); preload_seq(854); preload_seq(856); sp_base_idle(1, 848);
The idle sequence works fine, but it doesnt reverse like the original Dink, so it jumps back to the first frame at the end of the sequence.
Thanks.
You have to modify Dink.ini to set the animation sequence reverse. I'm not exactly sure about the details, but right near the beginning of the file it reads:
//special moves to make the idle play backwards
set_frame_frame 12 5 12 3
set_frame_frame 12 6 12 2
set_frame_delay 12 5 250
set_frame_delay 12 6 250
etc...
Somebody more knowledgeable might actually know what all those numbers stand for
//special moves to make the idle play backwards
set_frame_frame 12 5 12 3
set_frame_frame 12 6 12 2
set_frame_delay 12 5 250
set_frame_delay 12 6 250
etc...
Somebody more knowledgeable might actually know what all those numbers stand for
I actually really thank you Synbi, editing those from 12 (the Dink sequence) to 850 (the new character sequence) and all the ones after that solved my problem!
Thanks@
Thanks@
set_frame_frame 12 5 12 3
set_frame_frame 12 6 12 2
set_frame_delay 12 5 250
set_frame_delay 12 6 250
etc...
Somebody more knowledgeable might actually know what all those numbers stand for
12 is the sequence number; 5 and 6 are the frame numbers. set_frame_frame will use a copy of an existing frame as the value for the target frame; the first two lines tell it to use sequence 12 frame 3 and 2 for sequence 12 frame 5 and 6 respectively. The second two lines declare a delay of 250 ms before moving the animation to the next frame.
Those instructions must be given before the sequence is loaded, because the engine reserves slots for the frames, and it cannot grow that storage (so the backward frames wouldn't fit if they were loaded first).
set_frame_frame 12 6 12 2
set_frame_delay 12 5 250
set_frame_delay 12 6 250
etc...
Somebody more knowledgeable might actually know what all those numbers stand for
12 is the sequence number; 5 and 6 are the frame numbers. set_frame_frame will use a copy of an existing frame as the value for the target frame; the first two lines tell it to use sequence 12 frame 3 and 2 for sequence 12 frame 5 and 6 respectively. The second two lines declare a delay of 250 ms before moving the animation to the next frame.
Those instructions must be given before the sequence is loaded, because the engine reserves slots for the frames, and it cannot grow that storage (so the backward frames wouldn't fit if they were loaded first).
Thanks for more info, Shevek.
I've ran into another problem.
When PROTAG (that's the name for my new character) punches, the animation happens, but he doesn't actually punch. Pillbugs are killin me!
Here's the script.
Got any ideas? Thanks.
I've ran into another problem.
When PROTAG (that's the name for my new character) punches, the animation happens, but he doesn't actually punch. Pillbugs are killin me!
Here's the script.
//item fists void use( void ) { //disallow diagonal punches if (sp_dir(1, -1) == 1) sp_dir(1, 2); if (sp_dir(1, -1) == 3) sp_dir(1, 2); if (sp_dir(1, -1) == 7) sp_dir(1, 8); if (sp_dir(1, -1) == 9) sp_dir(1, 8); &basehit = sp_dir(1, -1); &basehit += 867; //867 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); } void disarm(void) { debug("Killed fists"); kill_this_task(); } void arm(void) { sp_attack_hit_sound(1, 0); init("load_sequence_now graphics\protag\walk\p-w1- 858 43 26 70 -10 -9 11 5"); init("load_sequence_now graphics\protag\walk\p-w2- 859 43 26 70 -10 -9 11 5"); init("load_sequence_now graphics\protag\walk\p-w3- 860 43 26 70 -10 -9 11 5"); init("load_sequence_now graphics\protag\walk\p-w4- 861 43 26 70 -10 -9 11 5"); init("load_sequence_now graphics\protag\walk\p-w6- 863 43 26 70 -10 -9 11 5"); init("load_sequence_now graphics\protag\walk\p-w7- 864 43 26 70 -10 -9 11 5"); init("load_sequence_now graphics\protag\walk\p-w8- 865 43 26 70 -10 -9 11 5"); init("load_sequence_now graphics\protag\walk\p-w9- 866 43 26 70 -10 -9 11 5"); init("load_sequence_now graphics\protag\idle\p-i2- 850 250 26 70 -10 -9 11 5"); init("load_sequence_now graphics\protag\idle\p-i4- 852 250 23 68 -9 -9 7 6"); init("load_sequence_now graphics\protag\idle\p-i6- 854 250 31 68 -8 -10 8 5"); init("load_sequence_now graphics\protag\idle\p-i8- 856 250 26 62 -8 -8 9 7"); init("load_sequence_now graphics\protag\hit\p-h2- 869 75 26 70 -10 -9 11 5"); init("load_sequence_now graphics\protag\hit\p-h4- 871 75 37 67 -10 -7 7 5"); init("load_sequence_now graphics\protag\hit\p-h6- 873 75 10 67 -8 -9 12 8 "); init("load_sequence_now graphics\protag\hit\p-h8- 875 75 26 70 -10 -9 11 5"); debug("fists armed"); int &basehit; } void pickup(void) { Debug("Player now owns this item."); kill_this_task(); } void drop(void) { Debug("Item dropped."); kill_this_task(); }
Got any ideas? Thanks.
Have you used set_frame_special on the frame you want to punch?
Yeoldetoast is right, take another look at Dink.ini.
There's this section a little further down from the start that should do the trick. Copy and modify to suit PROTAG's frames and those punches should finally start dealing some damage.
There's this section a little further down from the start that should do the trick. Copy and modify to suit PROTAG's frames and those punches should finally start dealing some damage.
//set which frame can 'hit' set_frame_special 102 3 1 set_frame_special 104 3 1 set_frame_special 106 3 1 set_frame_special 108 3 1 //make it delay on the third sprite for longer than 75 set_frame_delay 102 2 100 set_frame_delay 104 2 100 set_frame_delay 106 2 100 set_frame_delay 108 2 100
You guys are super helpful, thanks.
Almost done with this new character, just gotta figure out why he's still turning into Dink when he dies, regardless of whether I set sp_base_death to his sequence or not.
Almost done with this new character, just gotta figure out why he's still turning into Dink when he dies, regardless of whether I set sp_base_death to his sequence or not.
Instead of setting base_walk(), base_attack(), base_idle(), and base_death() you could set the path of your new graphics to be in the same slot as dink's graphics. It'd be like how different swords are loaded.
That's what I'd do.
That's what I'd do.
That would be because Dink's death is handled via the script dinfo.c. You just need to copy that script over and edit the sequence
to the new one.
sp_seq(1, 436);
to the new one.
That would be because Dink's death is handled via the script dinfo.c. You just need to copy that script over and edit the sequence
I was wondering about this too, thanks. Another question: I need to disable pushing altogether for Dink, but push_active(0); doesn't seem to persist after loading the game. Or then again I'm not doing it right. At the very least changing Dink's push sequence number would be fine, but I can't seem to find where that's determined.
sp_seq(1, 436);to the new one.
I was wondering about this too, thanks. Another question: I need to disable pushing altogether for Dink, but push_active(0); doesn't seem to persist after loading the game. Or then again I'm not doing it right. At the very least changing Dink's push sequence number would be fine, but I can't seem to find where that's determined.
Perhaps you set push_active(0) in start1.c in which case pushing will only be disabled after starting a new game.
If you set push_active(0) in main.c it should disallow pushing regardless.
If you set push_active(0) in main.c it should disallow pushing regardless.
Hahah, I knew it. Not only didn't I look into main.c or start1.c, but instead I set push_active(0); only at the intro script. No wonder things weren't working as they should have
Yep, main.c runs every time a save game is loaded. That's also the place to do any other load game checks, rather than in the savebot scripts, like many dmods of old did.
Yep, main.c runs every time a save game is loaded. That's also the place to do any other load game checks, rather than in the savebot scripts, like many dmods of old did.
<Hurries off to delete his heavily modified savebot script...>
<Hurries off to delete his heavily modified savebot script...>