• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Need Help With this GUI Spell

Status
Not open for further replies.
Level 14
Joined
Jun 13, 2009
Messages
450
I am currently in the process of making a Spell called Thunder Dome.
What I basically want to happen is I want a dome of Thunder to cover an Area of 600 all around the Hero, trapping all units inside and Dealing 50 damage per second to all units inside. I want it to be a channel spell and after this, the Hero gets electrified getting a faster Attack and Movement speed^^
Here is the Code:

And that is a SC of how it looks ATM
 

Attachments

  • 10-3-2009 6-08-04 PM.jpg
    10-3-2009 6-08-04 PM.jpg
    185.9 KB · Views: 140
  • 10-3-2009 6-08-19 PM.jpg
    10-3-2009 6-08-19 PM.jpg
    148.6 KB · Views: 158
  • 10-3-2009 6-22-49 PM.jpg
    10-3-2009 6-22-49 PM.jpg
    252.5 KB · Views: 160
Level 28
Joined
Jan 26, 2007
Messages
4,789
Umm, yeah... perhaps you could... I don't know... tell us your problem? :D
It's a nice introduction to the spell and a good screeny to show the spell, but I don't see any problem with it :/

Anyhow, use trigger-tags:
  1. Go to the trigger you wish to copy/paste and select it
  2. Above events, you will see the name of the trigger: right-click it and select Copy as text
  3. Now go to the hive, type "[ hidden="Trigger"][ trigger]" - without the spaces - and press CTRL + V (paste)
  4. When that's done, type "[/trigger][/hidden]"

That's it, now your trigger will be inside a hidden-tag in the hive ^^
it's a pretty easy method and you can always easily adjust any stupid mistakes, or any actions for testing-purposes only.
 
Level 14
Joined
Jun 13, 2009
Messages
450
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Thunder Dome
  • Actions
    • Set TD_Hero = (Triggering unit)
    • Set TD_Pos[0] = (Position of (Triggering unit))
    • Set TD_Level = (Level of (Ability being cast) for TD_Hero)
    • Set TD_BaseDamage = 100.00
    • Set TD_Damage = (TD_BaseDamage x (Real(TD_Level)))
    • Set TD_Area = 600.00
    • Set TD_UnitG = (Units within TD_Area of TD_Pos[0] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an enemy of (Owner of TD_Hero)) Equal to True))))
    • For each (Integer A) from 1 to 12, do (Actions)
      • Loop - Actions
        • Set TD_Pos[1] = (TD_Pos[0] offset by 500.00 towards (30.00 x (Real((Integer A)))) degrees)
        • Unit - Create 1 Thunder Dome Tower for (Owner of (Triggering unit)) at TD_Pos[1] facing (Position of (Triggering unit))
        • Set TD_Dummy = (Last created unit)
        • Animation - Play TD_Dummy's attack animation
        • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
        • Lightning - Create a Forked Lightning lightning effect from source (Position of (Triggering unit)) to target TD_Pos[1]
        • Set ThunderChain = (Last created lightning effect)
        • Custom script: call RemoveLocation(udg_TD_Pos[1])
    • For each (Integer A) from 1 to 12, do (Actions)
      • Loop - Actions
        • Set TD_Pos[1] = (TD_Pos[0] offset by 400.00 towards (30.00 x (Real((Integer A)))) degrees)
        • Special Effect - Create a special effect at TD_Pos[1] using Doodads\Cinematic\Lightningbolt\Lightningbolt.mdl
        • Custom script: call RemoveLocation(udg_TD_Pos[1])
    • For each (Integer A) from 1 to 12, do (Actions)
      • Loop - Actions
        • Set TD_Pos[1] = (TD_Pos[0] offset by 300.00 towards (30.00 x (Real((Integer A)))) degrees)
        • Special Effect - Create a special effect at TD_Pos[1] using Doodads\Cinematic\Lightningbolt\Lightningbolt.mdl
        • Custom script: call RemoveLocation(udg_TD_Pos[1])
    • For each (Integer A) from 1 to 12, do (Actions)
      • Loop - Actions
        • Set TD_Pos[1] = (TD_Pos[0] offset by 200.00 towards (30.00 x (Real((Integer A)))) degrees)
        • Special Effect - Create a special effect at TD_Pos[1] using Doodads\Cinematic\Lightningbolt\Lightningbolt.mdl
        • Custom script: call RemoveLocation(udg_TD_Pos[1])
    • For each (Integer A) from 1 to 12, do (Actions)
      • Loop - Actions
        • Set TD_Pos[1] = (TD_Pos[0] offset by 500.00 towards (30.00 x (Real((Integer A)))) degrees)
        • Special Effect - Create a special effect at TD_Pos[1] using Doodads\Cinematic\Lightningbolt\Lightningbolt.mdl
        • Custom script: call RemoveLocation(udg_TD_Pos[1])
    • Unit Group - Pick every unit in TD_UnitG and do (Unit - Cause TD_Hero to damage (Picked unit), dealing TD_Damage damage of attack type Spells and damage type Lightning)
    • Unit Group - Pick every unit in TD_UnitG and do (Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Weapons\Bolt\BoltImpact.mdl)
    • Set ThunderOver = (Last created lightning effect)
    • Custom script: call RemoveLocation(udg_TD_Pos[0])
