Help Explaining on Flowlab Part 2 - Extractors

This may be one of the worst. In the second part to my “Help Explaining on Flowlab” Series, I would like to know how to use Extractors. Just like the first part, I wold like a simple, easy “Flowlab for dummies” level explanation of what they are, how to use them, and examples of them being used. Like the first entry of the series, Raycasting (Link will be bellow), I read the official description and had no idea what @grazer was talking about (@grazer not your fault, I’m just dumb) and have never used it since I started using Flowlab just over a year ago. And as mentioned in the other forum this is just not for me, but for other users who don’t know how to use this feature. Again, I shall call out upon some flowlab veterans who knows what they are doing such as @Superstargames @“JR 01” @todorrobot @PixelPizza @“Johnny boy” and @grazer , though he may be busy.

For the 1st Part of the Series, Raycasting, Go Here:
http://forum.flowlab.io/discussion/8420/help-explaining-on-flowlab-part-1-raycasting#latest

Extractors are kinda self explanatory with a few rules.
What exactly do you want to know about them?

2020.04.01-15.03

Extractors can extract the value of the x/y position, alpha, rotation, x/y velocity, and starting value (I don’t know what that is yet) of either the object with the extractor or a different object. The extract value allows the behavior to extract the value form the target, and the value output is the result.
There is one thing about extractors that you should know: unlike other behaviors like collision and raycast, you must choose a specific object type that you want to extract a value from. And unlike proximity behaviors, you must also specify the object name. So lets say that there are three objects in a game. One is a player and two are enemies. Both enemies may be the same object type (enemy), but they both have different object names (one may be called Jerry, the other Larry). The player object wants to detect a value from one of the enemy objects. If the target is Larry, the extractor should specify Larry. Both enemy objects cannot have their values extracted at the SAME TIME with the SAME EXTRACTOR BEHAVIOR. These rules do not need to be heeded if the extractor target is the object with the behavior.
Extractors can be useful for enemies that follow players even from extremely far away, unlike proximity which have a limit to how far they can see and how they can only track position.

Oh… I think I understand! @Superstargames basically, it extracts or takes away certain properties from other objects! I see! I still have a few questiones but I think I have a basic understanding.

But, When it takes properties, lets say the x, would the objext that just was extracted from no longer have it and the object that extracted have it?

In short,

  • will the enemy lose the value?

-will the extractor equip it?

  • Does it basically steal variables and properties from other objects?

Nope @“The Kodex”,
It doesn’t take or steal any values, it copies the value from that object at that moment.

So if you extract an enemy’s X, it will output where the enemy is on the X axis.
But if the enemy moves and then you extract it, you’ll output the new X value.

If you have to calculate anything based on the objects value, its best to use an Always because the value could change at any frame. This goes for any extracted value, not just X.

Thank you @“JR 01” You have helped me finally figurebout what this does This one in perticular had me stumped, and now that it is clarified, I am so greatful! Part 3 is coming soon!

Also another thing to know about extractors,

  • Extracting other objects in different levels doesnt work.

This is because every new object has a different name, this goes for different levels.
So the player on one level is different from a player on another. Extracting This object will work because it knows the name of This object that has the behavior.
Theres only 1 way around this.

Example using Extractors, look at my custom camera in the player:
http://flowlab.io/game/view/1343478