The Dink Network

Reply to Re: The arrow keys

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
October 25th 2013, 12:31 PM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
A much better way to do the whole platform/collision thing than I did it would be to use the button-brain (brain 14) for the platforms, the same brain that is used for the buttons on the main menu.
I've read that this is also usable for dink when he is not a mouse pointer.

This way you could have a variable that said that you only fall when it is 1. Then when you hit a platform the platforms "buttonon()" function is played, which sets the variable to 0, which means the script of dink falling is not run. Then when you jump off or walk off the platforms "buttonoff()" function is called (in the main menu you can see how the button changes when you move off it again). This function would set the falling variable to 1 again allowing dink to fall.

This would keep dink from constantly shaking from the pushdown/pushup functions that are in place in my dmod!

God I'm brilliant, XD

EDIT:

"Hm... I just thought, wouldn't it be almost better if the jumping itself was completely removed, and instead an invisible platform that followed Dink, would raise him up from the ground, and lower him back?."

Hmm I'm not sure I understand what you mean.. :/

EDIT 2:
Here is the section in DinkC reference:

"Info on brain 14 (button brain):

ManaUser: "Brain 14 'can be used in game as well.' I never really took
notice of that before, but I think it may have some real potential in-game.
Brain 14 can call three special procedures: buttonon(), buttonoff(), and
click(). Click() only works when sprite one is a mouse pointer, but the
other two work with Dink as well. buttonon() is a lot like touch(), but
it's called only once each time Dink touches it. It will only be called
again only if he moves away and back again. Buttonoff() is called when
when he breaks contact with it. This could be even more useful since there
is no 'untouch' procedure."
Hmmm. Sounds like using buttonon() instead of touch() could do away
with all that nonsense of toggling sp_touch_damage() between -1 and 0...]"


I hope you understand what I was trying to say after reading that!