• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Spell: Water Walking

Status
Not open for further replies.
Level 15
Joined
Jul 6, 2009
Messages
889
Perhaps have the ability based on metamorphosis which turns the hero into another unit with ampibious movement? Or will this not work? Try it :3 You can check by timer when the spell ends, or when the unit is no longer the other type. But I do wonder if movement types actually change with metamorphisis.
 
Level 31
Joined
Jun 27, 2008
Messages
2,556
Oh, this spell works just fine, defskull, but there is one problem. There are 81 heroes with different spells, and in this case it would require 81 different item spells referring to normal and change form, 81 more heroes with Amphibious and 81 more items. I guess I will trigger it old fashion way.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
So there would be 81 possibilities that a unit will take that item ?
Are you sure all those 81 Heroes can get the possibility to gain this item ?
Epic.

I guess setting variables is not a hard work, but creating data inside Object Editor, yeah it is.
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
There is another method, but it will make the heroes practically useless on water.

When they begin water walking, you create a flying dummy unit, which becomes auto selected for the player. Then you use SetUnitX / SetUnitY to the dummy's position - this completely ignores pathing. Animate the hero with a looping trigger.
If the hero absolutely has to be selected, trigger it to set his movement speed to 1, and loop (0.03 sec) his position to in front of him.

I could whip up a testmap, if you're interested?
 
Level 31
Joined
Jun 27, 2008
Messages
2,556
I have created an item already, it works well, except that it have some issues when amphibious unit is on water. What to add to this trigger so that when Soul expire on water, hero die? Something like in defskull's map perhaps? Don't mind the leaks, I suck at it.

Item description:

Necklace of Soul Release

Odd and mysterious necklace. It is said by Windwalkers that these kind of jewelries are strongly linked to carrier's soul and inner strength.

Separate caster from his soul when used. Body of carrier may stay in trance when one's soul may be minipulated. Amphibious soul is very fast, yet very vulnerable. When timer expire, caster is instanly moved into soul's position and fuse with soul awakening hero from trance. Last for 5 seconds. Cooldown: 10 seconds.


  • Soul Release Cast
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Necklace of Soul Release
    • Actions
      • Special Effect - Create a special effect attached to the origin of Hero using WhiteElement.mdx
      • Special Effect - Destroy (Last created special effect)
      • Sound - Play DevourMagic <gen>
      • Unit - Change ownership of Hero to Neutral Passive and Retain color
      • Unit - Create 1 Atemu's Soul for Player 1 (Red) at (Position of Hero) facing Default building facing degrees
      • Set Soul = (Last created unit)
      • Camera - Lock camera target for Player 1 (Red) to (Last created unit), offset by (0.00, 0.00) using Default rotation
      • Selection - Select (Last created unit)
      • Cinematic - Fade out over 0.50 seconds using texture Dream and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Wait 5.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Soul is dead) Equal to True
        • Then - Actions
          • Cinematic - Fade in over 0.50 seconds using texture Dream and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
          • Unit - Change ownership of Hero to Player 1 (Red) and Retain color
          • Camera - Lock camera target for Player 1 (Red) to Hero, offset by (0.00, 0.00) using Default rotation
          • Selection - Select Hero
          • Unit - Kill Hero
          • Skip remaining actions
        • Else - Actions
      • Cinematic - Fade in over 0.50 seconds using texture Dream and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Unit - Move Hero instantly to (Position of Soul)
      • Unit - Change ownership of Hero to Player 1 (Red) and Retain color
      • Unit - Remove Soul from the game
      • Camera - Lock camera target for Player 1 (Red) to Hero, offset by (0.00, 0.00) using Default rotation
      • Special Effect - Create a special effect attached to the origin of Hero using WhiteElement.mdx
      • Special Effect - Destroy (Last created special effect)
      • Sound - Play DevourMagic <gen>
      • Selection - Select Hero
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
If he were to use that method, lol, you would leave a Player in puzzled, because once he activates it, the select would go to the Dummy, right ?
Assuming that the dummy uses none.mdx model, the potrait is changed to black, Damage/Armor/Attribute/Attribute Point/Ability List/etc is not shown same as Caster.

People would know a dummy is created, kinda lol if you ask me.

@APproject
Why don't you just copy my trigger ?
Ah I used local, and the only way to access the unit is via Custom script.

