Image generation ability

Infinity.4Sk

New Member
Reaction score
6
For a map which i am making, im first testing out a few heroes and abilities in another map, and then i remake them for the map itself, 1 of the abilities I'm tring to create is a passive ability, which has a chance to generate the user As an image, as some of you know, I mean an ability like Juxtapose in DotA.
can someone help me ? (I'm really stuck and I suck at recreating abilities which arent my own, or explained to me :banghead:)
+ rep for anyone who helps :) (just to tell you theres something in it for you :p) and I may decide to put you in the credits.
-----------------------------------------------------------------------
Juxtapose

Whenever the Phantom Lancer attacks he will randomly create a duplicate of himself. Limit of 8 images.
Duplicates last 15 seconds.

Level 1 - 3% chance.
Level 2 - 6% chance.
Level 3 - 9% chance.
Level 4 - 12% chance.

Passive
--------------------------------------------------------------------------
 

wewso

New Member
Reaction score
11
You can do 2 things:

1. Add Mirror Image ability to the unit. Order the unit to cast it and then remove the ability.
or
2. Write your own "Mirror image" spell trigger (I can do it for you if you cant):thup:
 
C

Chindril

Guest
On attack, create a dummy unit with the Ability of the Wand of illusion and order the dummy to cast it on the Hero.

Mirror image wouldn't work, it takes too long to cast, you lose control for a bit AND your hero is moved by the spell.

- Chindril
 

Infinity.4Sk

New Member
Reaction score
6
Ok so,
I should make a dummy (which shouldnt be a visible one.) and then I have to recreate the wand of illusion images? (with damage gain dealt etcentra) and i should make the ability like uhm... bash and make a trigger which says on trigger cast the wand from the dummy to my unit?
edit>-- the triggering unit?
please excuse me if I sound confusing :p
 
K

Kyrios

Guest
some people can't read jass.

You can do "Set IntegerReal = Random Integer between 1-100"

then set "If Than Else Functions" condition to "If IntegerReal is less than or equal to 20 (20% in this case)

and then under the actions, just set the triggers there
 

error0024

New Member
Reaction score
8
Heres the map ,limit image is 9
 

Attachments

  • Illusion Creation Passive.w3x
    18.7 KB · Views: 113

Infinity.4Sk

New Member
Reaction score
6
Ok so i used the following triggers :

Code:
Creation
    Events
        Unit - A unit Is attacked
    Conditions
        ((Attacked unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True
        (Level of Nightmare  for (Attacking unit)) Greater than 0
        ((Attacking unit) is A Hero) Equal to True
        ((Attacking unit) is an illusion) Equal to False
    Actions
        Set chance2[(Player number of (Owner of (Attacking unit)))] = (Random integer number between 1 and 100)
        Set caster_unit[(Player number of (Owner of (Attacking unit)))] = (Attacking unit)
        Set target_unit[(Player number of (Owner of (Attacking unit)))] = (Attacked unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                chance2[(Player number of (Owner of (Attacking unit)))] Less than or equal to (3 x (Level of Nightmare  for caster_unit[(Player number of (Owner of (Attacking unit)))]))
                illusioncreated[(Player number of (Owner of (Attacking unit)))] Less than or equal to 15
            Then - Actions
                Unit - Create 1 Illusion Caster for (Owner of caster_unit[(Player number of (Owner of (Attacking unit)))]) at (Position of caster_unit[(Player number of (Owner of (Attacking unit)))]) facing (Position of (Triggering unit))
                Item - Create Wand of Illusion at (Position of (Last created unit))
                Hero - Give (Last created item) to (Last created unit)
                Hero - Order (Last created unit) to use (Last created item) on caster_unit[(Player number of (Owner of (Attacking unit)))]
                Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                Set illusioncreated[(Player number of (Owner of (Attacking unit)))] = (illusioncreated[(Player number of (Owner of (Attacking unit)))] + 1)
                Set chance2[(Player number of (Owner of (Attacking unit)))] = 0
                Set caster_unit[(Player number of (Owner of (Attacking unit)))] = No unit
                Set target_unit[(Player number of (Owner of (Attacked unit)))] = No unit
            Else - Actions
                Do nothing

And
Code:
Creation done
    Events
        Time - Every 15.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 9, do (Actions)
            Loop - Actions
                Set illusioncreated[(Integer A)] = (illusioncreated[(Integer A)] - 1)


now the problem is : after some time wands of illusions are created at the attacked units' position, this happens after a certain time so not straight away, anyone know how to fix this?
 

Psiblade94122

In need of sleep
Reaction score
138
you know, you can make wand of illusion a powerup then give it to the hero, that way you dont need to spawn a dummy unit

you can still detect the illusion by checking if the entering unit is an illusion and is a specific unit type
 

Infinity.4Sk

New Member
Reaction score
6
Okay fixed that problem, (wand of illus had 3 charges instead of 1 (stupid me)) but now I have another problem, after some time, the image generation seems to deteriorate, and by that i mean images are generated at a much slower speed. (chance should be 12%, and even at 20% these images dont generate very fast)

Also, there is another bug, on attack means the chance will go before attack, so if someone were to use the 'stop' function in a high rate of repetition, images would generate at an increased speed without dealing damage, (this bug is the same with the dota spell Juxtapose, and Barathrums' Empowering haste, Rikimaru's backstab, Jakiro's autofire) and probably some others.

Anyone know how to fix these two things
 

Infinity.4Sk

New Member
Reaction score
6
no suggestions as to how i oculd fix this problem? :( i could ofcourse copy and paste a jass version of this ability...
 

darkbeer

Beer is Good!
Reaction score
84
create a dummy(cast animation/backswing time usw.... ) add item wand of illusion ability and use the order id:

Code:
Custom scipt: call IssueTargetOrderById(bj_lastCreatedUnit, 852274, GetTriggerUnit())

with the dummy being last created unit and the caster triggering unit this should work.
 

Infinity.4Sk

New Member
Reaction score
6
Forgive me but I dont understand what you mean :(

Do I have to change wand of illusion into being an ability, and then give the dummy unit I use that ability, and instead of using the lines
Code:
Hero - Create Wand of Illusion and give it to (Last created unit)
Code:
Hero - Order (Last created unit) to use (Last created item) on caster_unit[(Player number of (Owner of (Attacking unit)))]
use:
Code:
Custom scipt: call IssueTargetOrderById(bj_lastCreatedUnit, 852274, GetTriggerUnit())

could it possibly that easy? :p

oh and what should i make the cast animation and backswing time to, 0?
 

darkbeer

Beer is Good!
Reaction score
84
yea simply create an ability base of wand of illusion add it to a dummy and use the line i told you.

yea make them(cast time/animation time ....) 0 for instant cast
 

Infinity.4Sk

New Member
Reaction score
6
:confused:

I tried it: removed the two actions as posted above
then placed the custom script where they used to be
and then i get:


Error line 1029: unexpected 'endif'
Code:
        Custom scipt: call IssueTargetOrderById(bj_lastCreatedUnit, 852274, GetTriggerUnit())

Havent the faintest clue what to do now :(
 
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