wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > Triggers & Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 04-28-2009, 08:33 PM   #1
Kul'thran
User
 
Kul'thran's Avatar
 
Join Date: Jan 2006
Posts: 28

Kul'thran has little to show at this moment (0)

Exclamation Working on a "Wyvern Sting" spell.

Magissia from the Hive tried to help me with this one. I want to get it working, but I'm not sure how.

What I want the spell to do: First, the hero fires a projectile that puts the target to sleep. Then, the target sleeps for 30 seconds. After those 30 seconds have passed, the target will suffer some amount damage (let's say 40), every 2 seconds for 6 seconds. If the target is damaged while sleeping, it wakes up and the poison damage above kicks in. I also want to be able to see the poison damage over the unit's head.

Here's what we had:
Trigger:
Wyvern Sting1
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Wyvern Sting (Sleep)
Collapse Actions
Set Wyvern_Sting_Unit_Target = (Target unit of ability being cast)
Set Wyvern_Sting_Unit_Caster = (Casting unit)
Wait ((Distance between (Position of Wyvern_Sting_Unit_Caster) and (Position of Wyvern_Sting_Unit_Target)) / 900.00) game-time seconds
Trigger - Turn on Wyvern Sting2 <gen>
-------- We let the trigger be active 13 sec + 2X Wyvern sting level +1 sec to be sure the dummy unit will have time to spawn to cast damage over time --------
-------- We are using 2Xlevel + 13 because the duration increase by 2 every level and the level 1 duration is 15 sec, 15-2 sec = 13 --------
-------- You must fix the Wyvern Sting(sleep) to the one on you're map if it change during the copy/past to you're map --------
Wait (14.00 + (2.00 x (Real((Level of Wyvern Sting (Sleep) for (Triggering unit)))))) seconds
-------- Wait info end --------
-------- Clean up --------
Custom script: set udg_Wyvern_Sting_Unit_Target = null
Custom script: set udg_Wyvern_Sting_Unit_Caster = null
-------- Clean up end --------
Trigger - Turn off Wyvern Sting2 <gen>

Part 2:

Trigger:
Wyvern Sting2
Collapse Events
Time - Every 1.00 seconds of game time
Collapse Conditions
(Wyvern_Sting_Unit_Target is Sleeping) Equal to False
(Wyvern_Sting_Unit_Target is dead) Equal to False
Collapse Actions
Set Wyvern_Sting_Pos = (Position of Wyvern_Sting_Unit_Target)
-------- Change the unit to you're dummy caster unit or copy past the one i maked there and choos him on you're map (i think, like spells, you will have to check if it's the dummy or not) --------
Unit - Create 1 Dummy caster for (Owner of Wyvern_Sting_Unit_Caster) at Wyvern_Sting_Pos facing 0.00 degrees
Set Wyvern_Sting_Unit_Dummy = (Last created unit)
-------- You must fix the Wyvern Sting(damage) to the one on you're map if it change during the copy/past to you're map --------
Unit - Add Wyvern Sting (damage) (Shadowstrike based) to Wyvern_Sting_Unit_Dummy
-------- You must fix the Wyvern Sting(damage) to the one on you're map if it change during the copy/past to you're map --------
Unit - Set level of Wyvern Sting (damage) (Shadowstrike based) for Wyvern_Sting_Unit_Dummy to (Integer((Real((Level of Wyvern Sting (Sleep) for Wyvern_Sting_Unit_Caster)))))
Unit - Order Wyvern_Sting_Unit_Dummy to Night Elf Warden - Shadow Strike Wyvern_Sting_Unit_Target
Unit - Add a 1.00 second Generic expiration timer to Wyvern_Sting_Unit_Dummy
Custom script: call RemoveLocation( udg_Wyvern_Sting_Pos )
Custom script: set udg_Wyvern_Sting_Unit_Dummy = null

Problems: No projectile is fired from the hero (Sleep is the base spell); the damage displayed by the Shadow Strike version (Wyvern Sting (damage)) is irregular, and stacks with the initial damage, which also seems to appear every second or so.

My question is: How can this be fixed/made better?

Last edited by Kul'thran : 04-28-2009 at 08:36 PM.
Kul'thran is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 04-28-2009, 11:40 PM   #2
Drain Pipe
User
 
Join Date: May 2006
Posts: 129

Drain Pipe has little to show at this moment (3)

Default

waits are terrible, refrain from using them whenever possible. And I don't think I've ever found it necessary to use the wait command for abilities.

Also in order to get projectiles from spells that don't normally have a projectile, I recommend giving your casting dummy unit the sphere ability, like what the bloodmage hero has. That always fires a projectile from spells (projectile specified in the sphere ability, not the spell).

Last edited by Drain Pipe : 04-28-2009 at 11:41 PM.
Drain Pipe is offline   Reply With Quote
Old 04-29-2009, 12:39 AM   #3
Kul'thran
User
 
Kul'thran's Avatar
 
Join Date: Jan 2006
Posts: 28

Kul'thran has little to show at this moment (0)

Default

"Sphere" ability? I don't remember a Blood Mage having that. All I remember is Flame Strike, Banish, Mana Siphon, and Phoenix.

I was thinking something around using Stormbolt as a base for the starting spell and then using a trigger to put the unit to sleep (with the stun at a .01 duration) when hit by the spell for thirty seconds. Would that work?

As for the original, what would you have us do about the "wait" trigger?
Kul'thran is offline   Reply With Quote
Old 04-29-2009, 02:11 AM   #4
moyack
Evil Emoticon
 
moyack's Avatar


Respected User
Project Leader: PoC
 
Join Date: Jan 2006
Posts: 3,263

Submissions (17)

moyack is a splendid one to behold (658)moyack is a splendid one to behold (658)moyack is a splendid one to behold (658)moyack is a splendid one to behold (658)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack
Default

problems:

Sleep is an instant ability, in other words, no missiles can't be set. So use other ability with missile to base on, like storm bolt.

Now do a trigger that detects when the spell has the effect and trigger the removal of the storm bolt buff, make a dummy unit cast sleep on that target.

For the poisoning effect, use other dummy unit to cast an ability based on shadow strike and take advantage of the text tag and damage configurability.
moyack is offline   Reply With Quote
Old 04-29-2009, 06:48 AM   #5
Drain Pipe
User
 
Join Date: May 2006
Posts: 129

Drain Pipe has little to show at this moment (3)

Default

Only thing is if you don't want a stun effect, then it's not wise to use storm bolt. Try the acid bomb instead if you don't want a stun. Then again, sphere ability works just fine and is more versatile than having an ability that launches a missile. Sphere will always launch a missile regardless of spell type, which is why i prefer it.

BTW it's not a hero ability but a default unit ability.
Drain Pipe is offline   Reply With Quote
Old 04-29-2009, 02:38 PM   #6
ToukoAozaki
extends net.wc3c.Jasser
 
Join Date: Jun 2008
Posts: 336

Submissions (5)

ToukoAozaki will become famous soon enough (60)ToukoAozaki will become famous soon enough (60)ToukoAozaki will become famous soon enough (60)

Send a message via MSN to ToukoAozaki
Default

I would suggest using dummy projectile with any kind of DDS. You can put a critical strike with multiplier of 0 and "never miss" set to true.
ToukoAozaki is offline   Reply With Quote
Old 04-29-2009, 04:22 PM   #7
Veev
User
 
Join Date: Nov 2006
Posts: 199

Veev will become famous soon enough (63)Veev will become famous soon enough (63)Veev will become famous soon enough (63)

Default

If the unit sleeps and doesn't move... Then edit stormbolt to have the "sleep" duration you want and then just edit the buff to have the Sleep debuff animation. Then, detect when damage is done to this unit (you need to dynamically add the unit to a damage detection trigger, which can be done in GUI so no need to use JASS or anything). Check whether or not the unit still has the buff, and if he does, remove it and create a dummy that casts a modified shadow strike (assuming you don't want the poison after-effect to be triggered).

So basically... What moyack said, but with one less step. If you're making Wyvern Sting from WoW, then using Storm Bolt as the base (with an edited buff) is fine for what you need for that first bit (stunning the unit for X duration).

Edit: If you still need help and you haven't gotten it, I will most likely make a demo map. I need to run, though. PM me if this is the case.

Last edited by Veev : 04-29-2009 at 04:28 PM.
Veev is offline   Reply With Quote
Old 04-29-2009, 06:01 PM   #8
Kul'thran
User
 
Kul'thran's Avatar
 
Join Date: Jan 2006
Posts: 28

Kul'thran has little to show at this moment (0)

Default

One problem with Shadow Strike, there's a version Magissia made using Unholy Frenzy instead of Shadow Strike. I modified that version to cast Shadow Strike, but the unit was taking 10 damage every 0 seconds for 15 seconds. Created a bit of a problem that I had no clue how to fix. The fixes are in the above code, but I'll show the code from the first version (part 1 wasn't changed, it was part 2):

Trigger:
Wyvern Sting2
Collapse Events
Time - Every 1.00 seconds of game time
Collapse Conditions
(Wyvern_Sting_Unit_Target is Sleeping) Equal to False
(Wyvern_Sting_Unit_Target is dead) Equal to False
Collapse Actions
Set Wyvern_Sting_Pos = (Position of Wyvern_Sting_Unit_Target)
-------- Change the unit to you're dummy caster unit or copy past the one i maked there and choos him on you're map (i think, like spells, you will have to check if it's the dummy or not) --------
Unit - Create 1 Dummy caster for (Owner of Wyvern_Sting_Unit_Caster) at Wyvern_Sting_Pos facing 0.00 degrees
Set Wyvern_Sting_Unit_Dummy = (Last created unit)
-------- You must fix the Wyvern Sting(damage) to the one on you're map if it change during the copy/past to you're map --------
Unit - Add Wyvern Sting (damage) to Wyvern_Sting_Unit_Dummy
-------- You must fix the Wyvern Sting(damage) to the one on you're map if it change during the copy/past to you're map --------
Unit - Set level of Wyvern Sting (damage) for Wyvern_Sting_Unit_Dummy to (Integer((Real((Level of Wyvern Sting (Sleep) for Wyvern_Sting_Unit_Caster)))))
Unit - Order Wyvern_Sting_Unit_Dummy to Undead Necromancer - Unholy Frenzy Wyvern_Sting_Unit_Target
Unit - Add a 1.00 second Generic expiration timer to Wyvern_Sting_Unit_Dummy
Custom script: call RemoveLocation( udg_Wyvern_Sting_Pos )
Custom script: set udg_Wyvern_Sting_Unit_Dummy = null

I changed the sting to be based off Shadow Strike, and the dummy unit to be the Warden here. That was it, yet it caused the mass poison damage problem.

Edit: Thanks for all the help so far, BTW. :)

Edit 2: Okay, I tried to do it on my own. I made two triggers.

Trigger 1:
Trigger:
Wyvern Sting3
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Wyvern Sting (Sleep 2)
Collapse Actions
Set Wyvern_Sting_Unit_Caster = (Casting unit)
Set Wyvern_Sting_Unit_Target = (Target unit of ability being cast)
Trigger - Turn on Wyvern Sting4 <gen>

Trigger 2:
Trigger:
Wyvern Sting4
Collapse Events
Unit - A unit Is attacked
Collapse Conditions
(Attacked unit) Equal to Wyvern_Sting_Unit_Target
(Wyvern_Sting_Unit_Target has buff Sleep) Equal to True
Collapse Actions
Unit - Remove Sleep buff from Wyvern_Sting_Unit_Target
Unit - Create 1 Dummy caster for (Owner of Wyvern_Sting_Unit_Caster) at Wyvern_Sting_Pos facing 0.00 degrees
Set Wyvern_Sting_Unit_Dummy = (Last created unit)
Unit - Add Wyvern Sting (Damage 2) to Wyvern_Sting_Unit_Dummy
Unit - Set level of Wyvern Sting (Damage 2) for Wyvern_Sting_Unit_Dummy to (Integer((Real((Level of Wyvern Sting (Sleep 2) for Wyvern_Sting_Unit_Caster)))))
Unit - Order Wyvern_Sting_Unit_Dummy to Night Elf Warden - Shadow Strike Wyvern_Sting_Unit_Target
Wait 2.00 seconds
Custom script: set udg_Wyvern_Sting_Unit_Target = null
Custom script: set udg_Wyvern_Sting_Unit_Caster = null
Custom script: call RemoveLocation( udg_Wyvern_Sting_Pos )
Custom script: set udg_Wyvern_Sting_Unit_Dummy = null

okay, problem, what happens is this: As soon as Wyvern Sting hits the target it falls asleep for one second and then wakes up as if it's already been attacked, I can't even get to the poison damage part. What am I doing wrong?

Last edited by Kul'thran : 04-29-2009 at 09:07 PM.
Kul'thran is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 05:47 PM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2013, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services