• 🏆 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 Not Working (Thunder Storm)

Status
Not open for further replies.
Level 8
Joined
Dec 16, 2007
Messages
252
I made a spell based of Dota's Razor The Lightning Revetant's ulti. I made it as a passive skill with 10% chance every 2 seconds to summon a lightning bolt and damage random units whitin 800 range from the hero that have this skill. But it's not working. The trigger looks like this :

Lightning Field Learn
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to TRIGSTR_411 TRIGSTR_412
Actions
Set ThunderStormHero = (Learning Hero)
Trigger - Turn on Lightning Field Damage <gen>


Lightning Field Damage
Events
Time - Every 2.00 seconds of game time
Conditions
(Random integer number between 1 and 10) Less than or equal to 10
Actions
Set ThunderStormGroup = (Units within 800.00 of (Position of ThunderStormHero) matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True)))
Set ThunderStormUnit = (Random 1 units from ThunderStormGroup)
Unit Group - Pick every unit in ThunderStormUnit and do (Actions)
Loop - Actions
Special Effect - Create a special effect at (Position of (Picked unit)) using Doodads\Cinematic\Lightningbolt\Lightningbolt.mdl
Unit - Cause ThunderStormHero to damage (Picked unit), dealing 200.00 damage of attack type Spells and damage type Lightning
Custom script: call DestroyGroup(udg_ThunderStormGroup)
Custom script: call DestroyGroup(udg_ThunderStormUnit)



As you noticed, of some reasons all of my custom units/abilities names have turnt to TRIGSTR_Number..

Please tell me what's wrong with the trigger and please, if you got a solution for the TRIGSTR problem tell me that too.
 
Level 3
Joined
Dec 15, 2007
Messages
44
First I don't see how that random integer makes 10% chance.
"An integer between 1-10 that is less than or equal to 10 is going to be 100%"

Secondly I'm not sure about that whole matching unit group thing.
And don't think you placed the Loop Actions correctly.

Lemme look into it I'll post a trigger write up for you for what I get.
 

Lux

Lux

Level 2
Joined
Jan 9, 2008
Messages
20
Like tahku already pointed out, your percentile calculations are off. Try "(Random integer number between 1 and 10) is Equal to 1".

One of the arguments in "Actions" also worries me. When you're checking the conditions to determine whether a unit should be added to the group of targets, you use "(((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True)))". You're actually looking for "(((Matching unit) belongs to an enemy of (Owner of (ThunderStormHero)) Equal to True))); if you don't structure the condition like this, players who aren't playing in the Player 1 slot will have large problems (unless, of course, this hero is only available to members of Player 1's team).

Finally, you forget to destroy the special effect you spawn during the actual execution of the spell.

The only thing that I see as a possible cause for your problem is the ""(((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True)))" argument, since the percentile calculation you use guarantees that the spell should fire every two seconds.

Lux
 
Level 8
Joined
Dec 16, 2007
Messages
252
(Random integer number between 1 and 10) Less than or equal to 10)

Oh yeah, I made it 100% just to see if it was working.. Didn't want to wait for 10%

And like I said, It's BASED of Razor's ulti. Not like it..
 
Status
Not open for further replies.
Top