Developer's Blog
Register Low Fi Mark Forums Read

Notices

Closed Thread
 
Thread Tools
Old 03-17-2012, 07:53 AM   #1
Domenico
Forum Staff
 
Domenico's Avatar
 
Join Date: Sep 2009
Location: Moscow, Russia
Steam: barrogh
Posts: 9,711
Domenico is offline

Default Codeability of shared cooldown


Not sure if this is correct section to post this question, but well...

Is there a way of making 2 abilities of a single unit/hero to share a cooldown? I mean, when casting one ability will cause both "CD-linked" abilities to go on CD for the time set (and go off CD simultaneously later).

If it's possible, what are conditions for it?

Should those abilities be related to each other in some way or maybe we can make totally different abilities to share a CD?

Should those abilities have the same CD time?
__________________

"The most perfidious way of harming a cause consists of defending it deliberately with faulty arguments."
Friedrich Nietzsche

------------------------------------------
DC and VG mod. Feel free to PM me with your concerns.
My Steam
Note that I have that infamous edit-a-lot-after-posting syndrome.
 
Old 03-17-2012, 10:27 AM   #2
BooBoox3
Member
 
BooBoox3's Avatar
 
Join Date: Apr 2010
Posts: 4,688
BooBoox3 is offline
Default Re: Codeability of shared cooldown

I don't know a thing about coding but I've seen skills in other maps with shared cooldown so I think it's possible. I can't think of a specific map though since it's been years since i've touched them.

