• 🏆 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!

[Trigger] System Needed

Status
Not open for further replies.
Level 8
Joined
Jun 1, 2008
Messages
341
Hey I need a system for my project, will + rep if you can make it for me.

Basically, its a custom cooldown system using a multiboard and floating text.

Description
When an ability is cast (all abilities in my project are custom), this spell begins to cooldown for X amount of time. This time needs to be shown in a multiboard, which also orders all the cooldowns it is currently showing. (As more than one spell can be cooling down at once). The order should be the least amount of time remaining at the top of the multiboard and the longest cooldown remaining at the bottom. When a cooldown finishes it should be removed from the multiboard and all other cooldowns re-ordered. Finally, There should also be a floating text above the caster that shows the time remaining of the cooldown that has least time remaining. And when that cooldown finishes it should show the next in order, and so on.
Example of Multiboard

Spell Cooldowns
Spell Name: | Cooldown Time Remaining (sec)
The W spell: | 5
The M Spell: | 8
Credits
I do not expect this system to be made for me out of just good will, (as few people will do that). Therefore I will award whatever price you deem suitable, even if I have to spread rep around.
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
There is a slight -or may not be slight- problem with making your system; there is only one native function related to spell cooldown
JASS:
native UnitResetCooldown takes unit whichUnit returns nothing
which means that this system will require some creativity. :confused:

The simplest way -but long if you have many spells in your system- is that you can store each ability cooldown time in an array real variable, but I don't think this could be effective.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
How soon is "sorta soon"? =)

My system is almost finished. The floating text works 100% correctly. The multiboard shows spell names and cooldowns. Spell cooldowns get sorted from lowest to highest in the multiboard, and if the cooldown reaches 0, it gets removed from the list and every other spell that is under cooldown get shifted higher in the list.

I have three heroes in the map, and everyone is using only one spell currently. It shouldn't be too difficult to expand.

How many spells in total do you have in your map? Also, can there be two of the same hero/spell in the map? I'm thinking of using colour codes with the spell names. How do you like to format the floating text and the multiboard time text? Show integers or reals with decimals?
 
Last edited:
Level 8
Joined
Jun 1, 2008
Messages
341
I'd like it formatted as intefers please.
There are a 12 spells
Only one hero as its a single player campaign
Don't worry about colour codes lol
sounds like its all going good, in fact what have you still go to do anyway?
Sorta soon is just as soon as possible lol, coz i need this system to begin working on the res of my project.
+Rep
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Only one hero? Ahaha!

I though it was a multiplayer map for some reason. This makes it all the more easier. I wish I had asked that question before. Now I now that I don't have to keep track on who casts the spell and on who to spawn the floating text. I'll remove those parts from the triggers, since they're unnecessary :)

Not much to do anymore really, I'll add some comments to make customizing it easier.

Do you want to resize the multiboard to whatever number of spells there are, or do you want to keep it at full size at all times, that means 13 rows high? I think it might look silly if the multiboard keeps resizing.
 
Last edited:

Cokemonkey11

Spell Reviewer
Level 29
Joined
May 9, 2006
Messages
3,534
Damn I did the same thing jaijaibinx did. My mb sys is set up for 12 players and an unlimited amount of abilities.

Not sure what I did wrong but now my system crashes wc3. Not good lol.

Edit: Nevermind lol now it works perfect that I fixed the crash.

My system doesn't order the stuff by time like his does, but it is quite simple and modular. Let me know if you can't figure out how to change something to suit your needs.

http://filesmelt.com/Filehosting2/downloader.php?file=mbSystem001.w3x

Edit edit: This requires jass helper (available in JNGP) as it's written in vJass, and runs off a simple struct stack with 1 private global timer, so it is very efficient. Hope you like.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Mine is ready too. It's done with GUI, and should be easy to modify.

Here's what it looks like:

MultImg.jpg


The cooldown window resizes to the number of spells that are under cooldown, there's the floating text and the cooldowns get sorted :cool:
 

Attachments

  • SpellsMultiboard.w3x
    19.7 KB · Views: 41
Last edited:
Level 8
Joined
Jun 1, 2008
Messages
341
Sorry to all who did more work then they should have my fault (should have mentioned in first post). Thank you Thank you these all work and are all fantastic, I can modify from here as promised + rep to all

This is a piece of cake actually... just needs a bit of manual co-ordination between the trigger editor and object editor ;)

Not sure if it really needs manual co ordination between the trigger editor and object editor, as all spells are custom, so no data is needed from object editor, or as I missing something..?
 
Status
Not open for further replies.
Top