Garry's Mod

Garry's Mod

Not enough ratings
Target Finder (E2)
   
Award
Favorite
Favorited
Unfavorite
Content Type: Dupe
Dupe Tags: Machines
File Size
Posted
Updated
8.620 KB
17 Dec, 2022 @ 3:25pm
22 Dec, 2022 @ 10:58am
3 Change Notes ( view )

Subscribe to download
Target Finder (E2)

In 5 collections by Liniux
All Liniux's dupes
184 items
RLE dupes
8 items
Avis Dupes
11 items
Head Cult Dupes
6 items
Favorite dupes
76 items
Description
E2 Extension
It's require "Find" extension. To active it:
Open Spawn menu (default Q) ----> Click Utilities -----> Find and Click E2 Extensions ----> Find and Turn On "Find".

Description
Target Finder is one of the most important things when you build Robot or Wire NPC. Wire target finder has some limitations. Main difference between Wire target finder is that my E2 have color exceptions which will help in making Wire NPC fractions.

Controls for machine
That machine was designed for testing. The most important thing is E2 module in middle of green plate. if you want use it on your creation take wire e2 expression and click right mouse button on it to copy code and place it on your creation. Under the Target Finder there is optional E2 addition which show fixed distance

- Target owner stuff On/Off - I
- Color exception On/Off - O
I recommend using wire debugger to see values

Inputs
Default means when you don't set values
MinDistance
Minimum range to target. If target is nearer than value it won't be targeted. Default 1
MaxDistance
Maximum range to target. If target is further than value it won't be targeted. Default 2000
TargetsCoded
Code of targets represented in number. default 11111111

1 - target those entities
0 - don' target those entities

11101111 - coded targets
01234567 - index

0 - always set higher than 0 for example 1
1 - Target Hoverballs
2 - Target Locators
3 - Target Players
4 - Target Trails
5 - Target NPC
6 - Target vehicles
7 - Target FurnitureDrawer001a (models/props_c17/FurnitureDrawer001a_Chunk02.mdl)

Some examples
11111111 - Targets everything from above list
10000000 - Targets nothing
10100000 - Targets Locators
11100000 - Targets Locators and Hoverballs

ColorsException
Coded color exception. If entity have one of those color it won't be targeted. Alpha color (This thing which can make things invisible) doesn't matter.

Red - name
255 0 0 - in RGB
|R255,G000,B000 - coded for target finder

Blue - name
0 0 255 - in RGB
|R000,G000,B255 coded for target finder

If you want more than one color exception write it in one line without space (if you want make many exceptions I reccomend to use other text program and copy paste.
|R000,G000,B255|R255,G000,B000

Note
Number after letter have to have 3 digits

Example

123 23 2 - in RGB
|R123,G023,B002 - coded

TargetOwner
Allow target Finder to targets owner's stuff

ColorExceptionOn
Not Allow target Finder to target entities which are in color from exceptions

Refresh
Time between code executions in ms. When is to short (when I tested it was below 250) target finder can work uncorrectly. Default 1000

DebugColorMessage
Use it only while building to see color exceptions. Show on chat color exception after every change of values Color Exception. If they are uncorrectly written it will write that they're uncorrectly

Outputs
Active
If target is found it returns 1. Similar to 1 in wire Target Finder

Target
Returns target as entity.

TargetPosition
Returns target position. Not reccomended due to longer executions than wire target finder. That means you will have outdated position.

Solution for that problem
To get current target position use Gate "position" and as input use Target output from E2 Target Finder.

Distance
Returns distance from E2 target finder to target. Same problem as Target position.

Solution for that problem
To get current target Distance copy and use E2 under E2 Target Finder as input use Target output from E2 Target Finder.

ColorsArray
Returns array of color exception in vector. Made for debugging. Probably you won't need this

Required Mods
- Wiremod (Access to E2 (Find extension))

E2 Extensions
To turn on E2 extensions:
Open Spawn menu ----> Click Utilities -----> Find and Click E2 Extensions ----> Find and Turn On "Find"

If you have question or Target Finder wouldn't work correctly write a comment

Have fun and thank you for subscribe
8 Comments
Dexious Emera 18 Dec, 2022 @ 4:19pm 
my bad i'm talking about the vanilla target finder not this one
Liniux  [author] 18 Dec, 2022 @ 4:11pm 
and remember that colors which you set are colors which they don't targets
Liniux  [author] 18 Dec, 2022 @ 4:10pm 
I assume you write correctly targets and exceptions code, and exceptions are on (set to 1)
Liniux  [author] 18 Dec, 2022 @ 4:08pm 
it should be 1
Liniux  [author] 18 Dec, 2022 @ 4:08pm 
Did you turn on Target Owner?
Dexious Emera 18 Dec, 2022 @ 4:03pm 
I tried to by making two seperate "teams" using colored locators but it didnt work out
Liniux  [author] 18 Dec, 2022 @ 1:20pm 
To be honest I've never test color filter
Dexious Emera 18 Dec, 2022 @ 12:40pm 
i've always wondered why the default target finder has a color filter that simply doesn't work