terrian deformation issues

BRUTAL

I'm working
Reaction score
118
im my maze when the hero goes into a region theres a terrian deformation at his location till the hero gets the the end, and enters another region which turns that off
-problem
say player 1 enters that region and starts the deformation at his location and just for that terrian type*forgot to mention* and player 2 is right behind that hero like 5 seconds and on the same terrian type as what the deformation would occur on, when player 1 enters that region, player 2 will get the deformation as well, but i only want it to go for the unit that enters, but still work for each hero.

triggers
Code:
Enabling Deformation
    Events
        Unit - A unit enters Region 047 <gen>
    Conditions
        (Unit-type of (Triggering unit)) Equal to Demon Hunter
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Trigger - Turn on Terrian Deformation <gen>

Code:
Terrian Deformation
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                Set Loc[0] = (Position of Unit[(Integer A)])
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Terrain type at Loc[0]) Equal to Cityscape - Dirt
                    Then - Actions
                        Player Group - Pick every player in (All players) and do (Actions)
                            Loop - Actions
                                Environment - Create a 0.20 second Temporary crater deformation at Loc[0] with radius 125.00 and depth 40.00
                    Else - Actions
                        Custom script:   call RemoveLocation(udg_Loc[0])

Code:
Disble Deformation
    Events
        Unit - A unit enters Region 045 <gen>
    Conditions
        (Unit-type of (Triggering unit)) Equal to Demon Hunter
    Actions
        Trigger - Turn off Terrian Deformation <gen>
        Trigger - Turn off Enabling Deformation <gen>

i think its something with the first trigger? idk
i tryed different things, but those are the original triggers
 
im my maze when the hero goes into a region theres a terrian deformation at his location till the hero gets the the end, and enters another region which turns that off
-problem
say player 1 enters that region and starts the deformation at his location and just for that terrian type*forgot to mention* and player 2 is right behind that hero like 5 seconds and on the same terrian type as what the deformation would occur on, when player 1 enters that region, player 2 will get the deformation as well, but i only want it to go for the unit that enters, but still work for each hero.

triggers
Code:
Enabling Deformation
    Events
        Unit - A unit enters Region 047 <gen>
    Conditions
        (Unit-type of (Triggering unit)) Equal to Demon Hunter
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Trigger - Turn on Terrian Deformation <gen>

Code:
Terrian Deformation
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                Set Loc[0] = (Position of Unit[(Integer A)])
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Terrain type at Loc[0]) Equal to Cityscape - Dirt
                    Then - Actions
                        Player Group - Pick every player in (All players) and do (Actions)
                            Loop - Actions
                                Environment - Create a 0.20 second Temporary crater deformation at Loc[0] with radius 125.00 and depth 40.00
                    Else - Actions
                        Custom script:   call RemoveLocation(udg_Loc[0])

Code:
Disble Deformation
    Events
        Unit - A unit enters Region 045 <gen>
    Conditions
        (Unit-type of (Triggering unit)) Equal to Demon Hunter
    Actions
        Trigger - Turn off Terrian Deformation <gen>
        Trigger - Turn off Enabling Deformation <gen>

i think its something with the first trigger? idk
i tryed different things, but those are the original triggers

So you basically want a deformation trail? In a sense?

If that's what you want, then your trigger is 100% wrong in both trigger 1 and 2. Trigger 1 is just retarded...

First, what you are looping is turning on a continuous function. Not only that, that continuous function affects all players, so you turn it on 12 times, which is pointless since it affects all players anyways...

Second, the second trigger affects all players...

Third, you have a leak in the second trigger...

Fourth, you also spam the deformation in the second trigger. Basically, for every unit you play the deformation at the same spot equal to the number of players in the game. This thing must lag like fuck.

And finally, I don't understand your last trigger. You say you want the effects to be individual. I'm assuming that means you want each player to feel the effects of the deformation at their own times when they pass through the maze. You turn off the initiating trigger of the deformation, so once someone passes that area, nobody else can have the effects of the deformation, I'm assuming for the rest of the game, which I also assume that you don't want.

Here's what you should do:

(I'm not going to go on world editor for you since this isn't that complicated)


Variables Required:
-DeformationPassed[] - Boolean (Array); Initial value: False <---Used to make sure that once you pass the deformation part, you're done completely. If you don't want that, just don't use it and take it out.
-DeformationGroup - Unit Group; Initial value: None <---Used to store the units that you want to have a deformation trail.
-Temp_Point - Location; Initial Value: None <--- Basically Loc[0]. Why do you even use that anyway? You use an array, but why? You don't need it. It would be better if you didn't use it but that's your choice.
//=======================================//


-Deformation Initiation
Event - Unit enters [Region_Initiating_Deformation]

Conditions - Unit type of [Triggering Unit] equal to [Demon Hunter]
Conditions - [DeformationPassed[Player Number of [Owner of [Triggering Unit]]]] Equal to [False]

Actions - Add [Triggering Unit] to [DeformationGroup]
//=============================================//

-Deformation Effect
Event - Every [0.03] seconds

Conditions - [Number of units in [DeformationGroup]] greater than or equal to [1]

Actions - Custom Script: set bj_wantDestroyGroup = true
Actions - Pick every unit in [DeformationGroup] and do (actions):
-Action - Set [Temp_Point] equal to [Position of [Picked Unit]]
-Action - If/Then/Else
-If - Conditions
-Conditions - Terrain type at [Temp_Point] equal to [Cityscape - Dirt]
-Then - Actions
-Actions - Create a [0.20] second [Temporary] crater deformation at [Temp_Point] with radius [125.00] and depth [40.00]
-Else - Actions
-Actions - Do nothing
-Actions - Custom Script: call RemoveLocation(udg_Temp_Point)
//============================================//

-Deformation Remove
Events - Unit enters [Deformation_Off]

Conditions - Unit type of [Triggering Unit] equal to [Demon Hunter]
Conditions - [Triggering Unit] is in [DeformationGroup] equal to [True]

Actions - Set [DeformationPassed[Player Number of [Owner of [Triggering Unit]]]] equal to [True]
Actions - Remove [Triggering Unit] from [DeformationGroup]
//============================================//



Basically, use either a Unit Group or a buff to determine which unit should have deformations. Either way, you end up using a unit group, and simply avoiding the buff saves you some time in creating this.

The first trigger adds all entering, valid units into the unit group.
The second trigger checks all units in the unit group and creates a terrain deformation if they are on the terrain type you want.
The final trigger removes all entering, valid units from the unit group, and prevents them from experiencing the deformation again. If you don't want that, just don't use the DeformationPassed[] part.

Seriously, what you created was a mess. It was just horrible... Too many problems with it.
 
ya idk
i didnt notice the retardedness
its not even my trigger, i found it in a maze tutorial XD

and ty
it works except one thing
from what i had before
i brought 2 demon hunters
i made one go on the region which starts the deformation
and one stay behind it, and it the deformation still applied for both not just the unit that enters that region
but its fine i can make it work

*rep
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • 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 Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top