December 10, 2018, 08:43:50 AM

Author Topic: [Fixed]set ultimate cooldown to 0  (Read 151 times)

Offline Drellannor

  • Level 1 Trained Beginner
  • *
  • Posts: 23
  • Country: fr
[Fixed]set ultimate cooldown to 0
« on: November 24, 2018, 12:39:05 AM »
Hello,

I meet a problem(one more again :D) with the ultimate cooldown, normally when a ulti like root or chain lightning fail, the cooldown should be reseted, so the player can still use it till he meet a player.
But actually, if you failed your ulti, or accidently hit your ultimate hotkey after freezetime, you'll have a cooldown.

Tried few things in both py scripts and evenscript to force ultimate cooldown to be back but nothing work at all :(.
« Last Edit: November 26, 2018, 12:19:10 AM by Drellannor »

Offline Manifest

  • Race & effect creator
  • Moderator
  • Level 7 Expert
  • *****
  • Posts: 1054
  • Country: dk
  • Content creator for the new WCS version by Kami.
Re: set ultimate cooldown to 0
« Reply #1 on: November 24, 2018, 10:54:45 AM »
Yes, this is a bit of an odd bug I was trying to deal with it as well, apparently setting the cooldown to 0 upon the execution is something it just doesn't want to allow us to do. There's multiple ways to fix this, either put a tiny delay on the command wcs_cancelulti itself or you can go with the bit more troublesome way that I was using; replacing all wcs_cancelulti functinoalities with this code snippet:

Code: [Select]
es_delayed .05 wcsgroup set player_ultimate_cooldown server_var(wcs_userid) 0
This works as a charm, really. I haven't tried with a lower delay value than this, but I found this to work very well for what I want to do with my server. :-)
"BRAVORA: Bruh it is fucking operation crystal night when you are approving races."


Offline Drellannor

  • Level 1 Trained Beginner
  • *
  • Posts: 23
  • Country: fr
Re: set ultimate cooldown to 0
« Reply #2 on: November 25, 2018, 09:59:08 PM »
Wow ok, i don't really understand why functions don't work as attended without a es_delayed function.
The test i done worked with this delay.

If i remember well, i had issues with the gravity too on the undead scourge race, i only added a 0.1 delay and it worked. Looks like the server is loading the script with a small delay and don't work good with this very small delay and can't make "instant" function at time.
But don't meet any problem with move speed, health etc...

Will give a delay to all my test in the further, so i will not meet any bad surprise...

Thanks you a lot manifest.

Offline WCS - Wookie

  • Level 6 Experienced
  • *****
  • Posts: 125
  • Country: nz
  • Qualified Teacher, working in IT and loving WCS.
Re: set ultimate cooldown to 0
« Reply #3 on: November 25, 2018, 11:52:07 PM »
Quote
If i remember well, i had issues with the gravity too on the undead scourge race, i only added a 0.1 delay and it worked. Looks like the server is loading the script with a small delay and don't work good with this very small delay and can't make "instant" function at time.
But don't meet any problem with move speed, health etc...

Hi Drellannor

I believe the speed and health and gravity checks are made by the server for the base game and will reset these to default values. For whatever reason it seems that the Speed and Health settings are changed after the default server setting and the gravity setting is changed before the default server setting. In essence you are seeing that the default gravity setting is being applied after the WCS gravity setting.
If you like WCS and are from AUS/NZ drop by our server to take a look.


Offline Drellannor

  • Level 1 Trained Beginner
  • *
  • Posts: 23
  • Country: fr
Re: set ultimate cooldown to 0
« Reply #4 on: November 26, 2018, 12:19:00 AM »
Good to know, thanks for this information Wookie ! :)

Offline Manifest

  • Race & effect creator
  • Moderator
  • Level 7 Expert
  • *****
  • Posts: 1054
  • Country: dk
  • Content creator for the new WCS version by Kami.
Re: [Fixed]set ultimate cooldown to 0
« Reply #5 on: November 26, 2018, 06:30:56 PM »
Exactly what Wookie said, the modified values for gravity is applied before the game sets it, and apparently that is set on the first frame of player_spawn, so with certain things gravity being the main one that I've came across myself you have to put a delay on it. :-)

In terms of the ultimate I don't know why that is not working as that's a custom event so the game should not be able to interfere with any default settings for that. But the delay fixes it. I am making a lot of adaptations to get my things to work as I originally intended as well :-)
"BRAVORA: Bruh it is fucking operation crystal night when you are approving races."