• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] 'Special effect' custom script.

Status
Not open for further replies.
Level 14
Joined
Aug 8, 2010
Messages
1,022
Hello! I want to ask how i can create a special effect with a custom script in GUI. I create the special effect with the normal GUI action :
  • Special Effect - Create a special effect at GFXPoint using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
but the effect is created on the ground. I want it's height to be 150 and i think this could be made in jass.
 

Cokemonkey11

Code Reviewer
Level 29
Joined
May 9, 2006
Messages
3,522
Jass unfortunately also cannot create effects with a z component without a dummy unit.

Try this (should also work in GUI:)

  1. create a dummy unit using dummy.mdx, Aloc and Arav.
  2. set var=create unit
  3. set unit fly height = 150 game units
  4. set fx = attach special effect using farseermissile.mdl to var
  5. destroy effect fx
  6. recycle the unit how you please (kill/remove/apply timed life/reuse)
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
You can do something like this,

  • Set GFXPoint = somepoint
  • Custom script: set udg_DestructibleVariable = CreateDestructableZ('OTip', GetLocationX(GFXPoint), GetLocationY(GFXPoint), 150.00, 0., 1, 0)
  • Special Effect - Create a special effect at GFXPoint using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
  • Custom script: call RemoveDestructable(udg_DestructibleVariable)
150.00 is the height of the effect
DestructibleVariable is a destructible variable (really)
or you can use last created destructible variable if you don't want a new variable.

  • Set GFXPoint = somepoint
  • Custom script: bj_lastCreatedDestructable = CreateDestructableZ('OTip', GetLocationX(GFXPoint), GetLocationY(GFXPoint), 150.00, 0., 1, 0)
  • Special Effect - Create a special effect at GFXPoint using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
  • Destructible - Remove (Last created destructible)
 
Status
Not open for further replies.
Top