• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Wall blocking specifics

Status
Not open for further replies.
Level 3
Joined
Mar 7, 2010
Messages
16
I'm having troubles triggering a wall that prevents one team from collision while allowing another to pass through, I can't use turn collide off and I can't use regions, is there a way to do this?
 
Level 3
Joined
Mar 7, 2010
Messages
16
That's not what i mean, I thank you for trying, the situation is that in my nazi zombie map, I'm attempting to make it so that the broken barricade blocks the players, but not the zombies.
 
Level 11
Joined
Jan 25, 2009
Messages
572
Well that was a bit what I mean.
I think i know what exactly what you want.
So, the one that is the zombies is a computer if i dont misstake. I have the solution for you. You can make it un-smoother by using another periodic time. Like 1 second or less.
  • Wall Check
    • Events
      • Time - Every 0.30 seconds of game time
    • Conditions
    • Actions
      • Set Players = (All players matching (((Matching player) controller) Equal to User))
      • Player Group - Pick every player in Players and do (Actions)
        • Loop - Actions
          • Set PickedPlayer = (Picked player)
          • Set WallGroup = (Units in (Entire map) matching ((Unit-type of (Matching unit)) Equal to Footman))
          • Unit Group - Pick every unit in WallGroup and do (Actions)
            • Loop - Actions
              • Set Wall_Loc = (Position of (Picked unit))
              • Set Wall = (Picked unit)
              • Set Temp_Group = (Units within 100.00 of Wall_Loc matching (((Matching unit) belongs to an enemy of PickedPlayer) Equal to True))
              • Unit Group - Pick every unit in Temp_Group and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Number of units in Temp_Group) Greater than 0
                    • Then - Actions
                      • Unit - Turn collision for Wall Off
                    • Else - Actions
                      • Unit - Turn collision for Wall On
              • Custom script: call DestroyGroup (udg_Temp_Group)
          • Custom script: call DestroyGroup (udg_WallGroup)
      • Custom script: call DestroyForce (udg_Players)

And also, here's the Demo map :View attachment Zombie - Wall Problem.w3x

EDIT: Change the Unit type to the Wall instead of a footman. Hopes this works, otherwise tell me and i'll try to fix it. It may also cause bugs because if a player is withing 100 of the wall and a zombie also is that, the player can also go throught the wall but that is easy to fix, just remove the matching condition in the temp group and add it to the If The Else - Action and also add a thing that checks that there aren't any Player there also. If there's, neither the zombie or the Player can get throught the wall. Hopes you understand me. Tell me if there's any problem and i shall fix it =)
 
Status
Not open for further replies.
Top