• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Walk inside the water

Status
Not open for further replies.
Level 29
Joined
Jul 29, 2007
Messages
5,174
I remember I once played in the ONLY map I ever saw (and belive me... I saw enough for a persons full life span !) that you can swim on the water with naga units, AND you can also go under the water (and no its not an "illusion", you could actualy walk like normal ground but inside the water).
How is that possible ? :confused:
Someone here knows how to make that ? (it will probably need JASS :cry:)
 
Level 10
Joined
Sep 21, 2007
Messages
517
lol i thought i already sent a private message, here is the trigger again, ALSO REMEMBER No SHALLOW WATER FOR SWIMMING (read private message): also add units that will swim into this unit group (group)
lol i just noticed i always help and never get rep lol
just the satisfaction of people for me is enough ;)
EDIT: il make their heads float out when swimming just a sec, leme do some trial and error. Though it may look wierd when they are going extremely near water like in an edge of a cliff. Give me a reply and il put floating as a part of it.
  • MakeUnitsSwim
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • -------- Requirements --------
      • -------- Group - Unit Group Variable --------
      • -------- Water - Integer Variable --------
      • -------- Land - Integer Variable --------
      • -------- UnitLocation - Point Variable --------
      • -------- DegreeLocations - Point Array Variable --------
      • Unit Group - Pick every unit in Group and do (Actions)
        • Loop - Actions
          • Set Water = 0
          • Set Land = 0
          • Set UnitLocation = (Position of (Picked unit))
          • Set DegreeLocations[0] = (UnitLocation offset by 25.00 towards (Facing of (Picked unit)) degrees)
          • Set DegreeLocations[1] = (UnitLocation offset by 50.00 towards (Facing of (Picked unit)) degrees)
          • Set DegreeLocations[2] = (UnitLocation offset by 75.00 towards (Facing of (Picked unit)) degrees)
          • Set DegreeLocations[3] = (UnitLocation offset by 100.00 towards (Facing of (Picked unit)) degrees)
          • Set DegreeLocations[4] = (UnitLocation offset by 125.00 towards (Facing of (Picked unit)) degrees)
          • Set DegreeLocations[5] = (UnitLocation offset by 150.00 towards (Facing of (Picked unit)) degrees)
          • Set DegreeLocations[6] = (UnitLocation offset by 175.00 towards (Facing of (Picked unit)) degrees)
          • Set DegreeLocations[7] = (UnitLocation offset by 200.00 towards (Facing of (Picked unit)) degrees)
          • For each (Integer A) from 0 to 7, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Terrain cliff level at DegreeLocations[(Integer A)]) Less than 1
                • Then - Actions
                  • Set Water = (Water + 2)
                  • Unit - Turn collision for (Picked unit) Off
                • Else - Actions
                  • Set Land = (Land + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Water Greater than Land
            • Then - Actions
              • Unit - Turn collision for (Picked unit) Off
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Terrain cliff level at UnitLocation) Less than 1
                • Then - Actions
                  • Unit - Move (Picked unit) instantly to DegreeLocations[7]
                  • Unit - Turn collision for (Picked unit) On
                • Else - Actions
                  • Unit - Turn collision for (Picked unit) On
          • -------- Remove Memory Leaks ~~ --------
          • Custom script: call RemoveLocation(udg_DegreeLocations[0])
          • Custom script: call RemoveLocation(udg_DegreeLocations[1])
          • Custom script: call RemoveLocation(udg_DegreeLocations[2])
          • Custom script: call RemoveLocation(udg_DegreeLocations[3])
          • Custom script: call RemoveLocation(udg_DegreeLocations[4])
          • Custom script: call RemoveLocation(udg_DegreeLocations[5])
          • Custom script: call RemoveLocation(udg_DegreeLocations[6])
          • Custom script: call RemoveLocation(udg_DegreeLocations[7])
          • Custom script: call RemoveLocation(udg_UnitLocation)
 
