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: 158

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: 154

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

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top