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 09-03-2009, 02:08 AM   #1
thehellman
User
 
Join Date: Jan 2006
Posts: 158

Submissions (2)

thehellman has little to show at this moment (4)

Default Best Dummy Spell For Periodic AoE DMG?

I'm looking for a spell like Permanent Immolation, except.. isn't Permanent immolation because it works on a very weird 'tick' system that I don't like.

Are there any alternatives?

Also, -unholy aura has a maximum of 10 so that's no good either.
thehellman is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 09-03-2009, 02:22 AM   #2
GetTriggerUnit-
User
 
Join Date: Aug 2009
Posts: 27

GetTriggerUnit- has little to show at this moment (1)

Default

Why don't you use triggers!

http://www.thehelper.net/forums/showthread.php?t=134744
GetTriggerUnit- is offline   Reply With Quote
Old 09-03-2009, 02:45 AM   #3
thehellman
User
 
Join Date: Jan 2006
Posts: 158

Submissions (2)

thehellman has little to show at this moment (4)

Default

I already have a custom periodic damage system in my map, what I'm asking is periodic area of effect damage.

I know I could do a timer loop, enum units in the area ever second and deal damage, but I was wondering if there was an alternative?
thehellman is offline   Reply With Quote
Old 09-03-2009, 02:57 AM   #4
GetTriggerUnit-
User
 
Join Date: Aug 2009
Posts: 27

GetTriggerUnit- has little to show at this moment (1)

Default

It's easy to do.

I TOLD HIM to do one. See last post.

You need a code now?

Not done don't have the time...

Collapse JASS:
library Hi requires TimerUtils

    struct Damage
         integer instances
         integer times
         timer timee
         unit damager
         real amount
         real radius
         real x
         real y
        
        static method DamageAreaTimed takes real X, real Y, real Radius, real Amount, unit Damager, integer Times, real wait returns nothing
            local thistype this = thistype.create()
            set this.instances = 0
            set this.damager = Damager
            set this.amount = Amount
            set this.radius = Radius
            set this.timee = NewTimer()
            set this.times = Times
            set this.x = X
            set this.y = Y
            call SetTimerData(this.timee, this)
            call TimerStart(this.timee, wait, true, function this.callback)
        endmethod

        method callback takes nothing returns nothing
            local thistype this = GetTimerData(GetExpiredTimer())
            local group g = CreateGroup()
            local unit u = null
            call GroupEnumUnitsInRange(g, this.radius, this.x, this.y, null)
            loop
                  set u = FirstOfGroup(g)
                  exitwhen u == null
                  call UnitDamageTarget(this.damager, this.amount, ....)
                  call GroupRemoveUnit(g, u)
            endloop
            call DestroyGroup(g)
            set g = null
            // MORE stuff here...
        endmethod
    endstruct

endlibrary


Last edited by GetTriggerUnit- : 09-03-2009 at 03:02 AM.
GetTriggerUnit- is offline   Reply With Quote
Old 09-03-2009, 03:47 AM   #5
Zerzax
Zerzy
 
Zerzax's Avatar
 
Join Date: Mar 2008
Posts: 708

Submissions (2)

Zerzax is a jewel in the rough (192)Zerzax is a jewel in the rough (192)Zerzax is a jewel in the rough (192)

2008 Spell olympics - Fire - SilverSpell Making Session 13 WinnerSpell Making Session 12 Winner

Send a message via AIM to Zerzax Send a message via MSN to Zerzax
Default

That's gonna leak. Don't pass a null argument to the enum filter, either use a BOOLEXPR_TRUE type thing (Vexorian has one in the code resources) or sort through your units within a boolexpr function and never admit them to the group. The best group usage would either be with a group recycling system (easy to implement by just reusing already created groups within your struct instances), an actual group system (there are a few on the site), or a global group that you never admit units to.
__________________
Some Quotes of Worthy Wisdom:

