Completly Removing Unit Collision on a Ship

Ghan

Administrator - Servers are fun
Staff member
Reaction score
890
Wow, I'm out of ideas. :( I have no idea how to accomplish what you want.
 

Demonfaze

8 yrs. Hell, it's been a long time.
Reaction score
72
It's okay, thanks for trying. :)

Also I tested by making a footman with ghost, and it could walk through all other units on land. All I did was change its pathing from foot to float and it stopped working. Therefore the problem has to do with its movement type.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
890
Well, that's something, at least. But you can't change the movement type of the ship, because something or other would go wrong. Closest would probably be Hover, though.
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
You got four options!
Option A: Add windwalk and ye..rofl

Option B: Create several regions, wherever there is water, if the boat leaves a region turn collision on, if it enters turn it off...Or you can make it every 0.05 sec, count every ships that are NOT in water, and turn collision on for those, meaning, they got one way, that is back to water...(you got regions at the terrain changing - water/cliff)...

Option C: try yourself out with the function "environment - Turn terrain pathing on /off"... That might work? And give your boat Air move, so it can fly through the other ships, jsut have it height at 0, yeye I know you get it...And then disable pathing for air, at various regions...(at the edges of water...hmm Hope you got a very SQUARE MAP! or else, LOADS OF REGIONS;)


(sry, option A,B,C not very well described...those were actully just to get your mind to work a bit;))
Option D: The best one, that I would have used: Ehm, I'll attach a picture so you also see how you are going to do the terrain... It has to be PERFECT inside the cliff heights, like the picture. So there are no "bugs in the terrain pathing with the boat"... Then a trigger like this:
Code:
TT
    Events
        Time - Every 0.10 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Terrain type at (Position of Human Transport Ship 0008 <gen>)) Equal to Lordaeron Summer - Dirt
            Then - Actions
                Unit - Turn collision for Human Transport Ship 0008 <gen> Off
            Else - Actions
                Unit - Turn collision for Human Transport Ship 0008 <gen> On
Now, ofc, that is not a PROPER made trigger, leaks etc.. but I saw your number of posts before replying...So, yes, I believe you can manage to solve the rest for yourself, I just created a "picture" in your mind, hopefully...
If you didnt get this to work, reply /pm me, I might create this for you...

Cheerio,<3 it all depends on how important it is to accomplish this "Boat goes through boat thing"...:)
Quoting myself "ManyTimes Rocks My World"

Edit; the picture shows how to place the , in my case (the trigger I show) any kind of terrain that is NOT Lordareon Summer - Dirt!
(sry if you knew it or not, or ... If so, it were just a reminder, that you have to think of that when you are doing this boat-ghost thing<3)

Edit2; remember that (Terrain type at (Position of Human Transport Ship 0008 <gen>)) Equal to Lordaeron Summer - Dirt
that does not give true/false on a Cliff that is Dirt...and if you have made "snow" terrain like the picture ehm..fack, how do I explain this?...Well, you see the picture, yes, if you change cliff to Grass via > Replace cliff type (or something, dont remember, but you get the picture)... it will still be recognized as Dirt...(jesus, i suck at explaning, at least sometimes...:D)
 

Attachments

  • Boatthingy.jpg
    Boatthingy.jpg
    147.9 KB · Views: 107

Demonfaze

8 yrs. Hell, it's been a long time.
Reaction score
72
Thanks for the help ManyTimes, you sound like a friendly person. :cool:

Wind walk doesn't work in water unfortunately. I already tried that.

Interesting way of doing that. Although I don't plan on using regions to accomplish it, I plan on using cliff height comparisons instead. I wouldn't have thought of it though, without your post.

I'm giving you rep for your effort, thank you so much.
 

WindexGlow

New Member
Reaction score
54
A way I did: Simply set the movement type to 'flying'. This allows units to never run into each other.
Now they can naturally go onto the land, put air movement blockers all along the shore and you should have your problem fixed.

Make sure you set group separation so it doesn't work.
 
D

Down

Guest
Helper.jpg


function Trig_Untitled_Trigger_001_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_MECHANICAL) == true ) ) then
return false
endif
return true
endfunction

function Trig_Untitled_Trigger_001_Func001C takes nothing returns boolean
if ( not ( GetTerrainCliffLevelBJ(GetOrderPointLoc()) > 1 ) ) then
return false
endif
return true
endfunction

function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
if ( Trig_Untitled_Trigger_001_Func001C() ) then
call SetUnitPathing( GetOrderedUnit(), true )
else
call SetUnitPathing( GetOrderedUnit(), false )
endif
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_001, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( gg_trg_Untitled_Trigger_001, Condition( function Trig_Untitled_Trigger_001_Conditions ) )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction





This trigger is Perfect for you, when a mech unit targets land that is greater than sea level it turns its collision on, and when it targets sea level it turns its collsion off i would send you a screen shot of the trigger its rather simple but photo bucket doesnt want to tell me my username :(
 

Sooda

Diversity enchants
Reaction score
318
Why you convert GUI to JASS without changing anything ?

1) JASS solution, create one huge rect what covers your water shores. Add it to region and use event unit enters region. If your boat enters into it add collision, when leaves remove collision. It would be really optimized and works perfectly.

2) JASS solution, create trigger what periodically checks unit position location Z value. If it is greater than water level add collision if not remove it. For performance use only one trigger, but add all your ghoust ships to loop and check their location Z with same trigger.
JASS:
native GetLocationZ             takes location whichLocation returns real


3) Odd solution, create dummy units near your water shores and add to trigger event unit comes in range of X. If it is your Ghoust Ship(s) add collision.
With this method you still have to keep track that they leave from unit range to lose collision again. For that you could place another "lane" from shore into water so when units comes range of them you can again remove collision.
First solution is best but maybe hard to do.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top