Slide

S

SpreaDisease

Guest
Code:
Slide on Ice
    Events
        Time - Every 0.15 seconds of game time
    Conditions
    Actions
        Set tempGroup = (Units in (Playable map area) matching ((Owner of (Matching unit)) Not equal to Player 12 (Brown)))
        Set trigGroup[1] = (Units in (Playable map area) owned by Player 1 (Red))
        Set trigGroup[2] = (Units in (Playable map area) owned by Player 2 (Blue))
        Set trigGroup[3] = (Units in (Playable map area) owned by Player 3 (Teal))
        Set trigGroup[4] = (Units in (Playable map area) owned by Player 4 (Purple))
        Set trigGroup[5] = (Units in (Playable map area) owned by Player 5 (Yellow))
        Set trigGroup[6] = (Units in (Playable map area) owned by Player 6 (Orange))
        Set trigGroup[7] = (Units in (Playable map area) owned by Player 7 (Green))
        Set trigGroup[8] = (Units in (Playable map area) owned by Player 8 (Pink))
        Set trigGroup[9] = (Units in (Playable map area) owned by Player 9 (Gray))
        Unit Group - Pick every unit in tempGroup and do (Actions)
            Loop - Actions
                Set tempPoint = (Position of (Picked unit))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Terrain type at tempPoint) Equal to Northrend - Ice
                    Then - Actions
                        Unit Group - Pick every unit in trigGroup[(Player number of (Owner of (Picked unit)))] and do (Actions)
                            Loop - Actions
                                Unit - Order (Picked unit) to Move To ((Position of (Picked unit)) offset by 115.00 towards (Facing of (Picked unit)) degrees)
                    Else - Actions
                Custom script:   call RemoveLocation(udg_tempPoint)
        Custom script:   call DestroyGroup(udg_tempGroup)

This is my slide Triggers. but when i slide my unit is moving like im having lagg. do u know wut i can do? plesae help me.
 

Luth

