[Method][Demo] Target Nearest Enemy

You must understand the Game Editor concepts, before post here.

[Method][Demo] Target Nearest Enemy

Postby Bee-Ant » Wed Apr 02, 2014 12:32 pm

Actually feral already made this kind of demo here:
viewtopic.php?f=4&t=5995
But the problem is, he uses Bubble Sort which may be better suited for advanced coder. But then, what about for newbie who's still very new to coding and stuff?
Here, I made this demo specially for you guys. Also, as complement to feral's demo.

Explanation
===========
Basically, the method goes this way:
- Player keep producing scanner toward the group of enemies
- Enemy who touches the scanner first will set the target coordinates
- When the Player shoots, bullet will be directed to the target coordinates

As simple as that.
For the detailed code, please take a look at the demo attached bellow.
Attachments
TargetNearestEnemy.zip
(10.83 KiB) Downloaded 567 times
TargetNearestEnemy.png
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: [Method][Demo] Target Nearest Enemy

Postby DeltaLeeds » Wed Apr 02, 2014 2:50 pm

Wow, you're back and I also just got what I was looking for (this awesome demo! :D)! This is the best gE day ever! Thanks!!! Definitely going to credit you for this Bee-Ant! :D +1
Currently: Semi-Active.
Working on: Maybe putting my test games in gamejolt, polishing them a bit, but I still don't know when.
User avatar
DeltaLeeds
 
Posts: 693
Joined: Fri May 06, 2011 12:45 pm
Location: In front of my computer.
Score: 38 Give a positive score

Re: [Method][Demo] Target Nearest Enemy

Postby Bee-Ant » Wed Apr 02, 2014 3:35 pm

You're welcome.
Glad to see what I made is usefull for others :D
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: [Method][Demo] Target Nearest Enemy

Postby NightOfHorror » Wed Apr 02, 2014 5:08 pm

See you are still useful, so come and keep making games/demos/happy people. :D
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest