• 🏆 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!

Spell problem

Status
Not open for further replies.
Level 17
Joined
Dec 24, 2018
Messages
580
Hi, i created from dragon hawk cloud ability, hero ability and change cloud efect with rainbow efect. But rainbow is too small and i dont now have made him bigger cuz in middle of battle is almost invisible. can somebody help ?
 

Attachments

  • 2019-07-17_105541.png
    2019-07-17_105541.png
    3.6 MB · Views: 48
Level 39
Joined
Feb 27, 2007
Messages
5,008
You can't change the size of the effect from within the object editor. You have two options:
  1. Edit and upscale the model so it appears bigger when used for the ability.
  2. Remove the model from the spell and instead create a special effect with a trigger. This effect can have its scale set to whatever you need it to be but must me manually cleaned up. There are more proper solutions but in this case you can use a locally-shadowed global effect variable and a wait to remove the effect when the spell is done. A sample trigger is below:
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) equal to Rainbow
  • Actions
    • Custom script: local effect udg_SomeEffect //match the name of your variable here but keep the udg_ prefix; this line has to be first in your trigger
    • Set TempPoint = (Target point of ability being cast)
    • Special Effect - Create a special effect at TempPoint using RainbowModel.mdl
    • Special Effect - Set scale of (last created special effect) to YOUR_SCALE
    • Set SomeEffect = (last created special effect)
    • Custom script: call RemoveLocation(udg_TempPoint)
    • Wait SPELL_DURATION seconds //might have to do some math here if different levels have different durations
    • Special Effect - Destroy SomeEffect
    • Set SomeEffect = (No effect) //necessary to prevent a leak
 
Level 17
Joined
Dec 24, 2018
Messages
580
You can't change the size of the effect from within the object editor. You have two options:
  1. Edit and upscale the model so it appears bigger when used for the ability.
  2. Remove the model from the spell and instead create a special effect with a trigger. This effect can have its scale set to whatever you need it to be but must me manually cleaned up. There are more proper solutions but in this case you can use a locally-shadowed global effect variable and a wait to remove the effect when the spell is done. A sample trigger is below:
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) equal to Rainbow
  • Actions
    • Custom script: local effect udg_SomeEffect //match the name of your variable here but keep the udg_ prefix; this line has to be first in your trigger
    • Set TempPoint = (Target point of ability being cast)
    • Special Effect - Create a special effect at TempPoint using RainbowModel.mdl
    • Special Effect - Set scale of (last created special effect) to YOUR_SCALE
    • Set SomeEffect = (last created special effect)
    • Custom script: call RemoveLocation(udg_TempPoint)
    • Wait SPELL_DURATION seconds //might have to do some math here if different levels have different durations
    • Special Effect - Destroy SomeEffect
    • Set SomeEffect = (No effect) //necessary to prevent a leak
I'll will see what I can do with my poor abilities, thanks anyway
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,534
Question, will this Hero be usable by only 1 player?

If that's the case then you can do a very simple trigger like this.

  • Cast Rainbow
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Rainbow
    • Actions
      • Set CastPoint = (Target point of ability being cast)
      • Special Effect - Create a special effect at CastPoint using Abilities\Weapons\DragonHawkMissile\DragonHawkMissile.mdl
      • Special Effect - Set Scale of (Last created special effect) to 4.00
      • Set RainbowSfx = (Last created special effect)
  • Stop Casting Rainbow
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Rainbow
    • Actions
      • Special Effect - Destroy RainbowSfx
      • Custom script: call RemoveLocation(udg_CastPoint)
Similar to what Pyrogasm said, but we need to destroy the special effect if the unit stops casting the ability (channeling gets interrupted by a stun or the player orders the Hero to stop).

Attached a map, you can literally copy and paste the triggers into your map and then edit them to fit your ability. Change the ability being cast condition to your ability and change the special effect model/scale to your Rainbow model and whatever size you want.
 

Attachments

  • Rainbow Tesst.w3x
    17.7 KB · Views: 17
Last edited:
Status
Not open for further replies.
Top