• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

Complicated Spell Assistance

Status
Not open for further replies.
Level 1
Joined
Mar 11, 2006
Messages
3
I was wondering if anyone could help me with two spells for a hero I'm making.

Spell 1: This one's much easier than the other. The hero takes three blinks stepped one after the other, after each he leaves an illusion behind.

Spell 2: This one is a doosey. The hero becomes invisible and meanwhile, four illusions of himself are created each a set numer of units from the the position of the heroes at each direction.

To Illustrate:
////////////
////////////
/////X/////
////////////
////////////

After Spell

//////X/////
/////////////
//X//O//X//
/////////////
//////X/////

Any help would be much appreciated. On a side note. Is it possible to upgrade the % damage taken by images and % damage dealt using a passive ability?

Thanks,

-Gurgi
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
1.
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Set Point[0] = (Position of (Triggering unit))
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • Set Point[1] = (Position of (Triggering unit))
          • Unit - Create 1 Footman for (Owner of (Triggering unit)) at Point[(Integer A)] facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_Point[1])
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Hero - Create Wand of Illusion and give it to (Last created unit)
          • Hero - Order (Last created unit) to use (Last created item) on (Triggering unit)
          • Set Point[(Integer A)] = (Point[0] offset by 100.00 towards (Facing of (Triggering unit)) degrees)
          • Special Effect - Create a special effect at Point[(Integer A)] using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Move (Triggering unit) instantly to Point[(Integer A)]
          • Custom script: call RemoveLocation(udg_Point[(GetForLoopIndexA())])
          • Wait 0.05 seconds
        • Custom script: call RemoveLocation(udg_Point[0])
2.
  • Untitled Trigger 003
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Set Point[0] = (Position of (Triggering unit))
      • Unit - Add Wind Walk to (Triggering unit)
      • Unit - Order (Triggering unit) to Orc Blademaster - Wind Walk
      • Unit - Remove Wind Walk from (Triggering unit)
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • Set Point[(Integer A)] = (Point[0] offset by 100.00 towards (90.00 x (Real((Integer A)))) degrees)
          • Unit - Create 1 Footman for (Owner of (Triggering unit)) at Point[(Integer A)] facing Default building facing degrees
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Hero - Create Wand of Illusion and give it to (Last created unit)
          • Hero - Order (Last created unit) to use (Last created item) on (Triggering unit)
          • Custom script: call RemoveLocation(udg_Point[(GetForLoopIndexA())])
        • Custom script: call RemoveLocation(udg_Point[0])
Warning! neither of this triggers are MUI !

Side questions:

1. Check the Item Illusions ability (its the ability the Wand of Illusions use).

2.
and % damage dealt using a passive ability?

What do you mean ?
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
hey GhostWolf
---bad news---
Create X units in X location for X player with X facing
Creates a group

---good news---
easy be destroyed with
call DestroyGroup(bj_lastCreatedGroup) after unit creation


Get a JassCraft (or NewGen)
 
Level 1
Joined
Mar 11, 2006
Messages
3
Sorry about the delay in response, I feel bad. x.x

Ghostwolf: I mean that the images deal say 50% damage and take 200% by default, each level in this passive increases % damage dealt and reduces % damage taken by these images.\

-Gurgi
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
It recycles the group, no need to worry.

JASS:
function CreateNUnitsAtLoc takes integer count, integer unitId, player whichPlayer, location loc, real face returns group
    call GroupClear(bj_lastCreatedGroup)
    loop
        set count = count - 1
        exitwhen count < 0
        call CreateUnitAtLocSaveLast(whichPlayer, unitId, loc, face)
        call GroupAddUnit(bj_lastCreatedGroup, bj_lastCreatedUnit)
    endloop
    return bj_lastCreatedGroup
endfunction
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
WHAT THE
I was pretty sure there is a CreateGroup() inside it :(
then dont destroy the group it may cause thread crash later or something
(I think adding players to uncreated force causes thread crash and game crash in initialization)
 
Level 1
Joined
Mar 11, 2006
Messages
3
Okay! Thanks. And apparently each post needs to be at least 15 characters long and this is a very subtle way of making it fit all these qualifications... :D
 
Status
Not open for further replies.
Top