Problem with Entity: EntityScreenPos and Flash

#1
As shown below, I display Entity on the screen.
https://www.youtube.com/watch?v=Ud2aPbJATbU

Everything works fine, but in the opposite direction there is a problem.


Problem testing in the video below (The right side has a problem Entity: EntityScreenPos )



flow graph

Image


Flash Action Script

Code: Select all

function setObjectives(_PosX:Number,_PosY:Number,_ObjectivesText:String) { PosXFix =_PosX; PosYFix =_PosY; ObjectivesTextfix = _ObjectivesText + "M"; Objectives._x = PosXFix; Objectives._y = PosYFix; Objectives.ObjectivesText.text = (ObjectivesTextfix) }

Or have you got a better way?

Re: Problem with Entity: EntityScreenPos and Flash

#3
If it starts drawing at the last pixel on the right it will not show up since there is no more space to the right from that pixel.
Ideally you want to clamp it and do something like this:
Image

For demonstration purposes I have set up the following:
Image

Not recommended but simple, its ok for a small icon:
Image
Hi.
Very good. - Thank you.

The problem has been resolved. But there's another major problem.

The problem is, for example, the player wants to track the object from a distance of 500 meters and in the opposite direction.

This method is only in the direction the object is in front of the player. The traceability is accurate.

How to trace the object behind the player (the opposite direction)؟


Thanks for the Cry-Chris

Re: Problem with Entity: EntityScreenPos and Flash

#4
I have done it this way:
Image


Here the whole flow graph:
Image

CTRL + v it directly into Flow Graph.

Code: Select all

<Graph Description="" Group="asd">
<Nodes>
<Node Id="3" Class="Entity:EntityScreenPos" pos="1836,-108,0" EntityGUID="e29a431c-0449-0274-0494-95880e6a012c">
<Inputs entityId="0"/>
</Node>
<Node Id="7" Class="Debug:DisplayMessage" pos="3366,126,0">
<Inputs entityId="0" message="O" DisplayTime="0" posX="50" posY="50" fontSize="5" clr_Color="1,1,1" centered="0"/>
</Node>
<Node Id="16" Class="Math:SetNumber" pos="1836,180,0">
<Inputs in="64"/>
</Node>
<Node Id="17" Class="Math:SetNumber" pos="1836,396,0">
<Inputs in="64"/>
</Node>
<Node Id="18" Name="Picture_Width" Class="_comment" pos="1836,162,0"/>
<Node Id="19" Name="Picture_Height" Class="_comment" pos="1836,378,0"/>
<Node Id="21" Class="Game:Start" pos="1584,216,0">
<Inputs InGame="1" InEditor="1"/>
</Node>
<Node Id="36" Class="Math:SetNumber" pos="1836,306,0">
<Inputs in="1080"/>
</Node>
<Node Id="37" Class="Math:SetNumber" pos="1836,72,0">
<Inputs in="1920"/>
</Node>
<Node Id="45" Name="Resolution_Width" Class="_comment" pos="1836,54,0"/>
<Node Id="46" Name="Resolution_Height" Class="_comment" pos="1836,288,0"/>
<Node Id="47" Class="Math:Clamp" pos="3078,234,0">
<Inputs in="0" min="0" max="0"/>
</Node>
<Node Id="66" Class="Math:Sub" pos="2070,396,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="67" Class="Math:Div" pos="2070,288,0">
<Inputs A="1" B="0"/>
</Node>
<Node Id="68" Class="Math:Add" pos="2430,288,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="75" Class="Math:Mul" pos="2682,288,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="77" Class="Math:Sub" pos="2898,270,0">
<Inputs A="1" B="0"/>
</Node>
<Node Id="78" Class="Math:Clamp" pos="3078,0,0">
<Inputs in="0" min="0" max="0"/>
</Node>
<Node Id="79" Class="Math:Sub" pos="2070,162,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="80" Class="Math:Div" pos="2070,54,0">
<Inputs A="1" B="0"/>
</Node>
<Node Id="81" Class="Math:Add" pos="2430,54,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="82" Class="Math:Mul" pos="2682,54,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="83" Class="Math:Sub" pos="2898,36,0">
<Inputs A="1" B="0"/>
</Node>
<Node Id="95" Class="Entity:GetPos" pos="1062,630,0">
<Inputs entityId="0" CoordSys="1"/>
</Node>
<Node Id="96" Class="Entity:GetPos" pos="1080,882,0">
<Inputs entityId="0" CoordSys="1"/>
</Node>
<Node Id="100" Class="Time:Timer" pos="810,648,0">
<Inputs period="0.1" min="0" max="0" paused="0"/>
</Node>
<Node Id="102" Class="Actor:LocalPlayer" pos="1062,594,0">
<Inputs />
</Node>
<Node Id="104" Class="Entity:EntityId" pos="1080,828,0" EntityGUID="e29a431c-0449-0274-0494-95880e6a012c">
<Inputs entityId="0"/>
</Node>
<Node Id="110" Class="Vec3:SubVec3" pos="1422,774,0">
<Inputs A="0,0,0" B="0,0,0"/>
</Node>
<Node Id="112" Class="Math:DirToAngles" pos="1728,774,0">
<Inputs dir="0,0,0" roll="180"/>
</Node>
<Node Id="144" Class="Math:Add" pos="2466,738,0">
<Inputs A="0" B="5"/>
</Node>
<Node Id="151" Class="Math:InRange" pos="2718,630,0">
<Inputs In="0" Min="0" Max="0"/>
</Node>
<Node Id="152" Class="Vec3:FromVec3" pos="2070,774,0">
<Inputs vec3="0,0,0"/>
</Node>
<Node Id="153" Class="Math:Add" pos="2466,684,0">
<Inputs A="0" B="-5"/>
</Node>
<Node Id="183" Class="Logic:Any" pos="1728,630,0" InHideMask="1023" OutHideMask="1">
<Inputs />
</Node>
<Node Id="184" Class="Logic:Any" pos="2070,630,0" InHideMask="1023">
<Inputs />
</Node>
<Node Id="186" Class="Vec3:FromVec3" pos="1422,594,0">
<Inputs vec3="0,0,0"/>
</Node>
<Node Id="191" Class="Math:SetNumber" pos="648,288,0">
<Inputs in="90"/>
</Node>
<Node Id="193" Class="Math:Mul" pos="828,288,0">
<Inputs A="0" B="-1"/>
</Node>
<Node Id="195" Class="Logic:Any" pos="828,342,0" InHideMask="1022">
<Inputs />
</Node>
<Node Id="197" Class="Game:Start" pos="450,288,0">
<Inputs InGame="1" InEditor="1"/>
</Node>
<Node Id="198" Name="Angle_Range_(goes_in_both_directions)" Class="_comment" pos="648,270,0"/>
<Node Id="202" Name="Settings" Class="_commentbox" pos="414,151.86313,0">
<Inputs TextSize="1" Color="1,1,1" DisplayFilled="1" DisplayBox="1" SortPriority="16"/>
<ResizeBorder X="0" Y="0" Width="630" Height="270"/>
<NodeSize Width="630" Height="343.77744"/>
</Node>
<Node Id="203" Name="Object" Class="_comment" pos="1080,810,0"/>
<Node Id="207" Name="dynamic_object" Class="_comment" pos="648,414,0"/>
<Node Id="211" Class="Math:BooleanTo" pos="648,432,0">
<Inputs />
</Node>
<Node Id="213" Class="Math:BooleanFrom" pos="432,900,0">
<Inputs Value="0"/>
</Node>
<Node Id="217" Class="Logic:Any" pos="936,900,0">
<Inputs />
</Node>
<Node Id="219" Class="Time:Timer" pos="756,1062,0">
<Inputs period="0" min="0" max="0" paused="1"/>
</Node>
<Node Id="221" Class="Math:BooleanTo" pos="594,1116,0">
<Inputs />
</Node>
<Node Id="222" Name="Calculate_object_direction" Class="_commentbox" pos="414,502.22275,0">
<Inputs TextSize="1" Color="1,1,1" DisplayFilled="1" DisplayBox="1" SortPriority="16"/>
<ResizeBorder X="0" Y="0" Width="2844" Height="612"/>
<NodeSize Width="2844" Height="685.77747"/>
</Node>
<Node Id="223" Name="This is a comment" Class="_comment" pos="504,612,0"/>
<Node Id="224" Name="Display_icon" Class="_commentbox" pos="1566,-197.59717,0">
<Inputs TextSize="1" Color="1,1,1" DisplayFilled="1" DisplayBox="1" SortPriority="16"/>
<ResizeBorder X="0" Y="0" Width="2034" Height="594"/>
<NodeSize Width="2034" Height="667.77747"/>
</Node>
<Node Id="225" Name="if_we_are_looking_at_it_within_the_angles_then_display_the_object" Class="_comment" pos="2718,612,0"/>
<Node Id="227" Name="Display_object_on_screen_based_on_view_angle" Class="_commentbox" pos="396,-315.20847,0">
<Inputs TextSize="1" Color="0.814847,1,1" DisplayFilled="1" DisplayBox="1" SortPriority="16"/>
<ResizeBorder X="0" Y="0" Width="3240" Height="1476"/>
<NodeSize Width="3240" Height="1549.7775"/>
</Node>
<Node Id="229" Class="Logic:Any" pos="2466,630,0" InHideMask="1023" OutHideMask="1">
<Inputs />
</Node>
</Nodes>
<Edges>
<Edge nodeIn="47" nodeOut="3" portIn="in" portOut="Py" enabled="1"/>
<Edge nodeIn="78" nodeOut="3" portIn="in" portOut="Px" enabled="1"/>
<Edge nodeIn="79" nodeOut="16" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="82" nodeOut="16" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="66" nodeOut="17" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="75" nodeOut="17" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="3" nodeOut="21" portIn="Enable" portOut="output" enabled="1"/>
<Edge nodeIn="16" nodeOut="21" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="17" nodeOut="21" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="36" nodeOut="21" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="37" nodeOut="21" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="66" nodeOut="36" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="67" nodeOut="36" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="79" nodeOut="37" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="80" nodeOut="37" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="7" nodeOut="47" portIn="posY" portOut="out" enabled="1"/>
<Edge nodeIn="68" nodeOut="67" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="75" nodeOut="68" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="77" nodeOut="75" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="47" nodeOut="77" portIn="max" portOut="out" enabled="1"/>
<Edge nodeIn="7" nodeOut="78" portIn="posX" portOut="out" enabled="1"/>
<Edge nodeIn="81" nodeOut="80" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="82" nodeOut="81" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="83" nodeOut="82" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="78" nodeOut="83" portIn="max" portOut="out" enabled="1"/>
<Edge nodeIn="110" nodeOut="95" portIn="B" portOut="Pos" enabled="1"/>
<Edge nodeIn="186" nodeOut="95" portIn="vec3" portOut="Rotate" enabled="1"/>
<Edge nodeIn="110" nodeOut="96" portIn="A" portOut="Pos" enabled="1"/>
<Edge nodeIn="95" nodeOut="100" portIn="Get" portOut="out" enabled="1"/>
<Edge nodeIn="95" nodeOut="102" portIn="entityId" portOut="entityId" enabled="1"/>
<Edge nodeIn="96" nodeOut="104" portIn="entityId" portOut="Id" enabled="1"/>
<Edge nodeIn="112" nodeOut="110" portIn="dir" portOut="out" enabled="1"/>
<Edge nodeIn="152" nodeOut="112" portIn="vec3" portOut="angles" enabled="1"/>
<Edge nodeIn="151" nodeOut="144" portIn="Max" portOut="out" enabled="1"/>
<Edge nodeIn="7" nodeOut="151" portIn="Hide" portOut="false" enabled="1"/>
<Edge nodeIn="7" nodeOut="151" portIn="Show" portOut="true" enabled="1"/>
<Edge nodeIn="144" nodeOut="152" portIn="A" portOut="z" enabled="1"/>
<Edge nodeIn="153" nodeOut="152" portIn="A" portOut="z" enabled="1"/>
<Edge nodeIn="151" nodeOut="153" portIn="Min" portOut="out" enabled="1"/>
<Edge nodeIn="184" nodeOut="183" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="229" nodeOut="184" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="183" nodeOut="186" portIn="in1" portOut="z" enabled="1"/>
<Edge nodeIn="193" nodeOut="191" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="195" nodeOut="191" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="153" nodeOut="193" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="144" nodeOut="195" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="191" nodeOut="197" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="211" nodeOut="197" portIn="true" portOut="output" enabled="1"/>
<Edge nodeIn="213" nodeOut="211" portIn="Value" portOut="out" enabled="1"/>
<Edge nodeIn="217" nodeOut="213" portIn="in1" portOut="False" enabled="1"/>
<Edge nodeIn="221" nodeOut="213" portIn="true" portOut="False" enabled="1"/>
<Edge nodeIn="221" nodeOut="213" portIn="false" portOut="True" enabled="1"/>
<Edge nodeIn="96" nodeOut="217" portIn="Get" portOut="out" enabled="1"/>
<Edge nodeIn="217" nodeOut="219" portIn="in2" portOut="out" enabled="1"/>
<Edge nodeIn="219" nodeOut="221" portIn="paused" portOut="out" enabled="1"/>
<Edge nodeIn="151" nodeOut="229" portIn="In" portOut="out" enabled="1"/>
</Edges>
</Graph>



