Triggering problem need help

mordocai

New Member
Reaction score
17
Ok, so i have actually made a MUI(tell me how to if it isnt)/GUI trigger but i need your peoples help at making it work/pointing out bugs. Its supposed to shoot a dummy unit and make it move smoothly. Right now i need help making the unit move. It moves forward but once, then it just keeps spamming that one spot over and over and over. So basicly i just need the unit to be able to move. Please not that i made this for a request, so thats why the dummies have the wierd names.Here is the code-

Trigger:
  • Seele Seal Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Seele Seal (Hero)
    • Actions
      • Set Seele_Units[1] = (Triggering unit)
      • Set Seele_Points[1] = (Position of Seele_Units[1])
      • Set Seele_Points[2] = (Target point of ability being cast)
      • Unit - Create 1 Moving Dummy Dont use this! for (Owner of Seele_Units[1]) at Seele_Points[1] facing (Position of (Triggering unit))
      • Set Seele_Units[2] = (Last created unit)
      • Trigger - Turn on Seele Seal Move <gen>

Trigger:
  • Seele seal Move
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set Seele_Points[3] = (Position of Seele_Units[2])
      • Set Seele_Points[4] = (Seele_Points[3] offset by 35.00 towards (Angle from Seele_Points[3] to Seele_Points[2]) degrees)
      • Unit - Move Seele_Units[2] instantly to Seele_Points[4]
      • Unit - Turn collision for Seele_Units[2] Off
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Integer((Angle from Seele_Points[3] to Seele_Points[2]))) Equal to 50
        • Then - Actions
          • Unit - Remove Seele_Units[2] from the game
          • Set Seele_Group = (Units within 200.00 of Seele_Points[2] matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of Seele_Units[1])) Equal to True)))
          • Unit Group - Pick every unit in Seele_Group and do (Actions)
            • Loop - Actions
              • Set Seele_Units[3] = (Picked unit)
              • Unit - Create 1 Dummy Dont use this! for (Owner of Seele_Units[1]) at Seele_Points[2] facing Default building facing degrees
              • Set Seele_Units[4] = (Last created unit)
              • Unit - Add Seele Seal (Dummy) to Seele_Units[4]
              • Unit - Set level of Seele Seal (Dummy) for Seele_Units[4] to (Level of Seele Seal (Hero) for Seele_Units[1])
              • Unit - Order Seele_Units[4] to Night Elf Demon Hunter - Mana Burn Seele_Units[3]
              • Unit - Add a 1.20 second Generic expiration timer to Seele_Units[4]
          • Custom script: call RemoveLocation(udg_Seele_Points[1])
          • Custom script: call RemoveLocation(udg_Seele_Points[2])
          • Custom script: call RemoveLocation(udg_Seele_Points[3])
          • Custom script: call RemoveLocation(udg_Seele_Points[4])
          • Custom script: call DestroyGroup(udg_Seele_Group)
          • Trigger - Turn off (This trigger)
        • Else - Actions
 

mordocai

New Member
Reaction score
17
uhm............. yeh>> id prefer to make this spell myself as it is my first real spell that was made from full scratch and is MUI.
Could you just point out what wrong or something?
EDIT:also its in jass. I only know how to edit certain spells but not wirte/read the code in jass that well yet.
EDIT2: OMFG i understand the whole god damn trigger that you have!!!!! this is just plain perfect in my POV,however i want it to be GUI :p.
So This would move the unit right? sorry if this is going offtopic but im just glad i can finally read jass coding :D!
JASS:
call SetUnitPosition( u, xx, yy )
        set tempunit = CreateUnit( GetOwningPlayer(u), 'h001', x, y, 270.00 )
        call UnitApplyTimedLife( tempunit, 'BTLF', 3.0 )
        call SetUnitUserData( u, ( GetUnitUserData(u) - 11 ) )
 

Exide

