The Dink Network

Brain 10 - target?

January 5th 2006, 08:03 PM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
Is there any way a brain 10 (vertical and horizontal walk) creature can come after Dink? Target doesn't work, but I really want a vertical/horizontal walking creature to go after Dink.

EDIT: Well, I noticed it works when you just give a vertical/horizontal animated creature brain 9, but then it, sometimes, just hangs around without an animation, and at others it walks in perfect animation.
January 5th 2006, 08:12 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
I researched this for the DinkC Reference v4.0. It was much fun figuring out which commands affect which brains.

It seems sp_follow should work.
January 5th 2006, 08:14 PM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
sp_follow(&current_sprite, 1); would do the trick?
January 5th 2006, 08:16 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
No.

sp_follow(&current_sprite, 1);

Edit: Hey, no fair, before you just had sp_follow(1);
January 5th 2006, 08:20 PM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
dang. You're a fast clicker. How many fingers you said you got?

Yeah, I modified it right after I saw my own message, and thought "hey, let's correct that".

Then, you already noticed it, so I thought "that's unfair indeed, let's change it back". But Dan "swift as the wind" Walma (that must be your indian name, right?) was too quick, again.

Bottomline: I'll post a nice EDIT next time.
January 5th 2006, 08:23 PM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
Hmm. sp_follow is a fun function indeed. However, I want the creatures to run into Dink as well. So that would mean I must use a brain 9, right?
January 5th 2006, 09:18 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
Yeah, pretty much.
January 5th 2006, 09:41 PM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
dang. DinkC sucks.
January 6th 2006, 06:26 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Or you can compute the distance between the sprite and it's target (with math_sqrt() this should be possible, if it's not broken ) and change the brain to 9 if the distance is smaller than... some arcane value.
January 6th 2006, 03:52 PM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
In case you can't use math_sqrt(), you can calculate the square of that distance and compare it to 100(if you want the distance to be <10)
To calculate the distance, do this:
&distance1 = &dinkx;
&distance1 -= &spritex;
&distance1 *= &distace1;

&distance2 = &dinky;
&distance2 -= &spritey;
&distance2 *= &distace2;

&distance1 += &distance2;