• 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.

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