If you wish to include the max distance as well then this:
Image

Code: Select all

<Graph Description="" Group="asd">
<Nodes>
<Node Id="3" Class="Entity:EntityScreenPos" pos="1836,-108,0" EntityGUID="e29a431c-0449-0274-0494-95880e6a012c">
<Inputs entityId="0"/>
</Node>
<Node Id="7" Class="Debug:DisplayMessage" pos="4284,144,0">
<Inputs entityId="0" message="O" DisplayTime="0" posX="50" posY="50" fontSize="5" clr_Color="1,1,1" centered="0"/>
</Node>
<Node Id="16" Class="Math:SetNumber" pos="1836,180,0">
<Inputs in="64"/>
</Node>
<Node Id="17" Class="Math:SetNumber" pos="1836,396,0">
<Inputs in="64"/>
</Node>
<Node Id="18" Name="Picture_Width" Class="_comment" pos="1836,162,0"/>
<Node Id="19" Name="Picture_Height" Class="_comment" pos="1836,378,0"/>
<Node Id="21" Class="Game:Start" pos="1584,216,0">
<Inputs InGame="1" InEditor="1"/>
</Node>
<Node Id="36" Class="Math:SetNumber" pos="1836,306,0">
<Inputs in="1080"/>
</Node>
<Node Id="37" Class="Math:SetNumber" pos="1836,72,0">
<Inputs in="1920"/>
</Node>
<Node Id="45" Name="Resolution_Width" Class="_comment" pos="1836,54,0"/>
<Node Id="46" Name="Resolution_Height" Class="_comment" pos="1836,288,0"/>
<Node Id="47" Class="Math:Clamp" pos="3078,234,0">
<Inputs in="0" min="0" max="0"/>
</Node>
<Node Id="66" Class="Math:Sub" pos="2070,396,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="67" Class="Math:Div" pos="2070,288,0">
<Inputs A="1" B="0"/>
</Node>
<Node Id="68" Class="Math:Add" pos="2430,288,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="75" Class="Math:Mul" pos="2682,288,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="77" Class="Math:Sub" pos="2898,270,0">
<Inputs A="1" B="0"/>
</Node>
<Node Id="78" Class="Math:Clamp" pos="3078,0,0">
<Inputs in="0" min="0" max="0"/>
</Node>
<Node Id="79" Class="Math:Sub" pos="2070,162,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="80" Class="Math:Div" pos="2070,54,0">
<Inputs A="1" B="0"/>
</Node>
<Node Id="81" Class="Math:Add" pos="2430,54,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="82" Class="Math:Mul" pos="2682,54,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="83" Class="Math:Sub" pos="2898,36,0">
<Inputs A="1" B="0"/>
</Node>
<Node Id="95" Class="Entity:GetPos" pos="1062,630,0">
<Inputs entityId="0" CoordSys="1"/>
</Node>
<Node Id="96" Class="Entity:GetPos" pos="1080,882,0">
<Inputs entityId="0" CoordSys="1"/>
</Node>
<Node Id="100" Class="Time:Timer" pos="810,648,0">
<Inputs period="0.1" min="0" max="0" paused="0"/>
</Node>
<Node Id="102" Class="Actor:LocalPlayer" pos="1062,594,0">
<Inputs />
</Node>
<Node Id="104" Class="Entity:EntityId" pos="1080,828,0" EntityGUID="e29a431c-0449-0274-0494-95880e6a012c">
<Inputs entityId="0"/>
</Node>
<Node Id="110" Class="Vec3:SubVec3" pos="1422,774,0">
<Inputs A="0,0,0" B="0,0,0"/>
</Node>
<Node Id="112" Class="Math:DirToAngles" pos="1728,774,0">
<Inputs dir="0,0,0" roll="180"/>
</Node>
<Node Id="144" Class="Math:Add" pos="2466,738,0">
<Inputs A="0" B="5"/>
</Node>
<Node Id="151" Class="Math:InRange" pos="2718,630,0">
<Inputs In="0" Min="0" Max="0"/>
</Node>
<Node Id="152" Class="Vec3:FromVec3" pos="2070,774,0">
<Inputs vec3="0,0,0"/>
</Node>
<Node Id="153" Class="Math:Add" pos="2466,684,0">
<Inputs A="0" B="-5"/>
</Node>
<Node Id="183" Class="Logic:Any" pos="1728,630,0" InHideMask="1023" OutHideMask="1">
<Inputs />
</Node>
<Node Id="184" Class="Logic:Any" pos="2070,630,0" InHideMask="1023">
<Inputs />
</Node>
<Node Id="186" Class="Vec3:FromVec3" pos="1422,594,0">
<Inputs vec3="0,0,0"/>
</Node>
<Node Id="191" Class="Math:SetNumber" pos="648,144,0">
<Inputs in="90"/>
</Node>
<Node Id="193" Class="Math:Mul" pos="828,144,0">
<Inputs A="0" B="-1"/>
</Node>
<Node Id="195" Class="Logic:Any" pos="828,198,0" InHideMask="1022">
<Inputs />
</Node>
<Node Id="197" Class="Game:Start" pos="450,144,0">
<Inputs InGame="1" InEditor="1"/>
</Node>
<Node Id="198" Name="Angle_Range_(goes_in_both_directions)" Class="_comment" pos="648,126,0"/>
<Node Id="202" Name="Settings" Class="_commentbox" pos="414,-10.463963,0">
<Inputs TextSize="1" Color="1,1,1" DisplayFilled="1" DisplayBox="1" SortPriority="16"/>
<ResizeBorder X="0" Y="0" Width="630" Height="396"/>
<NodeSize Width="630" Height="497.5835"/>
</Node>
<Node Id="203" Name="Object" Class="_comment" pos="1080,810,0"/>
<Node Id="207" Name="dynamic_object" Class="_comment" pos="648,234,0"/>
<Node Id="211" Class="Math:BooleanTo" pos="648,252,0">
<Inputs />
</Node>
<Node Id="213" Class="Math:BooleanFrom" pos="432,900,0">
<Inputs Value="0"/>
</Node>
<Node Id="217" Class="Logic:Any" pos="936,900,0">
<Inputs />
</Node>
<Node Id="219" Class="Time:Timer" pos="756,1062,0">
<Inputs period="0" min="0" max="0" paused="1"/>
</Node>
<Node Id="221" Class="Math:BooleanTo" pos="594,1116,0">
<Inputs />
</Node>
<Node Id="222" Name="Calculate_object_direction" Class="_commentbox" pos="414,474.4166,0">
<Inputs TextSize="1" Color="1,1,1" DisplayFilled="1" DisplayBox="1" SortPriority="16"/>
<ResizeBorder X="0" Y="0" Width="2844" Height="612"/>
<NodeSize Width="2844" Height="713.5835"/>
</Node>
<Node Id="223" Name="This is a comment" Class="_comment" pos="504,612,0"/>
<Node Id="224" Name="Display_icon" Class="_commentbox" pos="1566,-225.40411,0">
<Inputs TextSize="1" Color="1,1,1" DisplayFilled="1" DisplayBox="1" SortPriority="16"/>
<ResizeBorder X="0" Y="0" Width="2034" Height="594"/>
<NodeSize Width="2034" Height="695.5835"/>
</Node>
<Node Id="225" Name="if_we_are_looking_at_it_within_the_angles_then_display_the_object" Class="_comment" pos="2718,612,0"/>
<Node Id="227" Name="Display_object_on_screen_based_on_view_angle" Class="_commentbox" pos="378,-352.46378,0">
<Inputs TextSize="1" Color="0.814847,1,1" DisplayFilled="1" DisplayBox="1" SortPriority="16"/>
<ResizeBorder X="0" Y="0" Width="4158" Height="2106"/>
<NodeSize Width="4158" Height="2207.5835"/>
</Node>
<Node Id="229" Class="Logic:Any" pos="2466,630,0" InHideMask="1023" OutHideMask="1">
<Inputs />
</Node>
<Node Id="231" Class="Entity:CheckDistance" pos="2610,1386,0">
<Inputs entityId="0" MinDistance="0" MaxDistance="0" Entity1="0" Entity2="0" Entity3="0" Entity4="0" Entity5="0" Entity6="0" Entity7="0" Entity8="0" Entity9="0" Entity10="0" Entity11="0" Entity12="0" Entity13="0" Entity14="0" Entity15="0" Entity16="0"/>
</Node>
<Node Id="232" Class="Entity:EntityId" pos="2394,1440,0" EntityGUID="e29a431c-0449-0274-0494-95880e6a012c">
<Inputs entityId="0"/>
</Node>
<Node Id="233" Class="Actor:LocalPlayer" pos="2610,1350,0">
<Inputs />
</Node>
<Node Id="235" Class="Time:Timer" pos="2376,1332,0">
<Inputs period="0.1" min="0" max="0" paused="0"/>
</Node>
<Node Id="237" Class="Math:Less" pos="2952,1422,0">
<Inputs A="0" B="10"/>
</Node>
<Node Id="243" Class="Logic:All" pos="3726,486,0">
<Inputs />
</Node>
<Node Id="245" Name="within_distance_to_object?" Class="_comment" pos="2952,1386,0"/>
<Node Id="246" Name="B_=_max_distance" Class="_comment" pos="2952,1404,0"/>
<Node Id="247" Name="check_interval" Class="_comment" pos="2376,1314,0"/>
<Node Id="251" Class="Logic:Any" pos="3600,594,0" InHideMask="1022">
<Inputs />
</Node>
<Node Id="253" Class="Logic:Any" pos="3474,594,0" InHideMask="1022">
<Inputs />
</Node>
<Node Id="254" Name="delay_nodes" Class="_comment" pos="3510,576,0"/>
<Node Id="256" Class="Logic:Any" pos="3726,666,0">
<Inputs />
</Node>
<Node Id="258" Class="Logic:Any" pos="3384,234,0" InHideMask="1023" OutHideMask="1">
<Inputs />
</Node>
<Node Id="259" Class="Logic:Any" pos="3384,288,0" InHideMask="1023" OutHideMask="1">
<Inputs />
</Node>
<Node Id="261" Name="Display_if_entity_is_in_range" Class="_commentbox" pos="2358,1195.5504,0">
<Inputs TextSize="1" Color="1,1,1" DisplayFilled="1" DisplayBox="1" SortPriority="16"/>
<ResizeBorder X="0" Y="0" Width="792" Height="486"/>
<NodeSize Width="914.21783" Height="587.5835"/>
</Node>
<Node Id="265" Class="Math:SetNumber" pos="648,360,0">
<Inputs in="10"/>
</Node>
<Node Id="266" Name="Max_display_distance" Class="_comment" pos="648,342,0"/>
</Nodes>
<Edges>
<Edge nodeIn="47" nodeOut="3" portIn="in" portOut="Py" enabled="1"/>
<Edge nodeIn="78" nodeOut="3" portIn="in" portOut="Px" enabled="1"/>
<Edge nodeIn="79" nodeOut="16" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="82" nodeOut="16" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="66" nodeOut="17" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="75" nodeOut="17" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="3" nodeOut="21" portIn="Enable" portOut="output" enabled="1"/>
<Edge nodeIn="16" nodeOut="21" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="17" nodeOut="21" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="36" nodeOut="21" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="37" nodeOut="21" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="66" nodeOut="36" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="67" nodeOut="36" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="79" nodeOut="37" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="80" nodeOut="37" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="259" nodeOut="47" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="68" nodeOut="67" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="75" nodeOut="68" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="77" nodeOut="75" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="47" nodeOut="77" portIn="max" portOut="out" enabled="1"/>
<Edge nodeIn="258" nodeOut="78" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="81" nodeOut="80" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="82" nodeOut="81" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="83" nodeOut="82" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="78" nodeOut="83" portIn="max" portOut="out" enabled="1"/>
<Edge nodeIn="110" nodeOut="95" portIn="B" portOut="Pos" enabled="1"/>
<Edge nodeIn="186" nodeOut="95" portIn="vec3" portOut="Rotate" enabled="1"/>
<Edge nodeIn="110" nodeOut="96" portIn="A" portOut="Pos" enabled="1"/>
<Edge nodeIn="95" nodeOut="100" portIn="Get" portOut="out" enabled="1"/>
<Edge nodeIn="95" nodeOut="102" portIn="entityId" portOut="entityId" enabled="1"/>
<Edge nodeIn="96" nodeOut="104" portIn="entityId" portOut="Id" enabled="1"/>
<Edge nodeIn="112" nodeOut="110" portIn="dir" portOut="out" enabled="1"/>
<Edge nodeIn="152" nodeOut="112" portIn="vec3" portOut="angles" enabled="1"/>
<Edge nodeIn="151" nodeOut="144" portIn="Max" portOut="out" enabled="1"/>
<Edge nodeIn="243" nodeOut="151" portIn="in1" portOut="true" enabled="1"/>
<Edge nodeIn="256" nodeOut="151" portIn="in1" portOut="false" enabled="1"/>
<Edge nodeIn="144" nodeOut="152" portIn="A" portOut="z" enabled="1"/>
<Edge nodeIn="153" nodeOut="152" portIn="A" portOut="z" enabled="1"/>
<Edge nodeIn="151" nodeOut="153" portIn="Min" portOut="out" enabled="1"/>
<Edge nodeIn="184" nodeOut="183" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="229" nodeOut="184" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="183" nodeOut="186" portIn="in1" portOut="z" enabled="1"/>
<Edge nodeIn="193" nodeOut="191" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="195" nodeOut="191" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="153" nodeOut="193" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="144" nodeOut="195" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="191" nodeOut="197" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="211" nodeOut="197" portIn="true" portOut="output" enabled="1"/>
<Edge nodeIn="265" nodeOut="197" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="213" nodeOut="211" portIn="Value" portOut="out" enabled="1"/>
<Edge nodeIn="217" nodeOut="213" portIn="in1" portOut="False" enabled="1"/>
<Edge nodeIn="221" nodeOut="213" portIn="true" portOut="False" enabled="1"/>
<Edge nodeIn="221" nodeOut="213" portIn="false" portOut="True" enabled="1"/>
<Edge nodeIn="96" nodeOut="217" portIn="Get" portOut="out" enabled="1"/>
<Edge nodeIn="217" nodeOut="219" portIn="in2" portOut="out" enabled="1"/>
<Edge nodeIn="219" nodeOut="221" portIn="paused" portOut="out" enabled="1"/>
<Edge nodeIn="151" nodeOut="229" portIn="In" portOut="out" enabled="1"/>
<Edge nodeIn="237" nodeOut="231" portIn="A" portOut="NearEntityDist" enabled="1"/>
<Edge nodeIn="231" nodeOut="232" portIn="Entity1" portOut="Id" enabled="1"/>
<Edge nodeIn="231" nodeOut="233" portIn="entityId" portOut="entityId" enabled="1"/>
<Edge nodeIn="231" nodeOut="235" portIn="Check" portOut="out" enabled="1"/>
<Edge nodeIn="243" nodeOut="237" portIn="in2" portOut="true" enabled="1"/>
<Edge nodeIn="253" nodeOut="237" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="256" nodeOut="237" portIn="in2" portOut="false" enabled="1"/>
<Edge nodeIn="7" nodeOut="243" portIn="Show" portOut="Out" enabled="1"/>
<Edge nodeIn="243" nodeOut="251" portIn="Reset" portOut="out" enabled="1"/>
<Edge nodeIn="251" nodeOut="253" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="7" nodeOut="256" portIn="Hide" portOut="out" enabled="1"/>
<Edge nodeIn="7" nodeOut="258" portIn="posX" portOut="out" enabled="1"/>
<Edge nodeIn="7" nodeOut="259" portIn="posY" portOut="out" enabled="1"/>
<Edge nodeIn="237" nodeOut="265" portIn="B" portOut="out" enabled="1"/>
</Edges>
</Graph>

