• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Creating units on cliff edge?

Status
Not open for further replies.
Level 14
Joined
Apr 20, 2009
Messages
1,543
So basically, I'm creating a spell where I need to create some dummy units on top of cliff edges.
The problem with this is that whenever you create a unit on top of a place that has pathing, it will automatically be instantly moved to the closest pathable place.
I need to find a workaround for this issue.

Anyone has any idea?
(I'm not looking for a pathing blocker solution with flying movement type ಠ_ಠ)


EDIT: pfff okay I'll use flying movement type >.> Too much work to find a workaround when this can simply be used for the dummy's... (Less function calls too)
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Unfortunately nope :/

JASS:
native CreateUnit takes player id, integer unitid, real x, real y, real face returns unit

native CreateUnitAtLoc takes player id, integer unitid, location whichLocation, real face returns unit

native CreateUnitAtLocByName takes player id, string unitname, location whichLocation, real face returns unit

function CreateUnitAtLocSaveLast takes player id, integer unitid, location loc, real face returns unit
    if (unitid == 'ugol') then
        set bj_lastCreatedUnit = CreateBlightedGoldmine(id, GetLocationX(loc), GetLocationY(loc), face)
    else
        set bj_lastCreatedUnit = CreateUnitAtLoc(id, unitid, loc, face)
    endif

    return bj_lastCreatedUnit
endfunction

native CreateUnitByName takes player whichPlayer, string unitname, real x, real y, real face returns unit

native CreateUnitPool takes nothing returns unitpool

By the way, bah I need to make a height offset for the flying movement type -,-.
It's a pain in the @ss to combine this with GetLocationZ(Loc) due to the inregularity of terrain height in the map I'm supposed to create this.
Eithor ways this problem would arise anyways even without this threads question.

So for solving it:
Thanks for your help rulerofiron99 a well deserved rep for you ;)
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
So basically, I'm creating a spell where I need to create some dummy units on top of cliff edges.
The problem with this is that whenever you create a unit on top of a place that has pathing, it will automatically be instantly moved to the closest pathable place.
I need to find a workaround for this issue.

Anyone has any idea?
(I'm not looking for a pathing blocker solution with flying movement type ಠ_ಠ)


EDIT: pfff okay I'll use flying movement type >.> Too much work to find a workaround when this can simply be used for the dummy's... (Less function calls too)

flying movement type allways the best way, coz it also can avoid few other potentional obstacle (if have something else too on cliff)
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
flying movement type allways the best way, coz it also can avoid few other potentional obstacle (if have something else too on cliff)

I'm having the exact same problem and I know exactly what you mean.
Also, sorry about the vitualbox thing shadow, tell me if you still want it setup and if so it might be useful to make an appointment on doing it.
(Sounds stupid, I know :S)
I seriously have like no time :(
People want too much from me apparantly 0.o

I'm currently working on a website which displays CVE (Common Vulnerabillities and Exposures)
records and data throughout a spiderweb grid which is entirely interactible and shows CVSS
(Common Vulnerabillity Scoring System) information on both CPE (Common Platform Enumeration) and CVE ^.^

To those who want to know: microsoft is least secure, then comes apple and then comes linux ofc ;)
 
Status
Not open for further replies.
Top