This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-05-06 16:46:26

jdwjrnchewy
Scratcher
Registered: 2010-05-10
Posts: 34

Btd

Does anyone have any advice on making a Bloons TD game? I can't figure out how to make the monkey throw the dart when the bloon is close.  sad  (I'm new to programming this kind of game).

   

     think [how am I going to make this game?]
  
Sincerely,
                                                                                     Jdwjrnchewy

    Postscript:
             If you don't know what btd is then go here: ninjakiwi.com/Games/Tower-Defense/Play/Bloons-Tower-Defense-4.html


What time is it?!

Offline

 

#2 2012-05-06 16:48:54

jdwjrnchewy
Scratcher
Registered: 2010-05-10
Posts: 34

Re: Btd

when gf clicked
forever
say [SPIT MY GRANDMOTHER OUT!!!!]


What time is it?!

Offline

 

#3 2012-05-06 17:09:01

jdwjrnchewy
Scratcher
Registered: 2010-05-10
Posts: 34

Re: Btd

jdwjrnchewy wrote:

when gf clicked
forever
say [SPIT MY GRANDMOTHER OUT!!!!]

Testing 123


What time is it?!

Offline

 

#4 2012-05-06 17:12:00

Firedrake969
Scratcher
Registered: 2011-11-24
Posts: 1000+

Re: Btd

I think i know how to.  You'll need an invisible circle.

Last edited by Firedrake969 (2012-05-06 17:12:12)


Click the sign.
https://s3.amazonaws.com/eterna/eterna2/logo2.png

Offline

 

#5 2012-05-06 18:37:54

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Btd

If it's only distance sensing you're worrying about then it's "simple"

when gf clicked
forever
   delete [all v] of [distances v]
   add (distance1*) to [distances v]
   add (distance2*) to [distances v]
   add (distance3*) to [distances v]
   if (item [1 v] of [distances v]) > <(item [2 v] of [distances v]) and (item [3 v] of       [distances v])>
   point towards [enemy1 v]
   end
   if (item [2 v] of [distances v]) > <(item [1 v] of [distances v]) and (item [3 v] of [distances v])>
   point towards [enemy2 v]
   end
   if (item [3 v] of [distances v]) > <(item [1 v] of [distances v]) and (item [2 v] of [distances v])>
   point towards [enemy3 v]
   end

*//distance is worked out through this:sqrt of (xposof1sprite) + (xposoftheother)*(xposof1sprite) + (xposoftheother)
end


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

Board footer