Shorter way to do this?

BRUTAL

I'm working
Reaction score
118
Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Unit-type of (Triggering unit)) Not equal to Dummies[0]
        (Unit-type of (Triggering unit)) Not equal to Dummies[1]
        (Unit-type of (Triggering unit)) Not equal to Dummies[2]
        (Unit-type of (Triggering unit)) Not equal to Dummies[3]
    Then - Actions
        Set TempPt = (Position of (Triggering unit))
        Unit - Order Elemental 0115 <gen> to Orc Tauren Chieftain - Shockwave TempPt
        Custom script:   call RemoveLocation (udg_TempPt)
    Else - Actions

is there a shorter way to do the if's cause i dont want to do like a hundred of those Xd
 

xmkiller

New Member
Reaction score
6
Can you explain what you are trying to do with this script? I am kind of confused. I understand that it looks like a dummy caster but what it triggering this?
 

BRUTAL

I'm working
Reaction score
118
Code:
BlazeOne
    Events
        Unit - A unit comes within 2000.00 of Elemental 0115 <gen>
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Triggering unit)) Not equal to Dummies[0]
                (Unit-type of (Triggering unit)) Not equal to Dummies[1]
                (Unit-type of (Triggering unit)) Not equal to Dummies[2]
                (Unit-type of (Triggering unit)) Not equal to Dummies[3]
            Then - Actions
                Set TempPt = (Position of (Triggering unit))
                Unit - Order Elemental 0115 <gen> to Orc Tauren Chieftain - Shockwave TempPt
                Custom script:   call RemoveLocation (udg_TempPt)
            Else - Actions

i just dont want dummy units for spells to fire this trigger
so i set each dummy unit to the variable Dummies[]
and i want to know if therse a shorter way then doing
If - Conditions
(Unit-type of (Triggering unit)) Not equal to Dummies[0]
(Unit-type of (Triggering unit)) Not equal to Dummies[1]
(Unit-type of (Triggering unit)) Not equal to Dummies[2]
(Unit-type of (Triggering unit)) Not equal to Dummies[3]
(Unit-type of (Triggering unit)) Not equal to Dummies[4]
(Unit-type of (Triggering unit)) Not equal to Dummies[5]
...
(Unit-type of (Triggering unit)) Not equal to Dummies[50]
(Unit-type of (Triggering unit)) Not equal to Dummies[51]
etc
 

xmkiller

New Member
Reaction score
6
Whats do the dummy[xx] units do? If they are for spells then.

You can just use the same dummy unit to do everything. This is how I do my dummy units:

Code:
Actions
    Set tempPoint = (Position of (Casting unit))
    Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at tempPoint facing Default building facing degrees
    Unit - Add Shadow AoE (dummy) to (Last created unit)
    Unit - Set level of Shadow AoE (dummy) for (Last created unit) to (Level of Shadow Step  for (Casting unit))
    Unit - Order (Last created unit) to Night Elf Warden - Fan Of Knives
    Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
    Custom script:   call RemoveLocation (udg_tempPoint)

I create the dummy unit, add the abilities I want it to cast, set the level of the abilities then destroy it. This way you wont have to have 100s of dummy units.



I came across a similar problem like this. There is no loop to do condition checks that I am aware of.
 

xmkiller

New Member
Reaction score
6
I know. I don't think there is any way to have a loop to check units in conditions, so I gave you a way to limit the number of dummy units to a very minimal amount.
 

xmkiller

New Member
Reaction score
6
you clearly dont understand what im asking for, sorry.

I perfectly understand what your asking for, I am simply giving you another route to fix it. By having only 1 dummy unit you won't have to check 50 different dummy units thus giving you what you want.
 

BRUTAL

I'm working
Reaction score
118
then what was
Code:
Actions
    Set tempPoint = (Position of (Casting unit))
    Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at tempPoint facing Default building facing degrees
    Unit - Add Shadow AoE (dummy) to (Last created unit)
    Unit - Set level of Shadow AoE (dummy) for (Last created unit) to (Level of Shadow Step  for (Casting unit))
    Unit - Order (Last created unit) to Night Elf Warden - Fan Of Knives
    Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
    Custom script:   call RemoveLocation (udg_tempPoint)
for if i was only interested in the if conditions
 

xmkiller

New Member
Reaction score
6
I was showing you how to freakin make only 1 dummy unit do everything instead of many dummy units doing different things.

By setting the ability to the unit after its created will allow you to reuse the dummy unit over and over again.
 

BRUTAL

I'm working
Reaction score
118
Code:
BlazeOne
    Events
        Unit - A unit comes within 2000.00 of Elemental 0115 <gen>
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Triggering unit)) Not equal to Dummies[0]
                (Unit-type of (Triggering unit)) Not equal to Dummies[1]
                (Unit-type of (Triggering unit)) Not equal to Dummies[2]
                (Unit-type of (Triggering unit)) Not equal to Dummies[3]
            Then - Actions
                Set TempPt = (Position of (Triggering unit))
                Unit - Order Elemental 0115 <gen> to Orc Tauren Chieftain - Shockwave TempPt
                Custom script:   call RemoveLocation (udg_TempPt)
            Else - Actions

read the trigger
 

saw792

Is known to say things. That is all.
Reaction score
280
Brutal you don't get it.

The point xmkiller has been making this ENTIRE thread is:

WHY DO YOU NEED SO MANY DUMMY TYPES?

Explain that, and we can help you find alternatives.
 

saw792

Is known to say things. That is all.
Reaction score
280
Well do you? Tell me why you think you would need that many dummy types? What are they being used for?
 

saw792

Is known to say things. That is all.
Reaction score
280
No... you just recycle the same one. As xm has been saying the entire thread.

The only reason you would use different dummy types is if they are being used as special effects, ie they each have different models that you are supposed to see. If they are just used to cast spells then you only need one.
 

BRUTAL

I'm working
Reaction score
118
do you think theyre all the same one just becausde the variable name is Dummy[] :nuts:

Code:
Set Dummies[0] = Dummy
        Set Dummies[1] = Scorpion/Bloody Spear
        Set Dummies[2] = Scorpion/Bloody Spear rope
        Set Dummies[3] = Scorpion/Hellfire Punch
        Set Dummies[4] = Scorpion/Hellfire Punch2
        Set Dummies[5] = Sub-Zero/Ice Clone
        Set Dummies[6] = Sub-Zero/Ice Pillar dummy
        Set Dummies[7] = Sub-Zero/Ice Pillar ice
        Set Dummies[8] = Chameleon/Speedy Serpent
        Set Dummies[9] = Raiden/Torpedo
^ Dummies
 

Jagan

New Member
Reaction score
30
This is the FIRST time you're showing us that. How are we supposed to know?
 

saw792

Is known to say things. That is all.
Reaction score
280
Of course I knew they weren't the same one. You still haven't answered the damn question, although I can now guess at the answer. I ask you why would you need that many dummies. You reply "Do I?". I ask you what reasons you think you might need more than one dummy type. You reply with another question to me about using multiple dummies in spells. I explain that you only need multiple dummies if they are being used as special effects. You reply by posting your trigger setting the variables. Can you guess what would have been easier than putting us (me) through all this bullsh*t? Saying "I am using multiple dummies for special effects".

You are the most frustrating person I have ever had to respond to.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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