1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  4. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  5. The results are out! Check them out.
    Dismiss Notice
  6. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  7. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Making a Mislead Spell

Discussion in 'Triggers & Scripts' started by Nemitri, Nov 18, 2010.

  1. Nemitri

    Nemitri

    Joined:
    Nov 15, 2010
    Messages:
    29
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Hi I'm trying to make a simple spell that whenever the hero casts it it makes him invisible (just like wind walk) and at the same time it creates a duplicate of him that deals X% damage and takes X% damage (I was using the item spell that makes illusions, but the GUI doesn't have an Order Id that i can make the dummy unit cast it!)

    Thanks in advance
     
  2. Raven0

    Raven0

    Joined:
    Oct 16, 2010
    Messages:
    878
    Resources:
    2
    Maps:
    2
    Resources:
    2
  3. 88WaRCraFT3

    88WaRCraFT3

    Joined:
    Jun 9, 2009
    Messages:
    1,139
    Resources:
    1
    Spells:
    1
    Resources:
    1
    For example, instead of converting, you can use item.
    Wand of Illusions is item called, if i'm not wrong, i can make the spell for you. Do you want it MUI? Or what?
     
  4. Nemitri

    Nemitri

    Joined:
    Nov 15, 2010
    Messages:
    29
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I would only like the instructions to force the dummy to cast the item version of wand of illusion, i can do the rest :)
     
  5. 88WaRCraFT3

    88WaRCraFT3

    Joined:
    Jun 9, 2009
    Messages:
    1,139
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Under Category "Hero" there is action called Use Item ;) and much of them like Use item on Unit, Use item a point etc...
     
  6. watermelon_1234

    watermelon_1234

    Joined:
    Nov 18, 2007
    Messages:
    1,066
    Resources:
    10
    Spells:
    9
    JASS:
    1
    Resources:
    10
    Since GUI doesn't have an order string for the Illusion ability, you need to use JASS in order to issue the order by id.
    • Custom script: call IssueTargetOrderById(bj_lastCreatedUnit,852274,GetTriggerUnit())
    In this example, the last created unit will cast the ability on the triggering unit. 852274 is the order id of the ability.
     
  7. Nemitri

    Nemitri

    Joined:
    Nov 15, 2010
    Messages:
    29
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Im not very familiar with jass, do i just copy that or do i need to make another tirgger with further instructions or its a jass default? (the custom script: call IssueTargetOrderbyID part).

    Actually yeah, i think ill just use the item version, give the unit an item and order it to use the item on the caster, much easier i guess.
     
  8. Berb

    Berb

    Joined:
    Jan 21, 2006
    Messages:
    2,539
    Resources:
    2
    JASS:
    2
    Resources:
    2
    You would just use that exact line; copy the same thing he has typed into the Custom Script action (it is in the GUI).
     
  9. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    Maybe this link will help you
    I did it, with Dummy Unit, having Inventory ability and order that particular unit through "Hero - Use Item On Unit" action
     
  10. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,193
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    ^Or you could skip the item/inventory and give the dummy the ability, not the item.
     
  11. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    If you skip the Inventory + dummy creation, you're gonna need Custom script
    If you hate Custom script, well, use Inventory + Dummy =D
    Your choice, but I think Custom script has more efficiency as it is in JASS (typing language...)
    Right, Maker ?
     
  12. watermelon_1234

    watermelon_1234

    Joined:
    Nov 18, 2007
    Messages:
    1,066
    Resources:
    10
    Spells:
    9
    JASS:
    1
    Resources:
    10
    What's so bad about custom script?
    Really, it's not that hard to use custom script for this and it's even easier considering that you don't need to make a useless item for a dummy unit to have. Technically, it's even easier to copy since you just need to copy the text instead of having to go through multiple clicking in GUI.

    Anyway, I suppose I should have given you the a better example of the trigger:
    • IllusionSpell
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Mislead
      • Actions
        • Set TempLoc = (Position of (Triggering unit))
        • Unit - Create 1 DummyUnit for (Triggering player) at TempLoc facing Default building facing degrees
        • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        • Unit - Add Item Illusions to (Last created unit)
        • Custom script: call IssueTargetOrderById(bj_lastCreatedUnit,852274,GetTriggerUnit())
        • Custom script: call RemoveLocation(udg_TempLoc)
    This would basically cause a dummy unit

    Mislead should be a custom ability based off of Wind Walk.
     
  13. Nemitri

    Nemitri

    Joined:
    Nov 15, 2010
    Messages:
    29
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Can units use item using the hero command use item on unit even tho they are not heroes?
     
  14. Nemitri

    Nemitri

    Joined:
    Nov 15, 2010
    Messages:
    29
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Are those 2 custom scripts default to warcraft or must i create them?
     
  15. Nemitri

    Nemitri

    Joined:
    Nov 15, 2010
    Messages:
    29
    Resources:
    1
    Maps:
    1
    Resources:
    1
    well i was able to make the spell, but its leaktastic XD
     
  16. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    Yes, they can
    Heroes Action is just for the name...
    It can be used by Unit and Hero alike, don't worry
    Refer Mind Illusion Spell over here, this spell is my product
    Credits goes to WaterKnight for teaching me to use that action and the Custom Script usage
    Maybe this thread can help you out
     
  17. watermelon_1234

    watermelon_1234

    Joined:
    Nov 18, 2007
    Messages:
    1,066
    Resources:
    10
    Spells:
    9
    JASS:
    1
    Resources:
    10
    I suppose you're misunderstanding something about Custom Script.
    This function basically allows you to have a line of Jass in your trigger.
    Unlike the other GUI functions, it only takes in text for the Jass language.

    So to do
    • Custom script: call IssueTargetOrderById(bj_lastCreatedUnit,852274,GetTriggerUnit())
    scroll down to Custom Script in the function list.
    Paste call IssueTargetOrderById(bj_lastCreatedUnit,852274,GetTriggerUnit()) into the text field.

    You would do something similar with the other custom script.