platform dink trouble
July 28th 2010, 08:25 PM

developer


so im messing around with platform dink, and it seems whenever the player touches a sprite which is hard (hardness 0, or sp_hard 0), he falls through the platform and dies.
i cant figure out why this is, and its annoying the hell out of me, because this way you cant put any pushable objects in platform dink.
iplaydink has made it, but i dont know if he is still around. but if anybody can help me that would be much appreciated.
i cant figure out why this is, and its annoying the hell out of me, because this way you cant put any pushable objects in platform dink.
iplaydink has made it, but i dont know if he is still around. but if anybody can help me that would be much appreciated.
IPlayDink is still around and quite active. Don't worry, I'm sure he'll reply you relatively soon, if no one else does before him.

July 28th 2010, 09:10 PM

developer


ok forget about the hardness problem, now: why cant the player hit anything in platform dink? it seems the hit procedure doesn't work at all in this dmod, how have you done that and how to undo it??
Hello there! I'm sorry I didn't reply sooner; I somehow missed this topic
Dink can't hit anything because he haven't got a fist. You could add the fist to the inventory but there are still no new graphics of the new dink punching so you would have to make them and also disable the directions up and down in item-fst script.
Iplaydink

Dink can't hit anything because he haven't got a fist. You could add the fist to the inventory but there are still no new graphics of the new dink punching so you would have to make them and also disable the directions up and down in item-fst script.
Iplaydink
July 29th 2010, 05:50 PM

developer


even with the fists equiped and with the original dink graphics, dink cant hit anything. i isolated the problem, it is because of the gravity.c script. without it, i can punch everything but when gravity.c is running and i hit ctrl, the fist sound plays but there is no punching animation and the hit procedure does not trigger.
i tried to find the cause of this in gravity.c but i cant find it.
so please tell me what you have done to disable this and how i can fix it.
i tried to find the cause of this in gravity.c but i cant find it.
so please tell me what you have done to disable this and how i can fix it.
What's even the point of making Dink punch in Dink Platformer? It's meant to be Mario type game as far as I know.
Ok, here we go.
Open start-1.c and find the lines:
change them to:
But don't change anything else.
Now open your gravity.c and remove everything inside. Instead add this to the script script:
Now we have to make a new script for the fists so add a script with the name item-fst.c. Enter the following code in this script,:
Now you are ready to hit with your platform dink, but you still might want to replace the graphics, if you do make a dmod with this and can't make graphics yourself I might do it for you, just send me an email.
Open start-1.c and find the lines:
//add_item("item-fst",438, 1); //&cur_weapon = 1; //arm_weapon();
change them to:
add_item("item-fst",438, 1); &cur_weapon = 1; arm_weapon();
But don't change anything else.
Now open your gravity.c and remove everything inside. Instead add this to the script script:
void main(void) { sp_dir(1, 6); &jump = 0; sp_nodraw(¤t_sprite, 1); int &crap; gravity: &crap = sp_y(1, -1); &crap += 8; sp_y(1, &crap); &crap = sp_y(1, -1); If(&crap > 390) { say("Ahhhh", 1); dink_can_walk_off_screen(1); &life = 0; } wait(10); goto gravity; }
Now we have to make a new script for the fists so add a script with the name item-fst.c. Enter the following code in this script,:
//item fists void use( void ) { //disallow diagonal punches &basehit = sp_dir(1, -1); if (&basehit == 1) &basehit = 4; if (&basehit == 2) &basehit = 6; if (&basehit == 3) &basehit = 6; if (&basehit == 7) &basehit = 4; if (&basehit == 8) &basehit = 4; if (&basehit == 9) &basehit = 6; sp_dir(1, &basehit); &basehit += 100; //100 is the 'base' for the hit animations, we just add say &basehit //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 -= 100; } void disarm(void) { debug("Killed fists"); kill_this_task(); } void arm(void) { sp_attack_hit_sound(1, 0); 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(); }
Now you are ready to hit with your platform dink, but you still might want to replace the graphics, if you do make a dmod with this and can't make graphics yourself I might do it for you, just send me an email.
July 30th 2010, 08:29 AM

developer


a million thanks, iplaydink, you're great.
there's one slight problem though. dink is attacking with a sword instead of with his fists. i will make new graphics so it may not matter much but does this mean that the range of the attack is also larger? because i need the range to be as short as possible.
let me rephrase that: how do i make the range of dinks attack as short as possible?
there's one slight problem though. dink is attacking with a sword instead of with his fists. i will make new graphics so it may not matter much but does this mean that the range of the attack is also larger? because i need the range to be as short as possible.
let me rephrase that: how do i make the range of dinks attack as short as possible?
July 30th 2010, 08:31 AM

developer


oh and another, more serious problem with the new gravity script is that vertical movement isnt disabled anymore, so dink can walk upwards and downwards again. does this mean that gravity and attacking cant co-exist?