HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

my UnitWithinFigureDetectionSystem

08-12-2007, 07:11 PM#1
Lordy
EDIT: I now finished the system. It's pretty optimized and works fine. Maybe someone can move this to the repository? Inside the demomap is a little documentation on how to implement.

Hey,
I recentely made a system for fun. The user specifies a number of points in a specific order. The game then connects the given points using the order to make a figure. You can make a triangle, a square, or something complicated. The system can now check if a given point is within the figure. So: the user gives the system a point to check, and a number of points that compose a figure, then the system returns either true or false.
I attached some screenshots for clarification.

Zoom (requires log in)
When outside of the figure the peasant is red.
Zoom (requires log in)
Inside of the figure the peasant is green.
Zoom (requires log in)
Green.
Zoom (requires log in)
Red.

Included is a demo map from which I made the screenshots. You can move any of the peasants to make a figure of your own.
Attached Files
File type: w3xNhoekMap.w3x (26.9 KB)
08-19-2007, 12:21 PM#2
Pyrogasm
Well, I'll move it to Triggers/Scripts and see if it becomes more actively looked at there.
08-19-2007, 04:47 PM#3
MaD[Lion]
this is something really nice :D thanks alot
08-19-2007, 05:16 PM#4
PipeDream
Nice, good job.
08-25-2007, 09:34 PM#5
Lordy
Hmm, problem is that is needs to be improved a bit : / it's not optimal. hmm
also there is no documentation : |. I would like to fix these two issues but I'm also working on a map that I really need to finish.
I was very happy to read the replies =)
08-25-2007, 09:39 PM#6
NightBreeze
What an AWESOME system!
08-25-2007, 10:01 PM#7
Rising_Dusk
Hey, this is actually pretty cool. Good job.
08-26-2007, 12:14 AM#8
Tide-Arc Ephemera
There's a weird bug when you invert the shape, that only certain triangles or weird polygons will detect...
08-26-2007, 02:33 PM#9
Lordy
Hmm I don't understand exactly what you mean BUT, some figures are invalid. You may not place the peasants so that any of the lines cross.
NO LINE CROSSING!
09-02-2007, 06:15 PM#10
Lordy
Bump, first post got an update. System now pretty finished. Maybe someone can move it to the repository?
09-02-2007, 09:11 PM#11
Pyrogasm
Just make a new thread in the Resource Submission forum.