When using "create 1 unit at X point on map"

Lightstalker

New Member
Reaction score
55
When using "create 1 unit at X point on map facing X angles", sometimes it will appear stuck in a bunch of trees (forest for example). Anyway to prevent this from happening?
 

chovynz

We are all noobs! in different states of Noobism!
Reaction score
130
Condition: Check
if destructibles are in 200 range,
then
else
create 1 unit at X point on map facing X angles
 

Curo

Why am I still playing this game...?
Reaction score
109
If there is ground space at the point you want to create a unit at, it will be created there, even if the unit cannot escape. I don't see what is wrong with this; just don't cast abilities targeting a bunch of trees :p

Either that or make the groups of trees in your map with no gaps in between.
 

Lightstalker

New Member
Reaction score
55
If there is ground space at the point you want to create a unit at, it will be created there, even if the unit cannot escape. I don't see what is wrong with this; just don't cast abilities targeting a bunch of trees :p

It's wrong for what I want to do...
 

Azlier

Old World Ghost
Reaction score
461
Hmm... Maybe you should move the unit instantly to its own position after creation. Move Unit Instantly obeys pathing.
 

Azlier

Old World Ghost
Reaction score
461
Me said:
instantly to its own position after creation

Still not totally sure if that would work or not. Testing is required.

AceHart said:
Unverified. For educational purposes only.
 

Nexor

...
Reaction score
74
you should make a loop where you check everytime the loop runs the doodads around the unit, and if there isnt any of them then crete else increse the loop integer.
 

Curo

Why am I still playing this game...?
Reaction score
109
I'm kind of on the same thought plane as the thread creator. I can't find a condition that checks the number of destructibles/doodads in range.
 

CaptDeath

New Member
Reaction score
103
what azilier said works cause you can move a unit anywhere instantly w/o checking pathing but if you order it to move any were it will be moved to the closet path able area
i forgot if it will start moving to said point lol but i do now hell be moved
 

Curo

Why am I still playing this game...?
Reaction score
109
what azilier said works cause you can move a unit anywhere instantly w/o checking pathing but if you order it to move any were it will be moved to the closet path able area
i forgot if it will start moving to said point lol but i do now hell be moved

Translation: You can't move a unit to its own position because there is already a unit at that position (the unit you are trying to move). So, it will move to the nearest pathable area, which may or may not be outside your group of trees.

(Don't get offended; I translated because of the bolded words. You said 2 different things about "moving a unit anywhere".)
 

Azlier

Old World Ghost
Reaction score
461
Lightstalker `[]P'''''' Azlier
Yeah, that's a pistol.^

5 Kills killing spree! Press < to call in recon.
 

OogaBooga

New Member
Reaction score
0
Similar Problem

I had a similar problem on my own map. I have very mountainous terrain, and my random spawn trigger would frequently spawn units on hills where they were unable to move from. The trigger would also completely ignore the pathing map, so I was totally baffeled, as a similar trigger that spawned items randomly was working perfectly.

I never did find a solution, but the idea of using the "instantly move unit" trigger won't work, I tried that :(

If someone really does find a solution to this, I'd love to hear it.
 

Curo

Why am I still playing this game...?
Reaction score
109
Oh ya, now I remember. If you create unitA at the position of unitB and remove the unitB in the same trigger, unitA will be placed near, but not at the position of unitB. Guess its not the same with moving a unit, sorry :( -rep myself.
 

eXirrah

New Member
Reaction score
51
There is a condition check of this type:

((Random destructible in Region 000 <gen>) is alive) Equal to True

but if this is not suitable for you just find another way to determine if the location is spawnable or not. For example place some sort of specific terrain under the destructables like grass and check if the spawning point of the unit is equal to grass, if it is run the spawning system again until the terrain under the spawning point is not equal to grass.....
Trigger:
  • Untitled Trigger 002
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Random destructible in (Region centered at (Spaw Position Of The Unit) with size (100.00, 100.00))) is alive) Equal to True &lt;- if there is at least 1 destructable in the region that is alive then don&#039;t spawn the unit....
        • Then - Actions
          • Run this trigger again
        • Else - Actions
          • Create the unit


EDIT: Forgot to mention that if you didn't edit the destructables data, the dead destructables doesn't have pathing data and are walkable. That's why you check for alive destructables.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top