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
 

Oreo_clan

New Member
Reaction score
4
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.
 

BRUTAL

I'm working
Reaction score
118
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.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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