• 🏆 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!

preventing certain unit types from moving into an area

Status
Not open for further replies.
Level 30
Joined
Sep 30, 2008
Messages
1,460
As part of my D3W map, im trying to recreate the first scene featured in the Diablo III gameplay videos where ghouls come from all directions, accross bridges and scaling the walls.]

Below is a screenshot of the area:

example.jpg


Basically, I'm trying to find a way to allow the ghouls to walk up the edges, and move over the wall around the platform above. However, I also want to stop the players hero's from walking over the edge :S

An idea I had was to make the ghouls flying units with 0 height, however, this prooved rather messy as they were walking into other doodads etc :/

Is there another way? :D
 
Level 8
Joined
Apr 30, 2009
Messages
338
You can turn off the collision of units via a trigger, so the ghouls will remain ground units. This would also allow you to keep collision on for non-ghouls. This sounds like the Spectre's dagger ability in DotA, which allows her to walk over cliffs and trees if she is standing on a shadow while other units may not. I don't know how to make the ghouls "climb" the walls... you could try tilting the models and forcing z-axis movement; but I have no idea how to do this. Unit positions are mapped only in x,y coordinates it seems, so the z-coordinate will shift "as needed" and is often jumpy.
 
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

- Hmm try following: Put a rect at the bottom and the top of the platform.

- Create a ghoul (in the Object Editor) with Fly and FlyHigh.

- Now you can create 2 triggers:
  • Ghoul
  • Events:
    • Unit - A Unit enter (bottum rect)
  • Conditions:
    • Unit type of entering Unit equal to Ghoul
  • Actions:
    • Unit - Replace Entering Unit with FlyingGhoul
  • Ghoul2
  • Events:
    • Unit - A Unit enter (top rect)
  • Conditions:
    • Unit type of entering Unit equal to FlyingGhoul
  • Actions:
    • Unit - Replace Entering Unit with Ghoul
 
Status
Not open for further replies.
Top