I am amazingly focused right now!
Reaction score
448
The idea of the trigger is to check when a unit uses a certain spell (fireball).
-Then create a dummy unit (fireball-looking), facing the same angle as the spellcaster. Add the dummy unit to a certain unit group, and give it a certain amount of custom value (for travelling distance.)
In another trigger, pick every unit in 'the certain unit group', every 0.03 seconds. Then move every (Picked unit) 10 "clicks" forward, in the direction which it is facing. And set the Picked unit's custom value to (-10).
-When Picked unit's custom value <= 0, destroy Picked unit.
You also might want to check if there's any unit within X range of Picked unit - if you want to make a little explosion, and deal damage.

EDIT:
JASS:

set tempunit = CreateUnit( GetOwningPlayer(u), &#039;h001&#039;, x, y, 270.00 )

-Creates another dummy unit (vision), which lives for 3 seconds - and is supposed to grant vision of the area that the fireball has passed through.
I don't reccomend using this, unless you only have ONE hero that uses this spell. (Else A LOT of dummy units will be spawned, and will cause lag.)
 

mordocai

New Member
Reaction score
17
well....... that didnt help me much but thanks anyways. I guess ill just resort to editing someone else's spell D:
 

Exide

I am amazingly focused right now!
Reaction score
448
I just checked my map that I linked to earlier, the GUI triggers are still there. (Only disabled.)

Trigger:
  • Starts Casting
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Woot
    • Actions
      • Set spawnloc = (Position of (Triggering unit))
      • Set temppoint = (Target point of ability being cast)
      • Unit - Create 1 Dummy_Projectile for (Owner of (Triggering unit)) at spawnloc facing temppoint
      • Unit - Set the custom value of (Last created unit) to (Integer((Distance between spawnloc and temppoint)))
      • Unit Group - Add (Last created unit) to movegroup
      • Custom script: call RemoveLocation(udg_spawnloc)
      • Custom script: call RemoveLocation(udg_endloc)


Trigger:
  • Moving Units Copy
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
      • (Number of units in movegroup) Not equal to 0
    • Actions
      • Unit Group - Pick every unit in movegroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Custom value of (Picked unit)) Greater than 0
            • Then - Actions
              • Set movepoint[1] = (Position of (Picked unit))
              • Set movepoint[2] = (movepoint[1] offset by 10.00 towards (Facing of (Picked unit)) degrees)
              • Unit - Move (Picked unit) instantly to movepoint[2]
              • Unit - Create 1 Dummy_Vision for (Owner of (Picked unit)) at movepoint[1] facing 270.00 degrees //Remove this..
              • Unit - Add a 3.00 second Generic expiration timer to (Last created unit) //Remove this..
              • Custom script: call RemoveLocation(udg_movepoint[1])
              • Custom script: call RemoveLocation(udg_movepoint[2])
              • Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) - 11)
            • Else - Actions
              • Unit Group - Remove (Picked unit) from movegroup
              • Unit - Kill (Picked unit)
 

mordocai

New Member
Reaction score
17
hmnnnn. have you tested my map yet and saw the problem? or are you just throwing these at me xD. But yeh right now idk why but i dont get anything. Could you like explain what went wrong in my trigger to make them not move fluently?
 

Exide

I am amazingly focused right now!
Reaction score
448
hmnnnn. have you tested my map yet and saw the problem? or are you just throwing these at me xD. But yeh right now idk why but i dont get anything. Could you like explain what went wrong in my trigger to make them not move fluently?

I'm just throwing this at ya. I'm too lazy. :p
-This, I know, works. What you first posted is a mess.
 

NightShade

Ultra Cool Member
Reaction score
31
Set Seele_Points[4] = (Seele_Points[3] offset by 35.00 towards (Angle from Seele_Points[3] to Seele_Points[2]) degrees)

seele_points[3] isn't change so neither will point 4. your saying "go to this location" but the location isn't changing.

you should say (i think):
Set Seele_Points[4] = (Seele_Points[4] offset by 35.00 towards (Angle from Seele_Points[3] to Seele_Points[2]) degrees)
that means that since point 4 is changing the next location is changing too.
 

mordocai

New Member
Reaction score
17
@exide
that is because it also burns the mana of nearby units

@nightshade
so when should i set that new seele point variable? after generic timer right?
 

Dmshu

New Member
Reaction score
9
You trigger is so much more complex then it needs to be......

I've uploaded a really simple map with 2 small triggers.