Last edited:
Level 10
Joined
Sep 21, 2007
Messages
517
lol i thought i already sent a private message, here is the trigger again, ALSO REMEMBER No SHALLOW WATER FOR SWIMMING (read private message): also add units that will swim into this unit group (group)
lol i just noticed i always help and never get rep lol
just the satisfaction of people for me is enough ;)
EDIT: il make their heads float out when swimming just a sec, leme do some trial and error. Though it may look wierd when they are going extremely near water like in an edge of a cliff. Give me a reply and il put floating as a part of it.
  • MakeUnitsSwim
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • -------- Requirements --------
      • -------- Group - Unit Group Variable --------
      • -------- Water - Integer Variable --------
      • -------- Land - Integer Variable --------
      • -------- UnitLocation - Point Variable --------
      • -------- DegreeLocations - Point Array Variable --------
      • Unit Group - Pick every unit in Group and do (Actions)
        • Loop - Actions
          • Set Water = 0
          • Set Land = 0
          • Set UnitLocation = (Position of (Picked unit))
          • Set DegreeLocations[0] = (UnitLocation offset by 25.00 towards (Facing of (Picked unit)) degrees)
          • Set DegreeLocations[1] = (UnitLocation offset by 50.00 towards (Facing of (Picked unit)) degrees)
          • Set DegreeLocations[2] = (UnitLocation offset by 75.00 towards (Facing of (Picked unit)) degrees)
          • Set DegreeLocations[3] = (UnitLocation offset by 100.00 towards (Facing of (Picked unit)) degrees)
          • Set DegreeLocations[4] = (UnitLocation offset by 125.00 towards (Facing of (Picked unit)) degrees)
          • Set DegreeLocations[5] = (UnitLocation offset by 150.00 towards (Facing of (Picked unit)) degrees)
          • Set DegreeLocations[6] = (UnitLocation offset by 175.00 towards (Facing of (Picked unit)) degrees)
          • Set DegreeLocations[7] = (UnitLocation offset by 200.00 towards (Facing of (Picked unit)) degrees)
          • For each (Integer A) from 0 to 7, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Terrain cliff level at DegreeLocations[(Integer A)]) Less than 1
                • Then - Actions
                  • Set Water = (Water + 2)
                  • Unit - Turn collision for (Picked unit) Off
                • Else - Actions
                  • Set Land = (Land + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Water Greater than Land
            • Then - Actions
              • Unit - Turn collision for (Picked unit) Off
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Terrain cliff level at UnitLocation) Less than 1
                • Then - Actions
                  • Unit - Move (Picked unit) instantly to DegreeLocations[7]
                  • Unit - Turn collision for (Picked unit) On
                • Else - Actions
                  • Unit - Turn collision for (Picked unit) On
          • -------- Remove Memory Leaks ~~ --------
          • Custom script: call RemoveLocation(udg_DegreeLocations[0])
          • Custom script: call RemoveLocation(udg_DegreeLocations[1])
          • Custom script: call RemoveLocation(udg_DegreeLocations[2])
          • Custom script: call RemoveLocation(udg_DegreeLocations[3])
          • Custom script: call RemoveLocation(udg_DegreeLocations[4])
          • Custom script: call RemoveLocation(udg_DegreeLocations[5])
          • Custom script: call RemoveLocation(udg_DegreeLocations[6])
          • Custom script: call RemoveLocation(udg_DegreeLocations[7])
          • Custom script: call RemoveLocation(udg_UnitLocation)
 
Last edited:
Level 10
Joined
Sep 21, 2007
Messages
517
ahh lol whats gmail email >_< sorry i ever really use MSN hotmail :D
btw man the trigger i previously posted or the one you saw is the same as my previous post since i copy/pasted it since the previous post wouldnt change so i just deleted previous post, though this trigger works fine >> my testmap shows you that it works fine n stuff and it debugs a problem when if your map has water extending outside of the map itll just send it to another place.
 
Last edited:
Level 3
Joined
Apr 7, 2007
Messages
48
I think i know the map you are talking about ... Water Wars - Sumberged is the name.

The under-water thing your talking about invovles 2 maps, 1 above and 1 below water. You use a skill to swim to the surface or underwater. When you use the skill it warps you to the equivalent location on the other map, provided you arent trying to swim into a wall or w/e. I hope this helps.
 
