Help with a spell +rep

Weegee

Go Weegee!
Reaction score
102
Hi. How can i get a trigger so when a unit is attacked if he has a certain buff that he is knocked back? I already know how to do a clean Knockback trigger in GUI (if u don't believe me i could show u). The only problem I am having is finding the condition to check if the attacked unit has a certain buff. TY to helpers and I will +rep people who help :thup:
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Code:
((Attacked unit) has buff 'YourBuff') Equal to True
this is what you are searching for, its a boolean -> unit -> unit has specific buff
 

R@i_no_Wyrm

New Member
Reaction score
43
Boolean comparison - attacked unit has buff (lol) equal to true


P.S. :read ace's thread title section.

Edit : me too, too late.
 

Weegee

Go Weegee!
Reaction score
102
TY all since u all helped +rep to all

Edit: Ok i seem to be having problems squeezing it in there how about how do i make a number that randomly goes to a number that is between 0-25%? and if it hits 25% the activates?
 

WarToast

Active Member
Reaction score
3
TY all since u all helped +rep to all

Edit: Ok i seem to be having problems squeezing it in there how about how do i make a number that randomly goes to a number that is between 0-25%? and if it hits 25% the activates?

Create an integer variable. I called mine RandomNumber in this example.

Code:
Action
Set RandomNumber = (Random integer number between 1 and 25)

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        RandomNumber Equal to 25
    Then - Actions
      
    Else - Actions
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
for 25% chance it got to be:
Code:
Action
Set RandomNumber = (Random integer number between 1 and 4)

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        RandomNumber Equal to 1
    Then - Actions
      
    Else - Actions
or if you want you could also do it like this:
Code:
Action
Set RandomNumber = (Random integer number between 1 and 100)

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        RandomNumber Less or Equal to 25
    Then - Actions
      
    Else - Actions
 

WarToast

Active Member
Reaction score
3
TY all since u all helped +rep to all

Edit: Ok i seem to be having problems squeezing it in there how about how do i make a number that randomly goes to a number that is between 0-25%? and if it hits 25% the activates?

I understood that as 1 in 25. ;)
 

Weegee

Go Weegee!
Reaction score
102
k ty ill see if +rep works twice lol

It worked but there is a delay. Here's the trigger...

Code:
Unit - A unit Is attacked

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        ((Attacked unit) has buff Stunned (Pause)) Equal to True
    Then - Actions
        Set Unit_Casted = (Attacked unit)
        Set Unit_Caster = (Attacking unit)
        Trigger - Turn on GUI knockback 2 <gen>
    Else - Actions
        Do nothing


Code:
Time - Every 0.03 seconds of game time


Actions
    Unit - Move Unit_Casted instantly to ((Position of Unit_Casted) offset by 5.00 towards (Facing of Unit_Caster) degrees)
    Destructible - Pick every destructible within 120.00 of (Position of Unit_Casted) and do (Destructible - Kill (Picked destructible))
    Wait 0.50 seconds
    Unit - Remove set_unit_Dummy from the game
    Trigger - Turn off (This trigger)

When a Unit has this certain buff it will be knocked back but it takes to long NEED HELP +rep to who ever helps


Edit:to let u know i cant +rep u guys again for helping lol
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
I dont understand, what takes too long? is your unit not sliding fast enough or does the effect last too long?

BtW, your trigger leaks here:
Code:
Unit - Move Unit_Casted instantly to ([B](Position of Unit_Casted)[/B] offset by 5.00 towards (Facing of Unit_Caster) degrees)
    Destructible - Pick every destructible within 120.00 of [B](Position of Unit_Casted)[/B] and do (Destructible - Kill (Picked destructible))

and you havent set 'Unit - Remove set_unit_Dummy from the game' the unit you re removing here Oo
 

R@i_no_Wyrm

New Member
Reaction score
43
you dare to use wait = not recommended.

Try to take some sliding system some mods had made.

It is not MUI....

Fixing = make some count system that'll turn da trigger off after it reached some time.
Removing dummies 4 what?
It will cause the target to move alongside the facing od the caster that may change over time. sure bout that?

@Dr.Jack
Well, it is attacking condition after all, it will clash.
 

Dr.Jack

That's Cap'n to you!
Reaction score
109
Clearing the leaks should help.
The fact that he using wait shouldn't disturb.
Note it is not MUI nor MPI.
 

Weegee

Go Weegee!
Reaction score
102
I know about that and the leaks ok ill fix those later the problem is that when a unit is stunned it like waits 2 seconds THEN it moves them i want it so it moves when they are stunned without a wait

O and for the wait trigger i know it screws it up lol ill fix it better later

Edit: for the dummy thing i forgot to remove that so forget about that i used to have a dummy lol but now i have the unit be damaged off of the skill itself

@ Accname

i need help with the leaks lol what am i supposed to do with that anyway?
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Code:
Slide
    Events
        Time - Every 0.05 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff Betäubt (Pause)) Equal to True
                    Then - Actions
                        Set StunPoint = ((Position of (Picked unit)) offset by -5.00 towards (Facing of (Picked unit)) degrees)
                        Unit - Move (Picked unit) instantly to StunPoint
                        Custom script: call RemoveLocation (udg_StunPoint)
                    Else - Actions

i did it that way, you just got to set the unit group stunned somewhere, like
Code:
Set Stunned = (Units in (Playable map area))

Edit: I added my test map maybe it ll help you.
 

Weegee

Go Weegee!
Reaction score
102
k thx ill try it =D

Yours works much better lol Ill give u credit in my map =D
 
General chit-chat
Help Users
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/

      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