Also the fortification ability between the circles shares cd right? (haven't played dota1 in a while)
__________________


Bronze scum unite! \o/
 
Old 03-17-2012, 10:39 AM   #3
SugaSutA
Member
 
SugaSutA's Avatar
 
Join Date: Nov 2009
Location: Hotass red dot
Posts: 10,623
Blog Entries: 5
SugaSutA is offline
Default Re: Codeability of shared cooldown

^I believe the fortification part is true.

Other than that, I honestly can't think of anything that works on the same line; not in DotA and not in any other game~
__________________
Quote:
Originally Posted by BlackHoleee
In life, the guy who plays fair gets kicked in the balls
 
Old 03-17-2012, 11:26 AM   #4
Glowackos
Member
 
Glowackos's Avatar
 
Join Date: Jun 2010
Location: Australia
Posts: 454
Glowackos is offline
Default Re: Codeability of shared cooldown

The only proper way of making skills go into cd is to cast them.

Just make the skills dummy abilities (they themselves do nothing when cast, but then you have code that detects when they are cast and this code does everything you want). When one of the abilities is cast, immediately cast the other ability, using a bool to prevent the second ability's code from executing.

Also, this belongs in the programming forum.

e: fixed :P
__________________


Play YouTD!
 
Last edited by Glowackos; 03-20-2012 at 09:21 AM.
Old 03-17-2012, 11:46 AM   #5
crinckle
Member
 
Join Date: Sep 2009
Location: India
Steam: crinckle
Posts: 2,009
crinckle is offline
Default Re: Codeability of shared cooldown

Quote:
Originally Posted by Glowackos View Post
Skills with the same order id will go into cd simultaneously, however this is messy so avoid it.

The only proper way of making skills go into cd is to cast them.

Just make the skills dummy abilities (they themselves do nothing when cast, but then you have code that detects when they are cast and this code does everything you want). When one of the abilities is cast, immediately cast the other ability, using a bool to prevent the second ability's code from executing.

Also, this belongs in the programming forum.
Skills with same order id do not go into cd together. I have tried it, only one goes into cooldown at one time.
So, the second method seems to be the only one, but I see some problems. First of all, the cast point of the unit should be 0, otherwise the player can cancel the ability from being cast (as well as stuns can). Also, it will cause problems if the unit gets silenced after casting first ability (eg. Silencer's aura).
 
Old 03-17-2012, 02:46 PM   #6
MauranKilom
Member
 
MauranKilom's Avatar
 
Join Date: Jan 2010
Location: Germany
Posts: 6,047
MauranKilom is offline
Default Re: Codeability of shared cooldown

Quote:
Originally Posted by crinckle View Post
Skills with same order id do not go into cd together. I have tried it, only one goes into cooldown at one time.
If they share the same order id, your hero will try to cast all of them if you use any of them.

Quote:
Originally Posted by crinckle View Post
So, the second method seems to be the only one, but I see some problems. First of all, the cast point of the unit should be 0, otherwise the player can cancel the ability from being cast (as well as stuns can). Also, it will cause problems if the unit gets silenced after casting first ability (eg. Silencer's aura).
Use something like windwalk as a base ability (so it can't be interrupted by pressing stop, will be cast instantly etc.). Although I'm not sure if it would work Last Word. That'd be fixed easily though.

Also, for mana cost, just give the unit the needed mana to cast the second ability. Shouldn't be a problem.
__________________
I might edit my p0sts frequently and rapidly after posting.
DotA code of the month:
Jass:
if GetRandomInt(0,10)<11 then

Fix OD combo! IMPLEMENTED!
 
Old 03-17-2012, 03:10 PM   #7
SoletLuna
Forum Staff
 
SoletLuna's Avatar
 
Join Date: Jun 2009
Location: Germany
Posts: 4,356
Blog Entries: 1
SoletLuna is offline
Default Re: Codeability of shared cooldown

Moved to Programming.
 
Old 03-17-2012, 03:34 PM   #8
Unnamed_
Banned
 
Join Date: Jul 2009
Posts: 5,654
Unnamed_ is offline
Default Re: Codeability of shared cooldown

Disable the ability for the duration.

If the abilities are to have different cooldowns, you need to specify the "disable" time for each ability cast.
 
Old 03-17-2012, 04:06 PM   #9
O_xD
Member
 
O_xD's Avatar
 
Join Date: Apr 2011
Location: In dane's kitchen
Posts: 2,600
Blog Entries: 4
O_xD is offline
Default Re: Codeability of shared cooldown

Or use a dummy ability that gets "cast" and shown when the other gets into effect?
__________________


Click
here for the first orange video

tnx ZdeafZ-
tnx turtlemonster-
BIG tnx to ADozeNFurieS-
tnx to lukedeadwalker-
 
Old 03-20-2012, 01:29 PM   #10
Sly_theK1ng
Member
 
Sly_theK1ng's Avatar
 
Join Date: May 2010
Location: Croatia
Posts: 3,702
Sly_theK1ng is offline
Default Re: Codeability of shared cooldown

to run into cooldown - uncodable
to disable for a period of time -codable (jsut like doom's first->it gets disabled when it is cast untill devoured unit is dead)
__________________
 
Old 04-12-2012, 05:41 PM   #11
WaremDarkslayer
Member
 
WaremDarkslayer's Avatar
 
Join Date: Oct 2009
Location: Where all life began, inside of and all around you.
Posts: 41
WaremDarkslayer is offline
Default Re: Codeability of shared cooldown

Quote:
Originally Posted by Sly_theK1ng View Post
to run into cooldown - uncodable
To be exact, this is uncodable ONLY on JASS/vJASS.Generally, it is codable otherwise WoW wouldn't have it.
__________________
I am reborn from the ashes...of the past.
 
Old 04-12-2012, 07:03 PM   #12
MauranKilom
Member
 
MauranKilom's Avatar
 
Join Date: Jan 2010
Location: Germany
Posts: 6,047
MauranKilom is offline
Default Re: Codeability of shared cooldown

^And how does that help? We don't want to code it in WoW, but in DotA/wc3.
__________________
I might edit my p0sts frequently and rapidly after posting.
DotA code of the month:
Jass:
if GetRandomInt(0,10)<11 then

Fix OD combo! IMPLEMENTED!
 
Old 04-17-2012, 10:30 AM   #13
Sonic
Member
 
Sonic's Avatar
 
Join Date: Jul 2009
Location: Everywhere
Posts: 1,006
Sonic is offline
Default Re: Codeability of shared cooldown

No, it's not codeable
 
Old 04-17-2012, 12:15 PM   #14
Sly_theK1ng
Member
 
Sly_theK1ng's Avatar
 
Join Date: May 2010
Location: Croatia
Posts: 3,702
Sly_theK1ng is offline
Default Re: Codeability of shared cooldown

Quote:
Originally Posted by WaremDarkslayer View Post
To be exact, this is uncodable ONLY on JASS/vJASS.Generally, it is codable otherwise WoW wouldn't have it.
__________________
 
Closed Thread
  Entertainment Programming


Forum Jump

Thread Tools