Level 3
Joined
Apr 7, 2007
Messages
48
Have 2 equal sized areas and the offset is like the X/Y coords for the area, checking that and then moving the unit to the same offset in the other area is what makes them appear to "swim to the surface".

Also the way to not make the map small is to make it epic sized =)
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Ok, so basicly you mean that if the map will be 256x256 and we make a left side and a right side, the ground level left, and depths of water on the right, I will need to make the unit teleport to X(Map Size/2 ) Y(0) so the unit will be needed to move X(128)Y(0) and to the other side X(-128)Y(0) ?
 
Level 10
Joined
Sep 21, 2007
Messages
517
lol waste of map size ;D >_< Math along with physics can perfect such a system, my trigger works and it was just a demonstration ;) it can be perfected with x/y coord and Location z and such though im using gui and i cant add as much actions else it will become laggy. >>
so ghostwolf how is the trigger working for you?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Your trigger is working nice, found 1 bug though and I have 2 questions.

First the bug - when you get close to the ground, the unit automaticly teleports unto the ground even if your not close (I think this could be fixed with just lowering the loc's offset from unit?).

Now, is it possible making the ground to be a ramp instead of a cliff ?

And last one, is it possible (probably yes) that the water will be much higher ? because I want the player to actualy feel like he is in the water so camera will go down to the depths :wink:
 
Level 10
Joined
Sep 21, 2007
Messages
517
1)Well that bug was kind of intentional though but i can fix it for you but it may cause other bugs, hopefully it wont.

2) i dont think so, not so much of a terrainer besides, if you make the cliff a ramp my trigger wont work since it compares with cliff heights though it can be adjusted to ground heights if you use ramps instead of cliffs even tho i dont know how. Though im thinking you should change a custom cliffs textures into looking like a ramp but im pretty sure your not a modeler :D

3) yea its possible, it must include alot of elements though also a Multi Player Inhanceable Fade because in water when you go in it and the camera is there, it shows it as if its normal ground that is below the sea. il do the trigger for you. also one more thing, itll be harder to move using the "move" command >_<
 
you want reallly low water? you have to mark check on something for the preferences but when you do, you will be able to make flat water, then you can lower the ground where the flat water is to however deep you want. you make a cliff, a +1 cliff, just one square of it, then use shallow water on that cliff, but Keep holding the mouse, then you can drag it across the ground and create flat water!
 
Level 3
Joined
Oct 14, 2007
Messages
37
Underwater World

I am making a map called The Triwizard Tournament and I also stumbled upon this problem.

A link is included tot he map which has this "Underwater World" To access it do this:

Start the game
Enjoy the cinematic (you cant skip it, but its good to watch anyways, especially with sound)
When you see Task one appear, either play thru it or to skip it type -Task 2
Enjoy the Into-Cinematic
Enjoy the Underwater World

As you know, task 2 is entirely underwater and the normal water in the game, if you move the camera below it, it will look like normal ground and the water will disappear completely. So what I did was....

Created my own, i started out with some terrain and used the noise thing to randomize it, then I put bubbles in it, and changed the fog to dark blue, I also made a weather effect..moonlight

That made it look like an underwater world, now another problem I stumbled upon is making the unit the 4 champions use..actually swim. I used a naga Mur'gul Reaver, since his swim animations are the closest I found to the Humans, and went to the object editor

Under Art - Required Animation Names, I put "swim", what this did is, any animation the unit ever plays, MUST have the word "swim" in its name, which forced the unit to always look like hes swimming, after this, set a height and set movement type to Fly, Problem Solved

NOTES: Because Movement type is "Fly" this means that the unit will go over mountains and such, for any places you do not want the unit to access, put borders or air-pathing blockers, Im including a copy of my map so you can see what Im talking about

If you wana make a trigger that Teleports a unit to another part of the map based on position, like in Water Wars, look in my map for a trigger that teleports a single unit, this is what you want (I created it from scratch)
 

Attachments

  • The Triwizard Tournamentv1.10.w3x
    1.5 MB · Views: 29
Status
Not open for further replies.
Top