Description

This project contains a series of scripts designed to generate an ordered list of all targets with a given parent object. This list can then be scrolled through to select any of the given targets and "lock on" to them. If a target leaves the given range or is destroyed, the scripts will update the list again and target the next nearest, or it will select the next one on the list and find another target to add (this behaviour can be changed).

Live Demo Here! http://bit.ly/targetingsystemlive (Use the mouse wheel to change targets)

Features

  • Multiple scripts that do all the work
  • Easy setup - Simply use the two supplied "base" objects
  • Easy customisation - Set range, list size, draw options, update speed etc...

All scripts are called from a single object and can be easily added to a player or an enemy object later. The PARENT object must be used for all objects that you wish to target and should not be changed.

The included demo project contains two folders of objects in the resource tree. The BASE objects are the ones you should be using in a real game, and the DEMO objects can be removed. Note that the demo objects hold a lot of information in the form of comments so take a moment to read through them before removing them from the file.

Included with this project is a script from GMLScripts, which you can find here: http://www.gmlscripts.com/script/instance_nth_nearest

GMLScrpts licence can be found here: http://www.gmlscripts.com/license.txt

More info

End User Licence Agreement (EULA).

Changes in 1.0.3

Change notes:

  • Fixed potential issue with empty lists returning instead of a valid ID
  • Added new "target_maintain" variable to keep tracking selected targets even when they are out of range
  • Added some extra text to the startup room to explain the in-demo controls

Version 1.0.3. Published February 10, 2018

Created with GameMaker: Studio v1.4.1773

Age Rating: 4+

Privacy Policy

Average Rating

Your review

You can only review assets you've bought.


Gravatar

Matthew B 14 May 2018

Excellent system and helpful developer

Really good system, all code is well commented and easy to read even for someone with little coding knowledge such as myself. when I had questions and contacted the Nocturne via their website I got a very quick and helpful response. Found it very simple to implement and customise for my own game. Well worth the asking price.

Logo

Nocturne Games (Publisher) 17 May 2018

Thanks for the kind words! I should also note that Matthew has helped improve the asset by suggesting that it gets a pause mechanism so the scripts aren't always being called when not needed... such a good idea that I have updated the asset to include this! Thanks again! :)


Gravatar

Robin G 30 August 2017

This review was left for a previous version of this asset.


Gravatar

Anonymous 20 November 2016

Extremely Helpful

The original version of this targeting system wasn't actually what I needed for my game. I intended to modify it for my uses but was experiencing a lot of trouble. I contacted Nocturne and explained the bugs I'd found with the code as well as my goal, and within 10 hours, probably less because I was sleeping, he had fully implemented the feature I was looking to add and it works extremely well. So now I have all their awesome features and the one I needed, which was point and select to target. I definitely recommend you use this, even if you're not going to implement it into your game, the way the code is structured has taught me a lot as I am a novice coder. A+ rating from me.

Just remember, you need to put the code from the Base object's "Create" & "Draw" events in your player object to ensure that it works. Also set the Base as the parent. Those were two issues I was having that they explained well in our correspondence.

Great work.

This review was left for a previous version of this asset.

Package contents

Loading, please wait

What is the issue?

Back to Top