[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs | Hosted Projects | Starcraft II Modding | Starcraft II Resources | Galaxy Wiki |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Warcraft III Modding > World Editor Help Zone


World Editor Help Zone Ask general questions about World Editor features and use in this forum. If you need help fixing a trigger, please post it in Triggers & Scripts. Please review the forum rules before posting.

Closed Thread
 
Thread Tools
Old 07-21-2013, 08:26 AM   #16 (permalink)
Registered User neo_sluf
./.
 
neo_sluf's Avatar
 
Join Date: Feb 2012
Posts: 1,179
neo_sluf is just really nice (320)neo_sluf is just really nice (320)
Quote:
Originally Posted by pterryz View Post
Thanks this great help a lot! However this part only checks units that are attacked in 200 range. (Note before a dummy unit would be created and issued to skill "storm bolt" any random 1 enemy unit in 600 range, my hero should be attacking an enemy unit first that's within a 200 range

But I think I actually just need to use the same "functions" for the 2nd part to work and use this
Code:
Custom script: call IssueTargetOrder (udg_dummyvar, "thunderbolt", udg_targetvar)
to issue the dummy unit to skill the "random enemy unit w/in the 600 range", am I right?
Absolutely..
neo_sluf is offline  
Old 07-21-2013, 08:39 AM   #17 (permalink)
Registered User sniper_zero
みっちゃ だめ!!
 
sniper_zero's Avatar
 
Join Date: Sep 2009
Posts: 386
sniper_zero has little to show at this moment (43)sniper_zero has little to show at this moment (43)sniper_zero has little to show at this moment (43)sniper_zero has little to show at this moment (43)sniper_zero has little to show at this moment (43)
I tried doing your trigger. Basically, what it does is that every time your Hero attacks and it has Heavy Rain active, a random unit will be stunned. Is that right?

trigger
Storm Master
Events
Unit - A unit Is attacked
Conditions
((Triggering unit) belongs to an ally of (Owner of HeavyRain_caster)) Equal to False
(Level of Heavy Rain for (Attacking unit)) Greater than 0
Actions
Set HeavyRain_caster = (Attacking unit)
Set Loc = (Position of HeavyRain_caster)
Set TempGroup = (Units within 600.00 of Loc matching (((Matching unit) belongs to an ally of (Owner of HeavyRain_caster)) Equal to False))
Unit - Create 1 Dummy for (Owner of HeavyRain_caster) at Loc facing Default building facing degrees
Unit - Add Storm Bolt to (Last created unit)
Unit - Set level of Storm Bolt for (Last created unit) to (Level of Heavy Rain for HeavyRain_caster)
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from TempGroup)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation(udg_Loc)
Custom script: call DestroyGroup(udg_TempGroup)


The conditions aren't the same because I don't know what HeavyRain is but I think this shortens your trigger while still getting the desired effects. But I don't understand the 200 range part. The ability only activates if the attacked unit is within 200 range of the Hero?

EDIT: I got what you mean now.

new trigger
Storm Master
Events
Unit - A unit Is attacked
Conditions
((Triggering unit) belongs to an ally of (Owner of HeavyRain_caster)) Equal to False
(Level of Heavy Rain for (Attacking unit)) Greater than 0
Actions
Set HeavyRain_caster = (Attacking unit)
Set Loc[0] = (Position of HeavyRain_caster)
Set Loc[1] = (Position of (Attacked unit))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between Loc[0] and Loc[1]) Less than or equal to 200.00
Then - Actions
Set TempGroup = (Units within 600.00 of Loc[0] matching (((Matching unit) belongs to an ally of (Owner of HeavyRain_caster)) Equal to False))
Unit - Create 1 Dummy for (Owner of HeavyRain_caster) at Loc[0] facing Default building facing degrees
Unit - Add Storm Bolt to (Last created unit)
Unit - Set level of Storm Bolt for (Last created unit) to (Level of Heavy Rain for HeavyRain_caster)
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from TempGroup)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Custom script: call DestroyGroup(udg_TempGroup)
Else - Actions
Custom script: call RemoveLocation(udg_Loc[0])
Custom script: call RemoveLocation(udg_Loc[1])


I tested it. It should work although 200 is practically the same as melee range. You have to be really close for it to work.

Again the conditions aren't the same as yours but the basic idea of what you want should be there.
sniper_zero is offline  
Old 07-21-2013, 09:15 AM   #18 (permalink)
Forum Moderator Maker
I...make things
 
Maker's Avatar
Resource Moderator
 
Join Date: Mar 2006
Posts: 8,959
Maker has been here far too long (2896)Maker has been here far too long (2896)Maker has been here far too long (2896)Maker has been here far too long (2896)Maker has been here far too long (2896)Maker has been here far too long (2896)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. 
^You could use "belongs to an enemy" to filter out neutrals. You could also filter out dead units.
Maker is offline  
Old 07-21-2013, 09:48 AM   #19 (permalink)
Registered User sniper_zero
みっちゃ だめ!!
 
sniper_zero's Avatar
 
Join Date: Sep 2009
Posts: 386
sniper_zero has little to show at this moment (43)sniper_zero has little to show at this moment (43)sniper_zero has little to show at this moment (43)sniper_zero has little to show at this moment (43)sniper_zero has little to show at this moment (43)
Oh, okay. I just heard from somewhere that Belongs to An Enemy is slower than belongs to an ally, which is why I went along with Belongs to An Ally. I also thought about checking for dead units but sometimes I wonder if there's even any point to that for pure damage spells.
sniper_zero is offline  
Old 07-21-2013, 10:17 AM   #20 (permalink)
Forum Moderator Maker
I...make things
 
Maker's Avatar
Resource Moderator
 
Join Date: Mar 2006
Posts: 8,959
Maker has been here far too long (2896)Maker has been here far too long (2896)Maker has been here far too long (2896)Maker has been here far too long (2896)Maker has been here far too long (2896)Maker has been here far too long (2896)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. 
Quote:
Originally Posted by sniper_zero View Post
I also thought about checking for dead units but sometimes I wonder if there's even any point to that for pure damage spells.
The spell could random a dead unit instead of a unit that is alive. Creating a unit is also a costly operation and should be avoided for invalid targets. Creating a unit causes a very tiny memory leak.
Maker is offline  
Old 07-21-2013, 10:38 AM   #21 (permalink)
Registered User sniper_zero
みっちゃ だめ!!
 
sniper_zero's Avatar
 
Join Date: Sep 2009
Posts: 386
sniper_zero has little to show at this moment (43)sniper_zero has little to show at this moment (43)sniper_zero has little to show at this moment (43)sniper_zero has little to show at this moment (43)sniper_zero has little to show at this moment (43)
I always thought creating units was a simple thing for the game. That's very useful information.
sniper_zero is offline  
Closed Thread

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 05:07 AM.





Powered by vBulletin
Copyright 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.1 PL2
Copyright © Ralle