Darwinbots Forum

Code center => Darwinbots Program Source Code => Topic started by: Zelos on November 04, 2005, 06:44:25 AM

Title: Mouse Click
Post by: Zelos on November 04, 2005, 06:44:25 AM
If I want the program to sense the X/why position of a mouse click and also wich button, how do I do that?
Title: Mouse Click
Post by: Zelos on November 04, 2005, 10:01:04 AM
nvm I found it, but how do you make a tiny little menu apphere next to the click then?

nums, where in db is the collision stuff located?
Title: Mouse Click
Post by: Griz on November 04, 2005, 10:49:52 AM
youy might be able to search for VB stuff here:
http://msdn.microsoft.com/ (http://msdn.microsoft.com/)

I'm looking for the same kind of access to VB help ...
so will let you know if I come up with any good sites.
Title: Mouse Click
Post by: Zelos on November 04, 2005, 11:47:32 AM
tried, couldnt find what I wanted in mdsn
Title: Mouse Click
Post by: Numsgil on November 04, 2005, 12:08:28 PM
Collisions between bots?

Should be in the physics module.  If you're going to look at 2.37's collision routines, prepare to be confused, because there's alot going on that can boggle your mind if you're not familiar with physics and math and programming...

2.4's collision routines are more compact and understandable, but weaker.  Bots can overlap for a number of turns in 2.4, whereas they couldn't do that in 2.37.
Title: Mouse Click
Post by: Zelos on November 04, 2005, 01:18:01 PM
ok, and how do I make the menu apphere like in db when you right click?
Title: Mouse Click
Post by: Numsgil on November 04, 2005, 02:01:57 PM
That I'm not entirely sure on.  Check out the Various Form_ functions in Form1.
Title: Mouse Click
Post by: Zelos on November 04, 2005, 02:16:47 PM
ive fixed it :D
woho double woho and tripple woho
ive not only fixed that but now it writes the dna into a text file:D
Title: Mouse Click
Post by: Zelos on November 05, 2005, 09:41:35 AM
nums/PY, exacly how does the program read a command line like:
Code: [Select]
50 .up storeand identify it as a command and not a cond? and how does it also read the conds? ice tried looking in the sourcefiles, but I cant make head and tail of it
Title: Mouse Click
Post by: Numsgil on November 05, 2005, 11:46:56 AM
First it breaks it down into three words:

50

.up

store

Then it sends it to a parsing routine.  The parsing routine checks to see if it's a command, number, etc.

Then it constructs a "block" type with that info.

I'm actually coding this into C++ as I speak.