- Joined
- Aug 28, 2015
- Messages
- 213
Hello everyone,
I working on a diagrammskill-system and I have a problem with the intersection.
I take a screenshot so I can show you whats wrong.
I want that every endpoint(green) get the closet intersection to the skillpoint(red), on its line, so the intersectionpoints would be by the yellow circles but actually is not(red circles).
here my triggers:
edit: cangend the calculation, butt still the same problem
I working on a diagrammskill-system and I have a problem with the intersection.
I take a screenshot so I can show you whats wrong.

I want that every endpoint(green) get the closet intersection to the skillpoint(red), on its line, so the intersectionpoints would be by the yellow circles but actually is not(red circles).
here my triggers:
-
create Skilldiagram
-
Ereignisse
-
Spieler - Spieler 1 (Rot) skips a cinematic sequence
-
-
Bedingungen
-
Aktionen
-
Set Point_Mid = (Center of Gebiet 000 <gen>)
-
Set Amount_Endpoints = 5
-
Set Amount_Skillpoints = 3
-
Set Radius = 300.00
-
For each (Integer DL) from 1 to Amount_Endpoints, do (Actions)
-
Schleifen - Aktionen
-
Set Point_End[DL] = (Point_Mid offset by Radius towards ((360.00 / (Real(Amount_Endpoints))) x (Real(DL))) degrees)
-
Schwebender Text - Create floating text that reads (! + (String(DL))) at Point_End[DL] with Z offset 0.00, using font size 10.00, color (30.00%, 100.00%, 30.00%), and 0.00% transparency
-
Set Angle[DL] = (((360.00 / (Real(Amount_Endpoints))) x (Real(DL))) + 180.00)
-
Set Floating_Text[DL] = (Last created floating text)
-
Set Value[DL] = (Radius x 2.00)
-
-
-
For each (Integer DL) from 1 to Amount_Skillpoints, do (Actions)
-
Schleifen - Aktionen
-
Set Point_Skillpoint[DL] = (Point_Mid offset by (Random real number between 50.00 and 250.00) towards (Random angle) degrees)
-
Schwebender Text - Create floating text that reads (# + (String(DL))) at Point_Skillpoint[DL] with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
-
Set Floating_Text[(Amount_Endpoints + DL)] = (Last created floating text)
-
-
-
-
-
Calculate
-
Ereignisse
-
Spieler - Spieler 1 (Rot) types a chat message containing - as Ein Teil-String
-
-
Bedingungen
-
Aktionen
-
For each (Integer DL) from 1 to Amount_Endpoints, do (Actions)
-
Schleifen - Aktionen
-
Set Temp_Int = DL
-
Set X1_End = (X of Point_End[Temp_Int])
-
Set Y1_End = (Y of Point_End[Temp_Int])
-
Set Temp_Point = (Point_End[Temp_Int] offset by (Radius x 2.00) towards Angle[Temp_Int] degrees)
-
Set X2_End = (X of Temp_Point)
-
Set Y2_End = (Y of Temp_Point)
-
Custom script: call RemoveLocation(udg_Temp_Point)
-
For each (Integer DL) from 1 to Amount_Skillpoints, do (Actions)
-
Schleifen - Aktionen
-
Set X1_Skill = (X of Point_Skillpoint[DL])
-
Set Y1_Skill = (Y of Point_Skillpoint[DL])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
'IF'-Bedingungen
-
DL Gleich Amount_Skillpoints
-
-
'THEN'-Aktionen
-
Set X2_Skill = (X of Point_Skillpoint[1])
-
Set Y2_Skill = (Y of Point_Skillpoint[1])
-
-
'ELSE'-Aktionen
-
Set X2_Skill = (X of Point_Skillpoint[(DL + 1)])
-
Set Y2_Skill = (Y of Point_Skillpoint[(DL + 1)])
-
-
-
Custom script: set udg_ZX = (udg_X1_End * udg_Y1_End - udg_Y1_End * udg_X2_End) * (udg_X1_Skill - udg_X2_Skill) - (udg_X1_End - udg_X2_End) * ( udg_X1_Skill * udg_Y2_Skill - udg_Y1_Skill * udg_X2_Skill)
-
Custom script: set udg_ZY = (udg_X1_End * udg_Y1_End - udg_Y1_End * udg_X2_End) * (udg_Y1_Skill - udg_Y2_Skill) - (udg_Y1_End - udg_Y2_End) * ( udg_X1_Skill * udg_Y2_Skill - udg_Y1_Skill * udg_X2_Skill)
-
Custom script: set udg_n = ( udg_X1_End - udg_X2_End ) * ( udg_Y1_Skill - udg_Y2_Skill ) - ( udg_Y1_End - udg_Y2_End ) * ( udg_X1_Skill - udg_X2_Skill)
-
Set X = (ZX / n)
-
Set Y = (ZY / n)
-
Custom script: if ( ( udg_X - udg_X1_End) / ( udg_X2_End - udg_X1_End) > 1 or ( udg_X - udg_X1_Skill ) / (udg_X2_Skill - udg_X1_Skill ) > 1 or ( udg_Y - udg_Y1_End ) / ( udg_Y2_End - udg_Y1_End ) >1 or ( udg_Y - udg_Y1_Skill ) / ( udg_Y2_Skill - udg_Y1_Skill) > 1 ) then
-
Custom script: else
-
Set Temp_Point = (Point(X, Y))
-
Set Temp_Real = (Distance between Point_End[Temp_Int] and Temp_Point)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
'IF'-Bedingungen
-
Temp_Real Kleiner als Value[Temp_Int]
-
-
'THEN'-Aktionen
-
Set Value[Temp_Int] = Temp_Real
-
Schwebender Text - Destroy Floating_Value[Temp_Int]
-
Schwebender Text - Create floating text that reads (\/ + (String(Temp_Int))) at Temp_Point with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
-
Set Floating_Value[Temp_Int] = (Last created floating text)
-
-
'ELSE'-Aktionen
-
-
Custom script: call RemoveLocation(udg_Temp_Point)
-
Custom script: endif
-
-
-
Set DL = Temp_Int
-
-
-
-
edit: cangend the calculation, butt still the same problem
Last edited: