Blizzard Modding Network

Blizzard Modding Information Center Starcraft II Modding Information Center Wacraft III Modding Information Center WC3JASS.com - The JASS Vault Chaos Arena - A Warcraft III mod
Check all that happens in this network through BLIZZARD MODDING.INFO

* Announcements!!

  • We're now at wc3 top 200 lists. Please vote for us.
  • WC3jass.com has a new theme, very similar to the original but lighter to load. If you have any suggestions or comments about it, just post it here.
  • We are getting more social!!! Visit the new social group section and create your own group with your friends

Jass New Gen Pack

Download Jass New Generation Pack (JNGP) to use all the vJASS & Zinc scripts posted in any of the Blizzardmodding sites.

Author Topic: [Snippet] AddSpecialEffectZ  (Read 2108 times)

Online Purgeandfire

  • Newbie - level 4
  • ****
  • Posts: 35
  • Reputation: 13
  • Referrals: 0
    • View Profile
    • Awards
[Snippet] AddSpecialEffectZ
« on: August 09, 2012, 05:28:22 PM »
Another simple snippet. It is the good ol' technique to make an effect have a Z-coordinate, allowing it to float Z units above the ground.

It works by creating an invisible platform, adding the effect, and then removing the platform.

Note: Creating too many at a time can cause short lag spikes. If this occurs, you may want to switch to use invisible dummy units instead.
Code: jass
  1. library SpecialEffectZ /* v1.0.0.0
  2. *******************************************************************
  3. *
  4. *    Allows you to add a special effect with a Z value.
  5. *
  6. *******************************************************************
  7. *
  8. *    function AddSpecialEffectZ takes string model, real x, real y, real z returns effect
  9. *
  10. *******************************************************************/
  11.  
  12.     globals
  13.         private destructable platform
  14.         private effect zEffect
  15.     endglobals
  16.  
  17.     function AddSpecialEffectZ takes string model, real x, real y, real z returns effect
  18.         set platform = CreateDestructableZ('OTip', x, y, z, 0, 1, 0)
  19.         set zEffect = AddSpecialEffect(model, x, y)
  20.         call RemoveDestructable(platform)
  21.         return zEffect
  22.     endfunction
  23.  
  24. endlibrary
« Last Edit: August 09, 2012, 08:45:29 PM by Purgeandfire »

Online moyack

  • Site Owner
  • Administrator
  • Frequent - level 2
  • *
  • Posts: 1707
  • Reputation: 1144
  • Site Admin - I love fix things
  • Referrals: 0
    • View Profile
    • Blizzard Modding Information Center
    • Awards
Re: [Snippet] AddSpecialEffectZ
« Reply #1 on: August 09, 2012, 09:12:27 PM »
Simplicity is the best. Approved of course :)


We can give you full hosting for your projects. Not only a forum, a complete page!!.

A custom altered melee map where you can play Naga and Demons. Featuring a nice additions in features and game style. Check it out!!

Online LembidiZ

  • Rookie - level 1
  • *
  • Posts: 67
  • Reputation: 2
  • A FRENGERS
  • Referrals: 0
    • View Profile
    • Awards
Re: [Snippet] AddSpecialEffectZ
« Reply #2 on: August 13, 2012, 07:37:03 PM »
I just interest with the title, but i don't understand how to set it :( :( Y.Y Y.Y
But, can that special effect add on invisible unit?? But that effect will show, even the unit are invisible. ( Like DotA - Nightcrawler ultimate )

Online Purgeandfire

  • Newbie - level 4
  • ****
  • Posts: 35
  • Reputation: 13
  • Referrals: 0
    • View Profile
    • Awards
Re: [Snippet] AddSpecialEffectZ
« Reply #3 on: August 13, 2012, 09:43:44 PM »
This basically allows you to have a z coordinate (elevation) for your effects. It just lets you have effects in air.

For units, you can just use the native AddSpecialEffectTarget()

Online LembidiZ

  • Rookie - level 1
  • *
  • Posts: 67
  • Reputation: 2
  • A FRENGERS
  • Referrals: 0
    • View Profile
    • Awards
Re: [Snippet] AddSpecialEffectZ
« Reply #4 on: August 14, 2012, 12:06:10 AM »
Oh, ok i understand now ;) ;)
Z is ^ @.@
Thank'z ;) ;)
+ REPT

Tags:
 

[Snippet] Timed Effects

Started by moyack

Replies: 0
Views: 882
Last post January 09, 2012, 07:03:32 PM
by moyack
[Snippet] StringIndexer

Started by Magtheridon96

Replies: 1
Views: 1086
Last post September 02, 2012, 11:51:03 AM
by moyack
[Snippet] Parabolic Function

Started by moyack

Replies: 1
Views: 852
Last post January 13, 2012, 12:11:45 PM
by Magtheridon96
[Snippet] RegisterAnyUnitEvent

Started by moyack

Replies: 2
Views: 933
Last post February 12, 2012, 09:20:29 PM
by moyack
[Snippet] RegisterPlayerUnitEvent

Started by Magtheridon96

Replies: 15
Views: 3858
Last post October 11, 2012, 09:27:33 PM
by moyack
  UDMod Mod DB - Change the Game Power of Corruption - A Warcraft III altered melee map Chaos Realm - The world of Game modders and wc3 addicts Vote for Blizzmod at Warcraft 3 Top 200 - Cheats Free Clans and Resources