Re: Problem with Entity: EntityScreenPos and Flash

#5
I have done it this way:
Image


Here the whole flow graph:
Image

CTRL + v it directly into Flow Graph.

Code: Select all

<Graph Description="" Group="asd">
<Nodes>
<Node Id="3" Class="Entity:EntityScreenPos" pos="1836,-108,0" EntityGUID="e29a431c-0449-0274-0494-95880e6a012c">
<Inputs entityId="0"/>
</Node>
<Node Id="7" Class="Debug:DisplayMessage" pos="3366,126,0">
<Inputs entityId="0" message="O" DisplayTime="0" posX="50" posY="50" fontSize="5" clr_Color="1,1,1" centered="0"/>
</Node>
<Node Id="16" Class="Math:SetNumber" pos="1836,180,0">
<Inputs in="64"/>
</Node>
<Node Id="17" Class="Math:SetNumber" pos="1836,396,0">
<Inputs in="64"/>
</Node>
<Node Id="18" Name="Picture_Width" Class="_comment" pos="1836,162,0"/>
<Node Id="19" Name="Picture_Height" Class="_comment" pos="1836,378,0"/>
<Node Id="21" Class="Game:Start" pos="1584,216,0">
<Inputs InGame="1" InEditor="1"/>
</Node>
<Node Id="36" Class="Math:SetNumber" pos="1836,306,0">
<Inputs in="1080"/>
</Node>
<Node Id="37" Class="Math:SetNumber" pos="1836,72,0">
<Inputs in="1920"/>
</Node>
<Node Id="45" Name="Resolution_Width" Class="_comment" pos="1836,54,0"/>
<Node Id="46" Name="Resolution_Height" Class="_comment" pos="1836,288,0"/>
<Node Id="47" Class="Math:Clamp" pos="3078,234,0">
<Inputs in="0" min="0" max="0"/>
</Node>
<Node Id="66" Class="Math:Sub" pos="2070,396,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="67" Class="Math:Div" pos="2070,288,0">
<Inputs A="1" B="0"/>
</Node>
<Node Id="68" Class="Math:Add" pos="2430,288,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="75" Class="Math:Mul" pos="2682,288,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="77" Class="Math:Sub" pos="2898,270,0">
<Inputs A="1" B="0"/>
</Node>
<Node Id="78" Class="Math:Clamp" pos="3078,0,0">
<Inputs in="0" min="0" max="0"/>
</Node>
<Node Id="79" Class="Math:Sub" pos="2070,162,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="80" Class="Math:Div" pos="2070,54,0">
<Inputs A="1" B="0"/>
</Node>
<Node Id="81" Class="Math:Add" pos="2430,54,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="82" Class="Math:Mul" pos="2682,54,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="83" Class="Math:Sub" pos="2898,36,0">
<Inputs A="1" B="0"/>
</Node>
<Node Id="95" Class="Entity:GetPos" pos="1062,630,0">
<Inputs entityId="0" CoordSys="1"/>
</Node>
<Node Id="96" Class="Entity:GetPos" pos="1080,882,0">
<Inputs entityId="0" CoordSys="1"/>
</Node>
<Node Id="100" Class="Time:Timer" pos="810,648,0">
<Inputs period="0.1" min="0" max="0" paused="0"/>
</Node>
<Node Id="102" Class="Actor:LocalPlayer" pos="1062,594,0">
<Inputs />
</Node>
<Node Id="104" Class="Entity:EntityId" pos="1080,828,0" EntityGUID="e29a431c-0449-0274-0494-95880e6a012c">
<Inputs entityId="0"/>
</Node>
<Node Id="110" Class="Vec3:SubVec3" pos="1422,774,0">
<Inputs A="0,0,0" B="0,0,0"/>
</Node>
<Node Id="112" Class="Math:DirToAngles" pos="1728,774,0">
<Inputs dir="0,0,0" roll="180"/>
</Node>
<Node Id="144" Class="Math:Add" pos="2466,738,0">
<Inputs A="0" B="5"/>
</Node>
<Node Id="151" Class="Math:InRange" pos="2718,630,0">
<Inputs In="0" Min="0" Max="0"/>
</Node>
<Node Id="152" Class="Vec3:FromVec3" pos="2070,774,0">
<Inputs vec3="0,0,0"/>
</Node>
<Node Id="153" Class="Math:Add" pos="2466,684,0">
<Inputs A="0" B="-5"/>
</Node>
<Node Id="183" Class="Logic:Any" pos="1728,630,0" InHideMask="1023" OutHideMask="1">
<Inputs />
</Node>
<Node Id="184" Class="Logic:Any" pos="2070,630,0" InHideMask="1023">
<Inputs />
</Node>
<Node Id="186" Class="Vec3:FromVec3" pos="1422,594,0">
<Inputs vec3="0,0,0"/>
</Node>
<Node Id="191" Class="Math:SetNumber" pos="648,288,0">
<Inputs in="90"/>
</Node>
<Node Id="193" Class="Math:Mul" pos="828,288,0">
<Inputs A="0" B="-1"/>
</Node>
<Node Id="195" Class="Logic:Any" pos="828,342,0" InHideMask="1022">
<Inputs />
</Node>
<Node Id="197" Class="Game:Start" pos="450,288,0">
<Inputs InGame="1" InEditor="1"/>
</Node>
<Node Id="198" Name="Angle_Range_(goes_in_both_directions)" Class="_comment" pos="648,270,0"/>
<Node Id="202" Name="Settings" Class="_commentbox" pos="414,151.86313,0">
<Inputs TextSize="1" Color="1,1,1" DisplayFilled="1" DisplayBox="1" SortPriority="16"/>
<ResizeBorder X="0" Y="0" Width="630" Height="270"/>
<NodeSize Width="630" Height="343.77744"/>
</Node>
<Node Id="203" Name="Object" Class="_comment" pos="1080,810,0"/>
<Node Id="207" Name="dynamic_object" Class="_comment" pos="648,414,0"/>
<Node Id="211" Class="Math:BooleanTo" pos="648,432,0">
<Inputs />
</Node>
<Node Id="213" Class="Math:BooleanFrom" pos="432,900,0">
<Inputs Value="0"/>
</Node>
<Node Id="217" Class="Logic:Any" pos="936,900,0">
<Inputs />
</Node>
<Node Id="219" Class="Time:Timer" pos="756,1062,0">
<Inputs period="0" min="0" max="0" paused="1"/>
</Node>
<Node Id="221" Class="Math:BooleanTo" pos="594,1116,0">
<Inputs />
</Node>
<Node Id="222" Name="Calculate_object_direction" Class="_commentbox" pos="414,502.22275,0">
<Inputs TextSize="1" Color="1,1,1" DisplayFilled="1" DisplayBox="1" SortPriority="16"/>
<ResizeBorder X="0" Y="0" Width="2844" Height="612"/>
<NodeSize Width="2844" Height="685.77747"/>
</Node>
<Node Id="223" Name="This is a comment" Class="_comment" pos="504,612,0"/>
<Node Id="224" Name="Display_icon" Class="_commentbox" pos="1566,-197.59717,0">
<Inputs TextSize="1" Color="1,1,1" DisplayFilled="1" DisplayBox="1" SortPriority="16"/>
<ResizeBorder X="0" Y="0" Width="2034" Height="594"/>
<NodeSize Width="2034" Height="667.77747"/>
</Node>
<Node Id="225" Name="if_we_are_looking_at_it_within_the_angles_then_display_the_object" Class="_comment" pos="2718,612,0"/>
<Node Id="227" Name="Display_object_on_screen_based_on_view_angle" Class="_commentbox" pos="396,-315.20847,0">
<Inputs TextSize="1" Color="0.814847,1,1" DisplayFilled="1" DisplayBox="1" SortPriority="16"/>
<ResizeBorder X="0" Y="0" Width="3240" Height="1476"/>
<NodeSize Width="3240" Height="1549.7775"/>
</Node>
<Node Id="229" Class="Logic:Any" pos="2466,630,0" InHideMask="1023" OutHideMask="1">
<Inputs />
</Node>
</Nodes>
<Edges>
<Edge nodeIn="47" nodeOut="3" portIn="in" portOut="Py" enabled="1"/>
<Edge nodeIn="78" nodeOut="3" portIn="in" portOut="Px" enabled="1"/>
<Edge nodeIn="79" nodeOut="16" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="82" nodeOut="16" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="66" nodeOut="17" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="75" nodeOut="17" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="3" nodeOut="21" portIn="Enable" portOut="output" enabled="1"/>
<Edge nodeIn="16" nodeOut="21" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="17" nodeOut="21" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="36" nodeOut="21" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="37" nodeOut="21" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="66" nodeOut="36" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="67" nodeOut="36" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="79" nodeOut="37" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="80" nodeOut="37" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="7" nodeOut="47" portIn="posY" portOut="out" enabled="1"/>
<Edge nodeIn="68" nodeOut="67" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="75" nodeOut="68" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="77" nodeOut="75" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="47" nodeOut="77" portIn="max" portOut="out" enabled="1"/>
<Edge nodeIn="7" nodeOut="78" portIn="posX" portOut="out" enabled="1"/>
<Edge nodeIn="81" nodeOut="80" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="82" nodeOut="81" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="83" nodeOut="82" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="78" nodeOut="83" portIn="max" portOut="out" enabled="1"/>
<Edge nodeIn="110" nodeOut="95" portIn="B" portOut="Pos" enabled="1"/>
<Edge nodeIn="186" nodeOut="95" portIn="vec3" portOut="Rotate" enabled="1"/>
<Edge nodeIn="110" nodeOut="96" portIn="A" portOut="Pos" enabled="1"/>
<Edge nodeIn="95" nodeOut="100" portIn="Get" portOut="out" enabled="1"/>
<Edge nodeIn="95" nodeOut="102" portIn="entityId" portOut="entityId" enabled="1"/>
<Edge nodeIn="96" nodeOut="104" portIn="entityId" portOut="Id" enabled="1"/>
<Edge nodeIn="112" nodeOut="110" portIn="dir" portOut="out" enabled="1"/>
<Edge nodeIn="152" nodeOut="112" portIn="vec3" portOut="angles" enabled="1"/>
<Edge nodeIn="151" nodeOut="144" portIn="Max" portOut="out" enabled="1"/>
<Edge nodeIn="7" nodeOut="151" portIn="Hide" portOut="false" enabled="1"/>
<Edge nodeIn="7" nodeOut="151" portIn="Show" portOut="true" enabled="1"/>
<Edge nodeIn="144" nodeOut="152" portIn="A" portOut="z" enabled="1"/>
<Edge nodeIn="153" nodeOut="152" portIn="A" portOut="z" enabled="1"/>
<Edge nodeIn="151" nodeOut="153" portIn="Min" portOut="out" enabled="1"/>
<Edge nodeIn="184" nodeOut="183" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="229" nodeOut="184" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="183" nodeOut="186" portIn="in1" portOut="z" enabled="1"/>
<Edge nodeIn="193" nodeOut="191" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="195" nodeOut="191" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="153" nodeOut="193" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="144" nodeOut="195" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="191" nodeOut="197" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="211" nodeOut="197" portIn="true" portOut="output" enabled="1"/>
<Edge nodeIn="213" nodeOut="211" portIn="Value" portOut="out" enabled="1"/>
<Edge nodeIn="217" nodeOut="213" portIn="in1" portOut="False" enabled="1"/>
<Edge nodeIn="221" nodeOut="213" portIn="true" portOut="False" enabled="1"/>
<Edge nodeIn="221" nodeOut="213" portIn="false" portOut="True" enabled="1"/>
<Edge nodeIn="96" nodeOut="217" portIn="Get" portOut="out" enabled="1"/>
<Edge nodeIn="217" nodeOut="219" portIn="in2" portOut="out" enabled="1"/>
<Edge nodeIn="219" nodeOut="221" portIn="paused" portOut="out" enabled="1"/>
<Edge nodeIn="151" nodeOut="229" portIn="In" portOut="out" enabled="1"/>
</Edges>
</Graph>
Thank you Very good.
I think it's a good way.