Lex Luthor!
Reaction score
41
You can set the Time Event to .01 (which will give you best-possible results without using a timer [which you're probably already getting] ) or set up a Timer to fire off every .02 (50-fps) or .01 (100-fps) and when the timer expires, do those actions.
 

Oreo_clan

New Member
Reaction score
4
Luth said:
You can set the Time Event to .01 (which will give you best-possible results without using a timer [which you're probably already getting] ) or set up a Timer to fire off every .02 (50-fps) or .01 (100-fps) and when the timer expires, do those actions.

Are you insane? For a junior... I've seen 2 posts from you... And they both are completely idiotic...

That would cause more lag.

Destroy the 9 OTHER unit groups you have. Every 400 times a minute you have messed up unit groups floating around the place meaninglessly, causing lag...

Don't think because you destroy 1 group, that it will destroy 9 that are considered to be inside it...

And, the trigger stinks... People can stop sliding easily... But this way it won't cause as much lag as the more... Widely prefered way which has less flaws, except for lag of course.

And it moves ALL units owned by the player.. So unless you want all of the players units to move while only 1 of them is on ice, then go ahead... But you should only make the picked unit move...

Not only that, the trigger refires for each unit, causing a multiple action of the single action you wanted... Causing more lag...

So you are doing a lot of pointless overlapping functions that only a noob would do...

Then again... We fall so we can stand up and learn from our mistakes...

Just use some logic and clean it up...

Destroy those 9 other unit groups,...

Actually... Don't even use those 9 extra unit groups in this trigger...

Make it

Code:
Slide on Ice
    Events
        Time - Every 0.15 seconds of game time
    Conditions
    Actions
        Set tempGroup = (Units in (Playable map area) matching ((Owner of (Matching unit)) Not equal to Player 12 (Brown)))
        Unit Group - Pick every unit in tempGroup and do (Actions)
            Loop - Actions
                Set tempPoint = (Position of (Picked unit))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Terrain type at tempPoint) Equal to Northrend - Ice
                    Then - Actions
                        Unit - Order (Picked unit) to Move To (tempPoint offset by 115.00 towards (Facing of (Picked unit)) degrees)
                    Else - Actions
                Custom script:   call RemoveLocation(udg_tempPoint)
        Custom script:   call DestroyGroup(udg_tempGroup)

Sorry if it's a bit messy looking. I copied and pasted your trigger... And then I took out the unnecessary functions...

I would reccomend using a move unit function... But this causes less lag... And I'm assuming you will have a lot of units in the game sliding for a long time... The above trigger should cause a lot less lag...

And it should be much cleaner...

If it doesn't match what you want, email me at [email protected]

I'll see what I can do... But you'll have to tell me what the map is about... And maybe email it to me... (Though I'd rather you don't) So I can fix it up a bit...

I've dealt with these annoying lag bitches... And I won...

Until I test the machine gun and sub machine gun online that is -.-... (Damn automatic mode... So cool... But can cause lag...)
 

Luth

Lex Luthor!
Reaction score
41
"Hypocrite! First remove the plank from your own eye, and then
you will see clearly to remove the speck from your brother's eye."


You completely missed the point of why it acts like its laggy. The event "Every X seconds" has a minimum wait time, but regardless of that, every .15 seconds is still only 6 Frames Per Second. Now, maybe for you, 6 FPS is a good number, but for the rest of us, that will appear like "laggy" movement. Even if you set this to every 0.01 second of the game, the minimum wait value will come into play, and it'll still look jittery. To get a higher resolution of time management, you need to start a Countdown Timer for either .02 or .01 seconds, and run a slide trigger from there. Then, in the trigger, don't issue orders to move. To get proper sliding, you want to use Move Unit Instantly (which, again, is why you want higher time resolution).

Code:
Slide on Ice
    Events
        Slide Timer expires
    Conditions
    Actions
        Set tempGroup = (Units in (Playable map area) matching ((Owner of (Matching unit)) Not equal to Player 12 (Brown)))
        Unit Group - Pick every unit in tempGroup and do (Actions)
            Loop - Actions
                Set tempPoint = (Position of (Picked unit))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Terrain type at tempPoint) Equal to Northrend - Ice
                    Then - Actions[b]
                        Set tempPoint2 = tempPoint offset by 11.5 towards (Facing of (Picked unit)) degrees
                        Unit - Move (Picked unit) Instantly to (tempPoint2)
                        Custom script: call RemoveLocation(udg_tempPoint2)[/b]
                    Else - Actions
                Custom script:   call RemoveLocation(udg_tempPoint)
        Custom script:   call DestroyGroup(udg_tempGroup)
 
S

SpreaDisease

Guest
is liek this? im not realy good with triggers instead i copy them from some one :).


Code:
Slide
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Set tempGroup = (Units in (Playable map area) matching ((Owner of (Matching unit)) Not equal to Player 12 (Brown)))
        Unit Group - Pick every unit in tempGroup and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Terrain type at tempPoint) Equal to Northrend - Ice
                    Then - Actions
                        Set tempPoint2 = ((Center of (Playable map area)) offset by 11.50 towards (Facing of (Picked unit)) degrees)
                        Unit - Move (Picked unit) instantly to tempPoint2
                        Custom script:   call RemoveLocation(udg_tempPoint2)
                    Else - Actions
                        Custom script:   call RemoveLocation(udg_tempPoint2)
                Custom script:   call DestroyGroup(udg_tempGroup)


please tell me if its good or wrong.
 

Luth

Lex Luthor!
Reaction score
41
Two things.

First, I cant tell if you're destroying your Unit Group INside or OUTside the loop. make sure its on the outside, otherwise you're in trouble.

Second, try your trigger using the event "Every 0.01 seconds of game time", and if that looks fine for you, then you're done. If it still looks jittery (which I suspect it will), then you'll want to create a Timer variable, and on Map Init, start that Timer as a multi-shot (? not one-shot) timer that expires in 0.01 seconds. Then change the trigger event to fire whenever the Timer expiers.
 
S

