• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Creating TempPoint with 2 conditions

Status
Not open for further replies.
Level 13
Joined
May 13, 2017
Messages
163
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.
 
Level 13
Joined
May 10, 2009
Messages
868
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:
Level 13
Joined
May 13, 2017
Messages
163
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 --------
 
Level 13
Joined
May 13, 2017
Messages
163
That really helps Tasyen. However, I'm not sure about the engine of warcraft 3 myself so do you know how well do the triggers work during combat? Cause it's not just setting a point, it's going through a whole set of triggers to find one right point.
 
Status
Not open for further replies.
Top