Using an item..

sentrywiz

New Member
Reaction score
25
i think your brackets are wrong..

what you said is the level of the ability x10.

---



i presume u want this then:

(Random real number between 1.00 and 100.00) Greater than or equal to ((Real((Level of Critical Strike for (Attacked unit) x 5.00) + 5.00))

---

also sentrywiz's method would only work for one player..


I'm not sure that my brackets are wrong, but not sure they are right. Your right, I feared that it would first do 5 + 5 and then do multiplication with level of ability. But I didn't add a test to see what the chance really was, so yea it may have a problem there.


My method would work for one player because of the timer, but I can make a MUI that would work. If King.Sky_Gem needs it though...
 

King.Sky_Gem

New Member
Reaction score
2
Ahh I found one problem:
There are 3 different wand of illusions (each one is stronger than the other one). One for each level of the ability.
 

sentrywiz

New Member
Reaction score
25
Ahh I found one problem:
There are 3 different wand of illusions (each one is stronger than the other one). One for each level of the ability.


Now your telling me? -.-


You should of said you made three wand of illusions. You didn't mention this in your ability description, you only wanted more chance per level.


Will see, what I can do tommorow now I did some heavy triggering and not in the mood :p
 

Moridin

Snow Leopard
Reaction score
144
Now your telling me? -.-
You really should read the thread with the triggers a little more. If you had looked at King's earlier trigger you would have noticed that he is giving three different abilities to the dummies for each level.

There is still a way to use an easy for loop though. Just assign the abilities to an ability array.
 

sentrywiz

New Member
Reaction score
25
You really should read the thread with the triggers a little more. If you had looked at King's earlier trigger you would have noticed that he is giving three different abilities to the dummies for each level.

There is still a way to use an easy for loop though. Just assign the abilities to an ability array.


I have. But you should of read the original thread request, its not abilities its an item use. You guys used ability ideas. The trigger I made is just for that, an item use. But King didn't say he wanted every level to have a different item with more powerful things.

Its still do-able, but I appreciated if he said exactly what he wanted earlier not 10 minutes to midnight. That's what its all about no?
 

Inflicted

Currently inactive
Reaction score
63
this isnt that much harder then..

just make 3 IF/THEN/ELSE statements and then show the different abilities/items.

or am i missing something?
 

sentrywiz

New Member
Reaction score
25
this isnt that much harder then..

just make 3 IF/THEN/ELSE statements and then show the different abilities/items.

or am i missing something?


Your not missing anything. But I am waiting on King to tell me what does he need the other 3 items to do, hence I can surely just copy-paste wand of illusion both ability and items, but then I am just doing what I want, not what he wants.
 

Inflicted

Currently inactive
Reaction score
63
wait a sec, is it a chance on all levels? like 15% to do a weak ilus/10% to do an average ilus/5% to do a stronger ilus?

or like an ability has 3 levels and each level has a different item/ability?

i feel that there might be an odd sort of problem if you want all 3 chances at once, cos then you might have 3 ilussions spawn..

make it clear what you want done please.
 

Inflicted

Currently inactive
Reaction score
63
Level 1: 10%
Level 2: 15%
Level 3: 20%

is that the extra damage or the chance ? :/

im going to assume thats the chance.

Trigger:
  • Events
    • Unit - A unit Is attacked
    • Conditions
    • Or - Any (Conditions) are true
      • Conditions
        • (Level of Your Ability for (Attacking unit)) Equal to 1
        • (Level of Your Ability for (Attacking unit)) Equal to 2
        • (Level of Your Ability for (Attacking unit)) Equal to 3
    • Events
    • If - (Level of Your Ability for (Attacking unit)) Equal to 1
    • Then - Actions
      • If - (Random integer number between 1 and 100) Less than or equal to 10
      • Then - Actions
        • Unit - Create 1 Dummy unit for (Owner of (Attacking Unit) at (Position of (Attacking Unit)) facing Default building facing degrees
        • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        • Hero - Create Wand of Illusion[lvl1] and give it to (Last created unit)
        • Custom script: call IssueTargetOrderById(bj_lastCreatedUnit, 852275, GetTriggerUnit())
    • If - (Level of Your Ability for (Attacking unit)) Equal to 2
    • Then - Actions
      • If - (Random integer number between 1 and 100) Less than or equal to 15
      • Then - Actions
        • Unit - Create 1 Dummy unit for (Owner of (Attacking Unit) at (Position of (Attacking Unit)) facing Default building facing degrees
        • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        • Hero - Create Wand of Illusion[lvl2] and give it to (Last created unit)
        • Custom script: call IssueTargetOrderById(bj_lastCreatedUnit, 852275, GetTriggerUnit())
    • If - (Level of Your Ability for (Attacking unit)) Equal to 3
    • Then - Actions
      • If - (Random integer number between 1 and 100) Less than or equal to 20
      • Then - Actions
        • Unit - Create 1 Dummy unit for (Owner of (Attacking Unit) at (Position of (Attacking Unit)) facing Default building facing degrees
        • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        • Hero - Create Wand of Illusion[lvl3] and give it to (Last created unit)
        • Custom script: call IssueTargetOrderById(bj_lastCreatedUnit, 852275, GetTriggerUnit())


---

actually i dont think this would work, that custom script call i think won't work on Custom Abilities, or then the abilityID will be different - just check on that.

if u cant call Custom Abilities like that. Maybe use different levels on the ability and just up that? or maybe just do something like:

Order (Last created unit) to cast (Last created item) on (Attacking unit).

i dont know if this will work, iv never tried it.
 

sentrywiz

New Member
Reaction score
25
I've made what you wanted. Well, we are in argument because you don't exactly know what you want, you want illusions to last long, but then you want them to deal damage and maybe the chance is little you want it more.


I will explain it to you here, and you can change everything you want yourself. Also, the map will be uploaded, so you can download it, see how it is and copy-paste the triggers if you aren't in mood to create them yourself.


NOTE: This is not MUI, MPI ability. If you want it mui/mpi someone else might do that. For now, this works superb only as a one player, one unit ability.


TABLE OF CONTENTS - What needs to be changed
  1. Priest is the dummy unit. He is also responsible for the whole thing with the items. He has locust and inventory (hero) while model is bugger so it cannot be seen. Modify those if you want it changed
  2. Mountain King is just the hero for testing. Bash is the ability I chose to test on. Modify those with your hero and your ability.
  3. Removing the following line will give you a new possibility, Illusions have the same chance as the hero and can possibly be replicated. Remove it if you want illusions to have 10/15/20% chance of creating an illusion of the illusion. If you don't want that, just leave it as it is.

    Trigger:
    • ((Attacked unit) is an illusion) Equal to False

  4. The following lines are just for testing. You can remove them all. Timer Window displays the time before the trigger can be used again. The first game message displays the chance of the current level of the ability and the second displays the item the Priest has before it is destroyed and before it casts the item on the Mountain King.

    Trigger:
    • Countdown Timer - Create a timer window for (Last started timer) with title Ability Off For

    Trigger:
    • Game - Display to (All players) for 5.00 seconds the text: (Illusion Proc Chance: + (String((((Level of Bash for (Attacked unit)) x 5) + 5))))

    Trigger:
    • Game - Display to (All players) for 2.00 seconds the text: (Priest has item: + (Name of (Last created item)))

  5. Three items for Wand of Illusion were created, two custom and the original ones. I've also edited the ability "Item Illusions" you can find in Special>Items in the ability section. The following line checks the level of the Bash ability for Mountain King and therefor creates one of the items in the array. Modify this if you wish, be careful to not remove the items or add them a different value.

    Trigger:
    • Set ItemArray[1] = Wand of Illusion
      • Set ItemArray[2] = Wand of Illusion#2
      • Set ItemArray[3] = Wand of Illusion#3

  6. If you want to edit the chance for the ability, tinker with the formula, create your own or ask around the forum to help you out:

    Trigger:
    • (Random real number between 1.00 and 100.00) Less than or equal to (Real((((Level of Bash for (Attacked unit)) x 5) + 5)))

  7. You will find all of the items in the item section. One is the original and two other are under custom. Same for their abilities, one is original and the two other are in custom.

    Trigger:
    • Hero - Create ItemArray[(Level of Bash for (Attacked unit))] and give it to (Last created unit)




Full Triggers:


Trigger:
  • Illusion Proc
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacked unit)) Equal to Mountain King
      • ((Attacked unit) is an illusion) Equal to False
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random real number between 1.00 and 100.00) Less than or equal to (Real((((Level of Bash for (Attacked unit)) x 5) + 5)))
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Game - Display to (All players) for 5.00 seconds the text: (Illusion Proc Chance: + (String((((Level of Bash for (Attacked unit)) x 5) + 5))))
          • Countdown Timer - Start Timer as a One-shot timer that will expire in 30.00 seconds
          • Countdown Timer - Create a timer window for (Last started timer) with title Ability Off For
          • Set Timer = (Last started timer)
          • Unit - Create 1 Priest for (Owner of (Attacked unit)) at ((Position of (Attacked unit)) offset by 125.00 towards (Facing of (Attacked unit)) degrees) facing Default building facing degrees
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Hero - Create ItemArray[(Level of Bash for (Attacked unit))] and give it to (Last created unit)
          • Game - Display to (All players) for 2.00 seconds the text: (Priest has item: + (Name of (Last created item)))
          • Hero - Order (Last created unit) to use (Last created item) on (Attacked unit)
        • Else - Actions



Trigger:
  • AntiAbuse
    • Events
      • Time - Timer expires
    • Conditions
    • Actions
      • Countdown Timer - Destroy (Last created timer window)
      • Trigger - Turn on Illusion Proc <gen>




Trigger:
  • Variables
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set ItemArray[1] = Wand of Illusion
      • Set ItemArray[2] = Wand of Illusion#2
      • Set ItemArray[3] = Wand of Illusion#3



This is what the ability does now:

Level 1 - 10% chance to create an illusion that lasts 60 seconds, receives 200% bonus damage from enemies and deals no damage.

Level 2 - 15% chance to create an illusion that lasts 60 seconds, receives 200% bonus damage from enemies and deals 25% damage.

Level 3 - 20% chance to create an illusion that lasts 60 seconds, receives 200% bonus damage from enemies and deals 50% damage.


And for the next time, not to be rude or anything but do KNOW what you want your ability to do. And make a good list displaying levels, abilities, stuff, stuff, yada yada. This makes it all easier for people that are happy to help you but don't quite "get" completely what your ability is to do.
 

Attachments

  • Illusion.w3x
    18.9 KB · Views: 236

Inflicted

Currently inactive
Reaction score
63
i still dont think a countdown timer is nessesary for an ability..

cos imagine you did with other abilties and you wanted timers for like waves or watever, then you'd have timers all over the top of the screen, would be irritating. i dont recommend.

but ag it should work.

look at this line:

Trigger:
  • Unit - Create 1 Priest for (Owner of (Attacked unit)) at ((Position of (Attacked unit)) offset by 125.00 towards (Facing of (Attacked unit)) degrees) facing Default building facing degrees


i assume this "Priest" is the dummy unit? correct?

I've tried this before, it hasn't ever worked for me.

ok, just checking.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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