Btw, the condition is;
  • Actions
    • Wait 5.00 seconds
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Soul is dead) Equal to True
      • Then - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Terrain pathing at (Position of (Triggering unit)) of type Amphibious Pathing is off) Equal to False
          • Then - Actions
            • -------- Unit Safe --------
          • Else - Actions
            • -------- Kill Unit --------
      • Else - Actions
Make this check AFTER the duration.
 
Level 31
Joined
Jun 27, 2008
Messages
2,556
It should be different. If soul is dead - hero die, if soul timer expire while soul is on water - hero die too. This trigger won't work when soul is on water, I guess condition is wrong. Hero cannot be moved on water, it is just placed to nearby shore, so hero's pathing is always solid ground no matter what.

What condition should replace Terrain Pathing one?

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Soul is dead) Equal to True
          • (Terrain pathing at (Position of Soul) of type Amphibious Pathing is off) Equal to True
    • Then - Actions
      • -------- Kill hero --------
    • Else - Actions
      • -------- Save hero --------
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
well, but isnt terrain pathing of Amphibious on(off == false means on) everywhere?
The script itself it in 'reverse' effect

Well, you see, ...Amphibious Pathing is off Equal to True
You see that, when False meets True, it becomes what ?
Yes, False.

IF and only IF, the function is like this;
...Amphibious Pathing is on Equal to True
True meets True is ? Yes, True.

On - True
Off - False

It's a bit confusing, but this is the basic argument that you should understand.
 
Level 31
Joined
Jun 27, 2008
Messages
2,556
the trigger as you have it will only work for one player, is this what you want?
Yes, it is single player. But height is not constant.
It's False, not True.
If it was false, it kills unit and it won't work together with Soul is Dead at all.

Alright, I made it work: (Had to use Walkability instead of Amphibious, because Amphibious pathing is ON on ground and water)

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Soul is dead) Equal to True
    • Then - Actions
      • -------- Kill Hero --------
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terrain pathing at (Position of Soul) of type Walkability is off) Equal to False
        • Then - Actions
          • -------- Save Hero --------
        • Else - Actions
          • -------- Kill Hero --------
Thanks for the help, guys.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I used "Amphibious Pathing" because the unit would checked if he's in Water or not (wait, amphibious pathing occurs on Ground too? NO!)
If you use "Walkability", the trigger will check if the pathing is now walkable or not.
You assume that walkability = false when it's on Water only, right ?

