[Solved] Creating TempPoint with 2 conditions

Status
Not open for further replies.
Level 14
Joined
May 13, 2017
Messages
181

Defenders of the Light

Hi, I've been making my own campaign and I'm really happy with the process. Now I have question, is it possible to create a TempPoint with 2 conditions.

To be specific, I want to move a unit to that point which has to satisfy 2 conditions.
- The point has to be in a specific region.
- The point has to be a certain distance between itself and another unit.

Is it possible to make a point like that?

Thank you.
 
Yes, you can use these conditions:

(Real Comparison)
  • (Distance between POINT_A and POINT_B) Greater than or equal to XXX.XX
(Boolean Comparison)
  • (Rect XXX <gen> contains POINT) Equal to True
Note that I wrote Rect in the last condition, but the trigger editor will display it as Region instead.
 
Last edited:
Yes, you can use these conditions:

(Real Comparison)

could you clarify here?
where are the units; is their distance static; are they inside a special region, too; what's the relation?

Seems like we misunderstood each other. The question wasn't really clear and my grammar up wasn't even correct either.
To be clear, if you look at the picture, I want to make a point for the ranger to move in that region but also not too close to the paladin.
However, setting variables as a point doesn't let me choose both of these conditions at once (as I can see).

Point.png
 
There is surly some kind of math way to do that but here a recursive way: Be aware if the Area is smaller than 600 it will crash or something other unwanted happens:
  • Event
    • Ereignisse
      • Your Event
    • Bedingungen
    • Aktionen
      • -------- Find Random Point in Area beeing 600 atleast away from Paladin --------
      • Trigger - Run Find Point in Rect <gen> (ignoring conditions)
      • Unit - Order Paladin 0000 <gen> to Move to Loc
      • call RemoveLocation(udg_Loc)
  • Find Point in Rect
    • Ereignisse
    • Bedingungen
    • Aktionen
      • Set Loc = (Random point in Area <gen>)
      • Set TempLoc = (Position of Paladin 0000 <gen>)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Distance between Loc and TempLoc) smaller as 600.00
        • Then - Actions
          • -------- To near find other One --------
          • Custom script: call RemoveLocation(udg_Loc)
          • Custom script: call RemoveLocation(udg_TempLoc)
          • Trigger - Run (This trigger) (ignoring conditions)
        • Else -Actions
          • -------- Found One --------
          • Custom script: call RemoveLocation(udg_TempLoc)
          • -------- Loc is now The Point you are Looking for --------
 
Status
Not open for further replies.
Back
Top