How to land on "landable" place

_markone_

New Member
Reaction score
0
Ok guys here is my problem

I made some simple jump spell,

paused unit,
made invulvare,
added crow form,
moved for 0.01 sec for some time at some direction,
remove crow form,
remove inv,
unpause unit...

now problem is that sometimes happens that my unit land on place what is not "landable" like between 2 hills....

is there anyway to solve this?

thx
markone
 

Ancient-wolf

New Member
Reaction score
22
Code:
E
A unit enter region no land <gen>
C
A
Unit - Move entering unit instantly to region land <gen>
 

Insane!

Shh I didn't edit this, go away.
Reaction score
122
Do an if then else

If
Walkablity is on at Temppoint = true

do actions
 

Blackrage

Ultra Cool Member
Reaction score
25
or, create a dummy unit, WITH collision, and then move unit (instantly) to the dummy's position. Needs a variable, and use this at the end of the spell
 

gref

New Member
Reaction score
33
As I think Blackrage was trying to say...

Create a dummy unit, move it to the place your unit is going to want to land, and see how far away from there it ends up. The idea is, that if the area is pathable the dummy unit will be put on there exactly, but if it isn't pathable it will be spawned in the closest pathable place.
 

_markone_

New Member
Reaction score
0
Create a dummy unit, move it to the place your unit is going to want to land, and see how far away from there it ends up. The idea is, that if the area is pathable the dummy unit will be put on there exactly, but if it isn't pathable it will be spawned in the closest pathable place.
is this really works? it looks like the best-easiest solution to me
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
but to the dummy will happen the same like to your caster (then both of your units will be imprisoned)
 

gref

New Member
Reaction score
33
is this really works? it looks like the best-easiest solution to me

That is the system used by pretty much every good jump system I've seen.
You use it on Unit Begins Casting, check for if it's pathable (or somewhere near it is, Distance between(target point, Position of dummy) < 100.0 units) and if it is jump, if not order the caster to stop/move to where they currently are to cancel the spell.

The pathing walkable solution only works if there aren't any doodads on your map. At all.
 
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