Well no, cliffs (if you're flying unit) makes Walkability = false, too, so be careful when using that trigger to not having your checked unit to wander around cliffs because it will treat it as Walkability = False.

I'll be running on an experiment does Amphibious Pathing = True when on Ground, will post a test map.

EDIT:
Ok, you were right, Amphibious Pathing treats Ground = True, so in this case you can't use Amphibious Pathing as comparison.
Well I guess Walkability is the good choice, but careful about the cliffs I told you okay ?

EDIT 2:
Okay use this, this will evaluate if your unit is in Water or Ground;
  • (Terrain pathing at (Position of Naga Myrmidon 0000 <gen>) of type Floatability is off) Equal to False
Test map is here too.
 

Attachments

  • Amphibious Pathing Test.w3x
    14.8 KB · Views: 50
Level 14
Joined
Aug 8, 2010
Messages
1,022
I don't know what you've talked, guys, but i have an idea. If invisible platforms can be created trough triggers, then you simply have to dynamically create platforms below the hero so that he can waterwalk.

EDIT : They can be created trough triggers. So my idea should work.
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Terrain height is a known cause of desyncs, something about the heightmap being rendered individually on each client PC. There was recently a thread about it, and you can test it yourself by spamming periodic terrain deformations and playing in multiplayer.

If you can add some walkability without changing the terrain height, this won't be a problem.

That just made me realise:
  • Environment - Set terrain pathing at (Center of (Playable map area)) of type Walkability to On
This action sets the pathing of a single cell (16 cells in a terrain tile). Testing quick to see if it does the trick!

EDIT: Alright so it works, except that the unit will walk under the water. Fix this by changing the unit's height to ((height of water level) - GetLocationZ(unit)).
  • For each (Integer A) from 1 to (Integer(((Width of Region 000 <gen>) / 32.00))), do (Actions)
    • Loop - Actions
      • For each (Integer B) from 1 to (Integer(((Height of Region 000 <gen>) / 32.00))), do (Actions)
        • Loop - Actions
          • Environment - Set terrain pathing at ((Center of Region 001 <gen>) offset by (((Real((Integer A))) x 32.00), ((Real((Integer B))) x 32.00))) of type Walkability to On
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Terrain height is a known cause of desyncs, something about the heightmap being rendered individually on each client PC. There was recently a thread about it, and you can test it yourself by spamming periodic terrain deformations and playing in multiplayer.
Fortunately his map is Single-player so there's no need to complicate over a simple matter.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Terrain height is a known cause of desyncs, something about the heightmap being rendered individually on each client PC. There was recently a thread about it, and you can test it yourself by spamming periodic terrain deformations and playing in multiplayer.

If you can add some walkability without changing the terrain height, this won't be a problem.

That just made me realise:
  • Environment - Set terrain pathing at (Center of (Playable map area)) of type Walkability to On
This action sets the pathing of a single cell (16 cells in a terrain tile). Testing quick to see if it does the trick!

EDIT: Alright so it works, except that the unit will walk under the water. Fix this by changing the unit's height to ((height of water level) - GetLocationZ(unit)).
  • For each (Integer A) from 1 to (Integer(((Width of Region 000 <gen>) / 32.00))), do (Actions)
    • Loop - Actions
      • For each (Integer B) from 1 to (Integer(((Height of Region 000 <gen>) / 32.00))), do (Actions)
        • Loop - Actions
          • Environment - Set terrain pathing at ((Center of Region 001 <gen>) offset by (((Real((Integer A))) x 32.00), ((Real((Integer B))) x 32.00))) of type Walkability to On

Wait, are you talking about cold bone's suggestion (Invisible Platforms) ?
Or about my suggestion (Environment Condition) ?

Which would cause a desync (in your statement) ?

Hey, that sounds like a good idea.
Dynamically creating Invisible Platform is not a good idea compared to Metamorphosis, a single-time Event :/
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
terrain deformation together with use of GetLocationZ is guaranteed to cause desync on multiplayer, terrain deformation itself well idk never tested it :D
setting enviroment pathablity trough trigger should not desync as long as you dont do it locally
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
IMO it's better than metamorphosis in the case of many possible unit types.
Custom Pathing Movement > Metamorphosis (Unit-type count issues) > Invisible Platforms (dynamically creates, reduce performance - also could cause a desync)

Also, ruler, if you meant that the word "dynamically" create X object would decrease performance, isn't that what you're doing now ?

Dynamically sets pathing.

But still as to compare Dynamically creates a handle (Invisible Platform is a handle ?) with Dynamically sets pathing, I'd choose the second one.
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Also, ruler, if you meant that the word "dynamically" create X object would decrease performance, isn't that what you're doing now ?

Dynamically sets pathing.

But still as to compare Dynamically creates a handle (Invisible Platform is a handle ?) with Dynamically sets pathing, I'd choose the second one.

I was responding to the invisible platform method, and realised pathing changes would be the best way.

Let's hope ruler made a system out of it.
I'm currently making a bunker system.
Re: http://www.hiveworkshop.com/forums/requests-341/bunker-221214/
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
pathing change like 1 byte because it just changes pathing but isnt Invisible Platform destructable? :D(I really dont know)
Yea, it's a destructible. However, i also support defskull's metamorphosis idea. The problem there is that APproject must not be lazy and create 81 copies of object units and paste them in a trigger (which will take no more than 40 minutes), the problem with all the other methods is forever, when you play the map, the game gets retarded. So if APproject manages to create the horrible 81 units, he will have an epic system.
 
Level 31
Joined
Jun 27, 2008
Messages
2,556
The problem there is that APproject must not be lazy and create 81 copies of object units and paste them in a trigger
I was not precise saying 81. Number is 81 if talking only about hero abilities that are learnable within level up. If taking in account all available abilities for ONE hero, it would be 729 unit variations. Unless there is a way to add ability to morhped unit, if it can be detected of course.

So I guess 729 units would be simply too much.
 
Level 31
Joined
Jun 27, 2008
Messages
2,556
No no no. I meant spell combinations. There are 18 spells, and it can be combined into 729 spell combinations, meaning there are possibility of 729 hero variations, one and same hero, just different spells.

And there are Hero spells that cannot be added through triggers, this calls for 81 hero creation. And I think morphed unit would require 729 heroes.
 
Status
Not open for further replies.
Top