Completly Removing Unit Collision on a Ship

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
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
889
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: 103

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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top