1. Die - D2 Barbarian
2. Time to Die - D2 Barbarian
3. Too Much Baggage! - D1 Warrior
4. I Gotta Pawn Some of This Stuff! - D1 Warrior
Zerzax is offline   Reply With Quote
Old 09-03-2009, 04:18 AM   #6
fX_
User
 
fX_'s Avatar
 
Join Date: Jan 2007
Posts: 528

Submissions (2)

fX_ will become famous soon enough (38)fX_ will become famous soon enough (38)

Default

try tornado damage aura
fX_ is offline   Reply With Quote
Old 09-03-2009, 09:51 AM   #7
TheWye
User
 
TheWye's Avatar
 
Join Date: May 2009
Posts: 140

TheWye is on a distinguished road (11)

Default

Disease cloud maybe?
__________________
I Wanna :

SetTextTagTextSetTextTagTextSetTextTagText
TheWye is offline   Reply With Quote
Old 09-03-2009, 02:15 PM   #8
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

what tick system?
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 09-03-2009, 02:18 PM   #9
Vulcano
User
 
Join Date: Jul 2009
Posts: 22

Vulcano has little to show at this moment (0)

Default

immolation damages every second instead of having constant degeneration ...

I can have -55 degen with unholy aura when i shift-doubleclick

Last edited by Vulcano : 09-03-2009 at 02:20 PM.
Vulcano is offline   Reply With Quote
Old 09-03-2009, 02:40 PM   #10
TKF
User
 
TKF's Avatar
 
Join Date: Dec 2006
Posts: 384

TKF is on a distinguished road (10)

Default

Quote:
Originally Posted by Vulcano
immolation damages every second instead of having constant degeneration ...
I know you can toggle it's duration to be shorter than 1 second. Giving it 0.01 duration makes it apply 100 times pr second.
TKF is offline   Reply With Quote
Old 09-03-2009, 08:31 PM   #11
Vulcano
User
 
Join Date: Jul 2009
Posts: 22

Vulcano has little to show at this moment (0)

Default

oh, i didn't know that

I guess problem solved then , just set duration to 0.01

Last edited by Vulcano : 09-03-2009 at 08:32 PM.
Vulcano is offline   Reply With Quote
Old 09-03-2009, 10:21 PM   #12
GetTriggerUnit-
User
 
Join Date: Aug 2009
Posts: 27

GetTriggerUnit- has little to show at this moment (1)

Default

Mine wasn't done, sorry

I had to go sleep.

I'd use TimerUtils. (PURPLE, PURPLE SIMPLY OWNS.)
GetTriggerUnit- is offline   Reply With Quote
Old 09-03-2009, 11:05 PM   #13
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

Using timerutils (any of them) for something like damage over time is a very bad solution.

Short intervals are not the job for TimerUtils, other things do better there.

Also, if permanent immolation does all you want, there is no reason to do something more complicated.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 09-03-2009, 11:16 PM   #14
GetTriggerUnit-
User
 
Join Date: Aug 2009
Posts: 27

GetTriggerUnit- has little to show at this moment (1)

Default

You'd prefer that I use TriggerSleepAction and a loop?
I hope no.

What then?
GetTriggerUnit- is offline   Reply With Quote
Old 09-03-2009, 11:25 PM   #15
Alevice
It feels good
 
Alevice's Avatar
 
Join Date: Mar 2006
Posts: 1,305

Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)

Default

normal timers?
__________________
_-|-_

Alevice.jones is SC2 Beta, losers.

Check out my never updated deviantart gallery!!

Kalimdor Raiders (Race Contest #1) Pastebin Page
Cavern Crawlers (Race Contest #2) Pastebin Page
Airship Race Motherfuckers!
Quote:
Originally Posted by http://ajaxian.com/archives/would-you-like-a-_-with-that-new-library-gives-js-what-it-should-have#comment-276203
- Dont solve problems that dont exist.
- Improve the wheel, dont reinvent it.
- Port the wheel if it doesnt exist in your environment.
- Integrate the wheel into your project.
- Make sure you can replace your wooden wheel for a rubber one if someone else invents it.
Alevice 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 12:39 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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