trigger 1:
a) makes a chicken (whatever unit/model you want) facing where you targeted the spell. (I based it off healing ward because I couldn't think of a point targeted spell off the top of my head)

b)then it turns on the second trigger

trigger 2:
a) every .3 seconds if there is atleast 1 chicken (whatever unit type you want)
b) moves the chicken 35 units in the direction it is facing
c) if a unit comes within 75 units of said chicken they die (or you mana burn them)

Obviously it's not the perfect spell for you but all you really need to edit is the chicken model, give it locus so players cant change it's direction, and change the action from kill to create a dummy unit that casts mana burn on the offender.
 

Attachments

  • killer chicken.w3x
    14.4 KB · Views: 161

mordocai

New Member
Reaction score
17
EDIT:skrew it im just going to edit an already existing spell............... no need to reply anymore
 

Dmshu

New Member
Reaction score
9
This spell can easily be edited like I said to mana burn all units it comes across.
 

Dmshu

New Member
Reaction score
9
If you haven't already finished I edited this one to mana burn all units in it's path.

If you don't want the unit to get mana burned multiple times then disable unnamed trigger 002 and enable unnamed trigger 002 (copy).

there is a unit group variable needed for mana burned only once version unless you want to use custom value.

The map is attached if you just want to test and see it in action.
Trigger 1:
Code:
Untitled Trigger 001
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Killer Chicken (Neutral Hostile)
    Actions
        Unit - Create 1 Chicken for Player 1 (Red) at (Target point of ability being cast) facing (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees
        Trigger - Turn on Untitled Trigger 002 <gen>
Trigger 2:
Code:
Untitled Trigger 002
    Events
        Time - Every 0.20 seconds of game time
    Conditions
        (Number of units in (Units of type Chicken)) Greater than 0
    Actions
        Unit Group - Pick every unit in (Units of type Chicken) and do (Actions)
            Loop - Actions
                Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 40.00 towards (Facing of (Picked unit)) degrees)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in (Units within 35.00 of (Position of (Picked unit)))) Greater than 0
                    Then - Actions
                        Unit Group - Pick every unit in (Units within 35.00 of (Position of (Picked unit))) and do (Actions)
                            Loop - Actions
                                Unit - Create 1 Demon Hunter for Neutral Hostile at (Position of (Picked unit)) facing Default building facing degrees
                                Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                                Unit - Add Mana Burn to (Last created unit)
                                Unit - Set level of Mana Burn for (Last created unit) to 1
                                Unit - Order (Last created unit) to Night Elf Demon Hunter - Mana Burn (Picked unit)
                    Else - Actions
                        Do nothing
Optional Trigger 2:
Code:
Untitled Trigger 002 Copy 2
    Events
        Time - Every 0.20 seconds of game time
    Conditions
        (Number of units in (Units of type Chicken)) Greater than 0
    Actions
        Unit Group - Pick every unit in (Units of type Chicken) and do (Actions)
            Loop - Actions
                Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 40.00 towards (Facing of (Picked unit)) degrees)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in (Units within 35.00 of (Position of (Picked unit)))) Greater than 0
                    Then - Actions
                        Unit Group - Pick every unit in (Units within 35.00 of (Position of (Picked unit)) matching (((Matching unit) is in AlreadyManaBurned) Equal to False)) and do (Actions)
                            Loop - Actions
                                Unit Group - Add (Picked unit) to AlreadyManaBurned
                                Unit - Create 1 Demon Hunter for Neutral Hostile at (Position of (Picked unit)) facing Default building facing degrees
                                Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                                Unit - Add Mana Burn to (Last created unit)
                                Unit - Set level of Mana Burn for (Last created unit) to 1
                                Unit - Order (Last created unit) to Night Elf Demon Hunter - Mana Burn (Picked unit)
                    Else - Actions
                        Unit Group - Remove all units from AlreadyManaBurned
 

Attachments

  • killer chicken.w3x
    14.4 KB · Views: 157

mordocai

New Member
Reaction score
17
hmnn thanks. I can see the parts to edit it, however is it MUI? that is the only reason i used arrays in my trigger. I just learned MUI and still suck at it
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • 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

      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