If the object is not at the player's angle, do not hide it and show the direction of the object.
Can you complete it?(If your time is free)

Re: Problem with Entity: EntityScreenPos and Flash

#6
could do like this i guess:

Code: Select all

<Graph Description="" Group="asd">
<Nodes>
<Node Id="3" Class="Entity:EntityScreenPos" pos="1836,-108,0" EntityGUID="e29a431c-0449-0274-0494-95880e6a012c">
<Inputs entityId="0"/>
</Node>
<Node Id="7" Class="Debug:DisplayMessage" pos="4824,-72,0">
<Inputs entityId="0" message="O" DisplayTime="0" posX="50" posY="50" fontSize="5" clr_Color="1,1,1" centered="0"/>
</Node>
<Node Id="16" Class="Math:SetNumber" pos="1836,180,0">
<Inputs in="64"/>
</Node>
<Node Id="17" Class="Math:SetNumber" pos="1836,396,0">
<Inputs in="64"/>
</Node>
<Node Id="18" Name="Picture_Width" Class="_comment" pos="1836,162,0"/>
<Node Id="19" Name="Picture_Height" Class="_comment" pos="1836,378,0"/>
<Node Id="21" Class="Game:Start" pos="1584,216,0">
<Inputs InGame="1" InEditor="1"/>
</Node>
<Node Id="36" Class="Math:SetNumber" pos="1836,306,0">
<Inputs in="1080"/>
</Node>
<Node Id="37" Class="Math:SetNumber" pos="1836,72,0">
<Inputs in="1920"/>
</Node>
<Node Id="45" Name="Resolution_Width" Class="_comment" pos="1836,54,0"/>
<Node Id="46" Name="Resolution_Height" Class="_comment" pos="1836,288,0"/>
<Node Id="47" Class="Math:Clamp" pos="3078,234,0">
<Inputs in="0" min="0" max="0"/>
</Node>
<Node Id="66" Class="Math:Sub" pos="2070,396,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="67" Class="Math:Div" pos="2070,288,0">
<Inputs A="1" B="0"/>
</Node>
<Node Id="68" Class="Math:Add" pos="2430,288,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="75" Class="Math:Mul" pos="2682,288,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="77" Class="Math:Sub" pos="2898,270,0">
<Inputs A="1" B="0"/>
</Node>
<Node Id="78" Class="Math:Clamp" pos="3078,0,0">
<Inputs in="0" min="0" max="0"/>
</Node>
<Node Id="79" Class="Math:Sub" pos="2070,162,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="80" Class="Math:Div" pos="2070,54,0">
<Inputs A="1" B="0"/>
</Node>
<Node Id="81" Class="Math:Add" pos="2430,54,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="82" Class="Math:Mul" pos="2682,54,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="83" Class="Math:Sub" pos="2898,36,0">
<Inputs A="1" B="0"/>
</Node>
<Node Id="95" Class="Entity:GetPos" pos="1062,630,0">
<Inputs entityId="0" CoordSys="1"/>
</Node>
<Node Id="96" Class="Entity:GetPos" pos="1080,882,0">
<Inputs entityId="0" CoordSys="1"/>
</Node>
<Node Id="100" Class="Time:Timer" pos="810,648,0">
<Inputs period="0.1" min="0" max="0" paused="0"/>
</Node>
<Node Id="102" Class="Actor:LocalPlayer" pos="1062,594,0">
<Inputs />
</Node>
<Node Id="104" Class="Entity:EntityId" pos="1080,828,0" EntityGUID="e29a431c-0449-0274-0494-95880e6a012c">
<Inputs entityId="0"/>
</Node>
<Node Id="110" Class="Vec3:SubVec3" pos="1422,774,0">
<Inputs A="0,0,0" B="0,0,0"/>
</Node>
<Node Id="112" Class="Math:DirToAngles" pos="1728,774,0">
<Inputs dir="0,0,0" roll="180"/>
</Node>
<Node Id="144" Class="Math:Add" pos="2466,738,0">
<Inputs A="0" B="5"/>
</Node>
<Node Id="151" Class="Math:InRange" pos="2718,630,0">
<Inputs In="0" Min="0" Max="0"/>
</Node>
<Node Id="152" Class="Vec3:FromVec3" pos="2070,774,0">
<Inputs vec3="0,0,0"/>
</Node>
<Node Id="153" Class="Math:Add" pos="2466,684,0">
<Inputs A="0" B="-5"/>
</Node>
<Node Id="183" Class="Logic:Any" pos="1728,630,0" InHideMask="1023" OutHideMask="1">
<Inputs />
</Node>
<Node Id="184" Class="Logic:Any" pos="2070,630,0" InHideMask="1023">
<Inputs />
</Node>
<Node Id="186" Class="Vec3:FromVec3" pos="1422,594,0">
<Inputs vec3="0,0,0"/>
</Node>
<Node Id="191" Class="Math:SetNumber" pos="648,144,0">
<Inputs in="90"/>
</Node>
<Node Id="193" Class="Math:Mul" pos="828,144,0">
<Inputs A="0" B="-1"/>
</Node>
<Node Id="195" Class="Logic:Any" pos="828,198,0" InHideMask="1022">
<Inputs />
</Node>
<Node Id="197" Class="Game:Start" pos="450,144,0">
<Inputs InGame="1" InEditor="1"/>
</Node>
<Node Id="198" Name="Angle_Range_(goes_in_both_directions)" Class="_comment" pos="648,126,0"/>
<Node Id="202" Name="Settings" Class="_commentbox" pos="414,-56.429585,0">
<Inputs TextSize="1" Color="1,1,1" DisplayFilled="1" DisplayBox="1" SortPriority="16"/>
<ResizeBorder X="0" Y="0" Width="630" Height="396"/>
<NodeSize Width="630" Height="543.54993"/>
</Node>
<Node Id="203" Name="Object" Class="_comment" pos="1080,810,0"/>
<Node Id="207" Name="dynamic_object" Class="_comment" pos="648,234,0"/>
<Node Id="211" Class="Math:BooleanTo" pos="648,252,0">
<Inputs />
</Node>
<Node Id="213" Class="Math:BooleanFrom" pos="432,900,0">
<Inputs Value="0"/>
</Node>
<Node Id="217" Class="Logic:Any" pos="936,900,0">
<Inputs />
</Node>
<Node Id="219" Class="Time:Timer" pos="756,1062,0">
<Inputs period="0" min="0" max="0" paused="1"/>
</Node>
<Node Id="221" Class="Math:BooleanTo" pos="594,1116,0">
<Inputs />
</Node>
<Node Id="222" Name="Calculate_object_direction" Class="_commentbox" pos="414,428.45059,0">
<Inputs TextSize="1" Color="1,1,1" DisplayFilled="1" DisplayBox="1" SortPriority="16"/>
<ResizeBorder X="0" Y="0" Width="2844" Height="612"/>
<NodeSize Width="2844" Height="759.54993"/>
</Node>
<Node Id="223" Name="This is a comment" Class="_comment" pos="504,612,0"/>
<Node Id="224" Name="Display_icon" Class="_commentbox" pos="1566,-271.37006,0">
<Inputs TextSize="1" Color="1,1,1" DisplayFilled="1" DisplayBox="1" SortPriority="16"/>
<ResizeBorder X="0" Y="0" Width="2034" Height="594"/>
<NodeSize Width="2034" Height="741.54993"/>
</Node>
<Node Id="225" Name="if_we_are_looking_at_it_within_the_angles_then_display_the_object" Class="_comment" pos="2718,612,0"/>
<Node Id="227" Name="Display_object_on_screen_based_on_view_angle" Class="_commentbox" pos="378,-398.42917,0">
<Inputs TextSize="1" Color="0.814847,1,1" DisplayFilled="1" DisplayBox="1" SortPriority="16"/>
<ResizeBorder X="0" Y="0" Width="4806" Height="2106"/>
<NodeSize Width="4806" Height="2253.5498"/>
</Node>
<Node Id="229" Class="Logic:Any" pos="2466,630,0" InHideMask="1023" OutHideMask="1">
<Inputs />
</Node>
<Node Id="231" Class="Entity:CheckDistance" pos="2610,1386,0">
<Inputs entityId="0" MinDistance="0" MaxDistance="0" Entity1="0" Entity2="0" Entity3="0" Entity4="0" Entity5="0" Entity6="0" Entity7="0" Entity8="0" Entity9="0" Entity10="0" Entity11="0" Entity12="0" Entity13="0" Entity14="0" Entity15="0" Entity16="0"/>
</Node>
<Node Id="232" Class="Entity:EntityId" pos="2394,1440,0" EntityGUID="e29a431c-0449-0274-0494-95880e6a012c">
<Inputs entityId="0"/>
</Node>
<Node Id="233" Class="Actor:LocalPlayer" pos="2610,1350,0">
<Inputs />
</Node>
<Node Id="235" Class="Time:Timer" pos="2376,1332,0">
<Inputs period="0.1" min="0" max="0" paused="0"/>
</Node>
<Node Id="237" Class="Math:Less" pos="2952,1422,0">
<Inputs A="0" B="10"/>
</Node>
<Node Id="243" Class="Logic:All" pos="3726,486,0">
<Inputs />
</Node>
<Node Id="245" Name="within_distance_to_object?" Class="_comment" pos="2952,1386,0"/>
<Node Id="246" Name="B_=_max_distance" Class="_comment" pos="2952,1404,0"/>
<Node Id="247" Name="check_interval" Class="_comment" pos="2376,1314,0"/>
<Node Id="251" Class="Logic:Any" pos="3600,594,0" InHideMask="1022">
<Inputs />
</Node>
<Node Id="253" Class="Logic:Any" pos="3474,594,0" InHideMask="1022">
<Inputs />
</Node>
<Node Id="254" Name="delay_nodes" Class="_comment" pos="3510,576,0"/>
<Node Id="256" Class="Logic:Any" pos="3726,666,0">
<Inputs />
</Node>
<Node Id="258" Class="Logic:Any" pos="3384,0,0" InHideMask="1023" OutHideMask="1">
<Inputs />
</Node>
<Node Id="259" Class="Logic:Any" pos="3384,234,0" InHideMask="1023">
<Inputs />
</Node>
<Node Id="261" Name="Display_if_entity_is_in_range" Class="_commentbox" pos="2358,1149.5854,0">
<Inputs TextSize="1" Color="1,1,1" DisplayFilled="1" DisplayBox="1" SortPriority="16"/>
<ResizeBorder X="0" Y="0" Width="792" Height="486"/>
<NodeSize Width="1329.5636" Height="633.54993"/>
</Node>
<Node Id="265" Class="Math:SetNumber" pos="648,360,0">
<Inputs in="20"/>
</Node>
<Node Id="266" Name="Max_display_distance" Class="_comment" pos="648,342,0"/>
<Node Id="296" Class="Logic:Any" pos="4590,18,0" InHideMask="1021" OutHideMask="1">
<Inputs />
</Node>
<Node Id="298" Class="Logic:Any" pos="4590,90,0" InHideMask="1020" OutHideMask="1">
<Inputs />
</Node>
<Node Id="300" Class="Math:SetNumber" pos="4014,324,0">
<Inputs in="0"/>
</Node>
<Node Id="303" Class="Logic:Gate" pos="4014,234,0">
<Inputs Closed="0"/>
</Node>
<Node Id="308" Class="Math:Sub" pos="4212,36,0">
<Inputs A="0" B="0"/>
</Node>
<Node Id="310" Class="Logic:Gate" pos="3996,-54,0">
<Inputs Closed="0"/>
</Node>
<Node Id="311" Class="Logic:Gate" pos="3996,54,0">
<Inputs Closed="0"/>
</Node>
</Nodes>
<Edges>
<Edge nodeIn="47" nodeOut="3" portIn="in" portOut="Py" enabled="1"/>
<Edge nodeIn="78" nodeOut="3" portIn="in" portOut="Px" enabled="1"/>
<Edge nodeIn="79" nodeOut="16" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="82" nodeOut="16" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="66" nodeOut="17" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="75" nodeOut="17" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="3" nodeOut="21" portIn="Enable" portOut="output" enabled="1"/>
<Edge nodeIn="16" nodeOut="21" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="17" nodeOut="21" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="36" nodeOut="21" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="37" nodeOut="21" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="66" nodeOut="36" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="67" nodeOut="36" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="79" nodeOut="37" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="80" nodeOut="37" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="259" nodeOut="47" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="68" nodeOut="67" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="75" nodeOut="68" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="77" nodeOut="75" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="47" nodeOut="77" portIn="max" portOut="out" enabled="1"/>
<Edge nodeIn="300" nodeOut="77" portIn="in" portOut="out" enabled="1"/>
<Edge nodeIn="258" nodeOut="78" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="81" nodeOut="80" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="82" nodeOut="81" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="83" nodeOut="82" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="78" nodeOut="83" portIn="max" portOut="out" enabled="1"/>
<Edge nodeIn="308" nodeOut="83" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="110" nodeOut="95" portIn="B" portOut="Pos" enabled="1"/>
<Edge nodeIn="186" nodeOut="95" portIn="vec3" portOut="Rotate" enabled="1"/>
<Edge nodeIn="110" nodeOut="96" portIn="A" portOut="Pos" enabled="1"/>
<Edge nodeIn="95" nodeOut="100" portIn="Get" portOut="out" enabled="1"/>
<Edge nodeIn="95" nodeOut="102" portIn="entityId" portOut="entityId" enabled="1"/>
<Edge nodeIn="96" nodeOut="104" portIn="entityId" portOut="Id" enabled="1"/>
<Edge nodeIn="112" nodeOut="110" portIn="dir" portOut="out" enabled="1"/>
<Edge nodeIn="152" nodeOut="112" portIn="vec3" portOut="angles" enabled="1"/>
<Edge nodeIn="151" nodeOut="144" portIn="Max" portOut="out" enabled="1"/>
<Edge nodeIn="243" nodeOut="151" portIn="in1" portOut="true" enabled="1"/>
<Edge nodeIn="256" nodeOut="151" portIn="in1" portOut="false" enabled="1"/>
<Edge nodeIn="310" nodeOut="151" portIn="Close" portOut="false" enabled="1"/>
<Edge nodeIn="310" nodeOut="151" portIn="Open" portOut="true" enabled="1"/>
<Edge nodeIn="311" nodeOut="151" portIn="Open" portOut="false" enabled="1"/>
<Edge nodeIn="311" nodeOut="151" portIn="Close" portOut="true" enabled="1"/>
<Edge nodeIn="144" nodeOut="152" portIn="A" portOut="z" enabled="1"/>
<Edge nodeIn="153" nodeOut="152" portIn="A" portOut="z" enabled="1"/>
<Edge nodeIn="151" nodeOut="153" portIn="Min" portOut="out" enabled="1"/>
<Edge nodeIn="184" nodeOut="183" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="229" nodeOut="184" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="183" nodeOut="186" portIn="in1" portOut="z" enabled="1"/>
<Edge nodeIn="193" nodeOut="191" portIn="A" portOut="out" enabled="1"/>
<Edge nodeIn="195" nodeOut="191" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="153" nodeOut="193" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="144" nodeOut="195" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="191" nodeOut="197" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="211" nodeOut="197" portIn="true" portOut="output" enabled="1"/>
<Edge nodeIn="265" nodeOut="197" portIn="set" portOut="output" enabled="1"/>
<Edge nodeIn="213" nodeOut="211" portIn="Value" portOut="out" enabled="1"/>
<Edge nodeIn="217" nodeOut="213" portIn="in1" portOut="False" enabled="1"/>
<Edge nodeIn="221" nodeOut="213" portIn="true" portOut="False" enabled="1"/>
<Edge nodeIn="221" nodeOut="213" portIn="false" portOut="True" enabled="1"/>
<Edge nodeIn="96" nodeOut="217" portIn="Get" portOut="out" enabled="1"/>
<Edge nodeIn="217" nodeOut="219" portIn="in2" portOut="out" enabled="1"/>
<Edge nodeIn="219" nodeOut="221" portIn="paused" portOut="out" enabled="1"/>
<Edge nodeIn="151" nodeOut="229" portIn="In" portOut="out" enabled="1"/>
<Edge nodeIn="237" nodeOut="231" portIn="A" portOut="NearEntityDist" enabled="1"/>
<Edge nodeIn="231" nodeOut="232" portIn="Entity1" portOut="Id" enabled="1"/>
<Edge nodeIn="231" nodeOut="233" portIn="entityId" portOut="entityId" enabled="1"/>
<Edge nodeIn="231" nodeOut="235" portIn="Check" portOut="out" enabled="1"/>
<Edge nodeIn="7" nodeOut="237" portIn="Hide" portOut="false" enabled="1"/>
<Edge nodeIn="243" nodeOut="237" portIn="in2" portOut="true" enabled="1"/>
<Edge nodeIn="253" nodeOut="237" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="256" nodeOut="237" portIn="in2" portOut="false" enabled="1"/>
<Edge nodeIn="7" nodeOut="243" portIn="Show" portOut="Out" enabled="1"/>
<Edge nodeIn="303" nodeOut="243" portIn="Open" portOut="Out" enabled="1"/>
<Edge nodeIn="243" nodeOut="251" portIn="Reset" portOut="out" enabled="1"/>
<Edge nodeIn="251" nodeOut="253" portIn="in1" portOut="out" enabled="1"/>
<Edge nodeIn="300" nodeOut="256" portIn="set" portOut="out" enabled="1"/>
<Edge nodeIn="303" nodeOut="256" portIn="Close" portOut="out" enabled="1"/>
<Edge nodeIn="310" nodeOut="258" portIn="In" portOut="out" enabled="1"/>
<Edge nodeIn="311" nodeOut="258" portIn="In" portOut="out" enabled="1"/>
<Edge nodeIn="303" nodeOut="259" portIn="In" portOut="out" enabled="1"/>
<Edge nodeIn="237" nodeOut="265" portIn="B" portOut="out" enabled="1"/>
<Edge nodeIn="7" nodeOut="296" portIn="posX" portOut="out" enabled="1"/>
<Edge nodeIn="7" nodeOut="298" portIn="posY" portOut="out" enabled="1"/>
<Edge nodeIn="298" nodeOut="300" portIn="in2" portOut="out" enabled="1"/>
<Edge nodeIn="298" nodeOut="303" portIn="in1" portOut="Out" enabled="1"/>
<Edge nodeIn="296" nodeOut="308" portIn="in2" portOut="out" enabled="1"/>
<Edge nodeIn="296" nodeOut="310" portIn="in1" portOut="Out" enabled="1"/>
<Edge nodeIn="308" nodeOut="311" portIn="B" portOut="Out" enabled="1"/>
</Edges>
</Graph>
There is one more thing, you need sort of invert the value X value if you are not looking in the direction.
So clamped X (max value) minus ScreenPosX. I will let you figure out how to implement that one ;)
Post your solution once you got it :D

Edit: Full flowgraph provided, no further edits should be needed.
Hope the community will find it useful.

Who is online

Users browsing this forum: No registered users and 1 guest