Well I Cant seem to Understand how to make it Hidden but here is the Code.

What I need to do is Find a way so that it deals 50dmg per second for 3,4,5 secs (Depending on Level) and after the towers die how to remove the lightning... My attemps ATM have all failed. I need help.
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
he meant hidden tags

your problem is that you leak as hell, you dont based it on a channeling spell, also the usage of damage as you damage all units and also TD Dummy variable overwrites itself 11 times

how to make it get the attack boost, you need to spawn a dummy which casts bloodlust or any other as + ms speed boost, how to make it channeling, far to high trigger level than you are at unfortunatly
 
Level 20
Joined
Jan 6, 2008
Messages
2,627
try to
  • Custom Script Code: local effect udg_Lightning_Effect
(You need a variable named Lightning_Effect (Special effect)

and after creating all those special effects you have to set it and destroy it later so it doesnt lag. and then you can Wait 3 seconds, and then destroy the special effect. Or give me the map so i can try
 
Level 14
Joined
Jun 13, 2009
Messages
450
try to
  • Custom Script Code: local effect udg_Lightning_Effect
(You need a variable named Lightning_Effect (Special effect)

and after creating all those special effects you have to set it and destroy it later so it doesnt lag. and then you can Wait 3 seconds, and then destroy the special effect. Or give me the map so i can try

I want it to be MUI GUI so it cant have wait :(. I want the lightning to be destroyed when the towers Generic Timer runsout.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Slaydin said:
Custom Script Code: local effect udg_Lightning_Effect

slaydon, is that shadowing?

Yes, that is shadowing, and in my opinion it should be avoided. The reason for that is that in patch 1.24b notes it says something like "shadowing globals is no longer possible."

Apparently it is still possible, but Blizzard may chage that in a patch, and then your spell might not work.
 
Level 20
Joined
Jan 6, 2008
Messages
2,627
okay then, but i got it to work in my spells, but suddenly it doesnt in yours... The problem is that you cant destroy the lighnting, i would say spawn dummy units or learn the towers Chain lighnting, allow it to 1 Unit to be casted on, make it 0.01 Damage so it doesnt lag, and just make the towers do the spell on you.


  • Actions
    • Set TD_Hero = (Triggering unit)
    • Set TD_Pos[0] = (Position of (Triggering unit))
    • Set TD_Level = (Level of (Ability being cast) for TD_Hero)
    • Set TD_BaseDamage = 100.00
    • Set TD_Damage = (TD_BaseDamage x (Real(TD_Level)))
    • Set TD_Area = 600.00
    • Set TD_UnitG = (Units within TD_Area of TD_Pos[0] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an enemy of (Owner of TD_Hero)) Equal to True))))
    • For each (Integer A) from 1 to 12, do (Actions)
      • Loop - Actions
        • Set TD_Pos[1] = (TD_Pos[0] offset by 500.00 towards (30.00 x (Real((Integer A)))) degrees)
        • Unit - Create 1 Thunder Dome Tower for (Owner of (Triggering unit)) at TD_Pos[1] facing (Position of (Triggering unit))
        • Set TD_Dummy = (Last created unit)
        • Animation - Play TD_Dummy's attack animation
        • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
        • Custom script: call RemoveLocation(udg_TD_Pos[1])
        • Special Effect - Create a special effect attached to the overhead of TD_Hero using Abilities\Spells\Orc\LightningBolt\LightningBoltMissile.mdl
        • Set TD_Effect[(Integer A)] = (Last created special effect)
    • For each (Integer A) from 13 to 24, do (Actions)
      • Loop - Actions
        • Set TD_Pos[1] = (TD_Pos[0] offset by 400.00 towards (30.00 x (Real((Integer A)))) degrees)
        • Special Effect - Create a special effect at TD_Pos[1] using Doodads\Cinematic\Lightningbolt\Lightningbolt.mdl
        • Set TD_Effect[(Integer A)] = (Last created special effect)
        • Custom script: call RemoveLocation(udg_TD_Pos[1])
    • For each (Integer A) from 25 to 37, do (Actions)
      • Loop - Actions
        • Set TD_Pos[1] = (TD_Pos[0] offset by 300.00 towards (30.00 x (Real((Integer A)))) degrees)
        • Special Effect - Create a special effect at TD_Pos[1] using Doodads\Cinematic\Lightningbolt\Lightningbolt.mdl
        • Set TD_Effect[(Integer A)] = (Last created special effect)
        • Custom script: call RemoveLocation(udg_TD_Pos[1])
    • For each (Integer A) from 38 to 50, do (Actions)
      • Loop - Actions
        • Set TD_Pos[1] = (TD_Pos[0] offset by 200.00 towards (30.00 x (Real((Integer A)))) degrees)
        • Special Effect - Create a special effect at TD_Pos[1] using Doodads\Cinematic\Lightningbolt\Lightningbolt.mdl
        • Set TD_Effect[(Integer A)] = (Last created special effect)
        • Custom script: call RemoveLocation(udg_TD_Pos[1])
    • For each (Integer A) from 51 to 62, do (Actions)
      • Loop - Actions
        • Set TD_Pos[1] = (TD_Pos[0] offset by 500.00 towards (30.00 x (Real((Integer A)))) degrees)
        • Special Effect - Create a special effect at TD_Pos[1] using Doodads\Cinematic\Lightningbolt\Lightningbolt.mdl
        • Set TD_Effect[(Integer A)] = (Last created special effect)
        • Custom script: call RemoveLocation(udg_TD_Pos[1])
    • Unit Group - Pick every unit in TD_UnitG and do (Unit - Cause TD_Hero to damage (Picked unit), dealing TD_Damage damage of attack type Spells and damage type Lightning)
    • For each (Integer A) from 1 to 62, do (Actions)
      • Loop - Actions
        • Special Effect - Destroy TD_Effect[(Integer A)]
    • Custom script: call DestroyGroup(udg_TD_UnitG)
    • Custom script: call RemoveLocation(udg_TD_Pos[0])
Im not sure how to keep the Special effects, yet

EDIT: Why all the loops really? everything is 12
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Unit - Create 1 Thunder Dome Tower for (Owner of (Triggering unit)) at TD_Pos[1] facing [B](Position of (Triggering unit)[/B])


And about the special effects, you could save the dummies and their effects into hashtable. Add a generic expiration timer on them. Turn on a trigger that has the event "unit dies". You can use unit type of the dummy or "hashtable - value exists" (the effect) as a condition. The load the effect to a variable and destroy it.
 
Level 6
Joined
Mar 22, 2009
Messages
276
easiest way to make it damage units inside is through a dummyhero in the middle with a permanent immolation. set the lvl of the dummyhero to max so it wont eat any exp from you. i prefer to use dummyhero than dummunit because of the trouble of set level of ability for normal units. dont forget to set the range of the immolation to 600.

but that way requires a lot more job in object editor.

but since you're familiar in triggering why not create a Damage over time system for that? first pick the units inside the dome, add them to a unitgroup, then set the life of those in unitgroup to their (current hp)-(2+lvl of ability).

just an idea.. not a complete solution..
 
Status
Not open for further replies.
Top