Bouncing, vertical/horizontal detection help!

Arre

You can change this now in User CP.
Reaction score
1
Hello! Im working on a wc3 map but i got some problem. I want to make so when you take damage, you gets knockbacked and if you hit a wall you will bounce. I've googled it and search here to try find a easy way to detect if the wall is vertical or horizontal.

Here on thehelper i found one but of some reason it doesn't work on my map on the horizontalwalls. It works perfect on the vertical.

Heres the walldetection i use now created by MoonSlinger. I made some few changes like changing so it detecting the height of a cliff and increased the detectionrange infront of the unit from 30 to 180. I dont understand why it wont work?!

Code:
Slide
    Events
        Time - Every 0.05 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in MovingUnits and do (Actions)
            Loop - Actions
                Set UnitPoint = (Position of (Picked unit))
                Set MovePoint = (UnitPoint offset by 30.00 towards UnitMoveDirection[(Custom value of (Picked unit))] degrees)
                Unit - Move (Picked unit) instantly to MovePoint
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Terrain type at MovePoint) Equal to Lordaeron Summer - Dark Grass
                    Then - Actions
                        Game - Display to (All players) the text: Collision Detected
                        For each (Integer A) from 1 to 4, do (Actions)
                            Loop - Actions
                                Set TestPoint = (UnitPoint offset by 30.00 towards (90.00 x (Real((Integer A)))) degrees)
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Terrain type at TestPoint) Equal to Lordaeron Summer - Dark Grass
                                    Then - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                ((Integer A) mod 2) Equal to 1
                                            Then - Actions
                                                Set UnitMoveDirection[(Custom value of (Picked unit))] = (0.00 - UnitMoveDirection[(Custom value of (Picked unit))])
                                                Unit - Make (Picked unit) face UnitMoveDirection[(Custom value of (Picked unit))] over 0.00 seconds
                                            Else - Actions
                                                Set UnitMoveDirection[(Custom value of (Picked unit))] = (180.00 - UnitMoveDirection[(Custom value of (Picked unit))])
                                                Unit - Make (Picked unit) face UnitMoveDirection[(Custom value of (Picked unit))] over 0.00 seconds
                                    Else - Actions
                    Else - Actions


My question to you is, do you know another way?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/
  • The Helper The Helper:
    Happy Thursday!
  • Ghan Ghan:
    I'm not so sure, there's still a lot of Thursday left for it to become unhappy.
    +3
  • The Helper The Helper:
    still a few hours
  • The Helper The Helper:
    Its Friday!!!!
    +1
  • Ghan Ghan:
    Thursday 7/10 would Thursday again
    +3

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top