SpreaDisease

Guest
ok i fix it, just like how you said. but there the unit is not sliding. do you know why? do i need to make like this?
Code:
Set trigGroup[1] = (Units in (Playable map area) owned by Player 1 (Red))
to make it slide? or what? please help :banghead: :banghead: :banghead: :banghead: :banghead: :banghead: :banghead: :banghead: :banghead:
 
S

SpreaDisease

Guest
can u host? im on est gate. i can host and you can open the map and fix then you host it. you want? cause im not realy good with triggers.
 

Luth

Lex Luthor!
Reaction score
41
I'm actually on my way out for an hour or two. I'll post back here when I get back, and if its still not working, I'll take the map and fix it up for ya. :)
 

Luth

Lex Luthor!
Reaction score
41
Get it workin?
 

w00t22

CSS L4D DoD? Steam ID = w00t22
Reaction score
43
heres my amazing slide trigger that is wat is used in Polar Escape and my Icey Maze and Maze of Sliding Bunnies
Variables - Point_Position - Point

Code:
Slide
Events
    Time - Every 0.03 seconds of game time

Conditions

Actions
    For each (Integer A) from 1 to 10, do (Actions)
        Loop - Actions
            Custom script:   set bj_wantDestroyGroup = true
            Unit Group - Pick every unit in (Units owned by (Player((Integer A)))) and do (Actions)
                Loop - Actions
                    Set Point_Position = (Position of (Picked unit))
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        If - Conditions
                            And - All (Conditions) are true
                                Conditions
                                    ((Picked unit) is alive) Equal to True
                                    ((Owner of (Picked unit)) is an ally of Player 1 (Red)) Equal to True
                                    (Terrain type at Point_Position) Equal to Icecrown Glacier - Dark Ice
                        Then - Actions
                            Custom script:   call RemoveLocation (udg_Point_Position)
                            Set Point_Position = ((Position of (Picked unit)) offset by 13.00 towards (Facing of (Picked unit)) degrees)
                            Unit - Move (Picked unit) instantly to Point_Position
                        Else - Actions
    Custom script:   call RemoveLocation (udg_Point_Position)

Code:
Face Point
Events
    Unit - A unit Is issued an order targeting a point
Conditions
    (Terrain type at (Position of (Triggering unit))) Equal to Icecrown Glacier - Dark Ice
Actions
    Set Point_Position = (Target point of issued order)
    Unit - Make (Triggering unit) face Point_Position over 0.00 seconds
    Custom script:   call RemoveLocation (udg_Point_Position)

And that lets you move where ever you click and is very smooth slide.
 

Oreo_clan

New Member
Reaction score
4
.05 is good enough. Using move unit instantly keeps the guy going the proper direction, but it's an ice slide function... He doesn't need to use move unit.

The trigger above this should work fine, but make it every .05 seconds to be safer...

And I believe Call DestroyGroup(TempUnitGroup) works better than bj_wantDestroyGroup = True
 
D

DogNamedAbe

Guest
first trigger ALWAYS ON

event
a unit enters (region) -event

condition
(triggering unit)= (your char)

action
turn on (make a new trigger and put the name here)


second trigger INITIALLY ON

event
every .02 seconds game time

action
unit- move (unit) instantly to (position of unit) offset by .9 towards facing of (unit) degrees

last trigger ALWAYS ON

event
unit leaves (region)

condition
triggering unit is equal to (unit)

action
turn off (the second trigger)
 
I

iNsaNe

Guest
you are leaking a unit group every .5 seconds

For Integer A from 1 - (How ever many trigGroup Arrays you have)
Loop
Custom Script: call DestroyGroup(udg_trigGroup[GetForLoopIntA])

GetForLoopIntA is probably wrong, its something like that though. The problem was you had a custom script to destroy the variable, but its an array so you need to either do what i did which i think is easier, or just
Custom Script: call DestroyGroup(udg_trigGroup[1])
Custom Script: call DestroyGroup(udg_trigGroup[2])

they are both easy
 
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