Template IsWar3Minimized

Troll-Brain

You can change this now in User CP.
Reaction score
85
It needs a short periodic timer for that, maybe a bit overskilled.
Hmm i could use a (static) if and boolean, in order to let the user decide.

EDIT : No it simply needs a second timer with a shorter period than the main one, with a 0.03 s margin or so :thup:
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
I will be away from computers for 1 or 2 week(s), so don't graveyard it, i will finish it when i will be back.
 

Risen

New Member
Reaction score
4
Mind adding "call DestroyTimer( GetExpiredTimer() )" to the end of function handler. For the newbs.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
Does this work for Macs?
I would say "yes".
If it doesn't work, we get an other way do desync mac users i guess :p

Seriously, i don't see why it would be different for mac users, but you can test it yourself, create a lan game, add a computer and try if it works for you.

And plz give me the answer.

EDIT : Ok i've forgotten you can't compile vJass, i will add a demo map in the first post.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
EDIT : Ok i've forgotten you can't compile vJass, i will add a demo map in the first post.

I tried the demo map and it only said "away for 0 seconds", including when I switched to another app, and also when I hid WC3. (It doesn't really "minimize" - you can only switch to another app when you set WC3 to windowed mode [on the Mac, you can switch between fullscreen and windowed mode on the fly while playing.])

FYI, the "time away" counted up in-game when I scrolled the screen all the way to the right edge of the map and left it there.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
@Weep :
I have no idea how it works on a mac, but it should detect only if a player minimize wc3, i clearly said it doesn't detect any window mode.
So if you can't minimize wc3 on a map, then ofc it won't be detected.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
OK, but how useful is it to detect minimization then, if it doesn't detect someone putting WC3 in windowed mode and then going off to some other application for a while?

Also, what about the way it erroneously counted time away when the camera view was scrolled all the way to the right?
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
OK, but how useful is it to detect minimization then, if it doesn't detect someone putting WC3 in windowed mode and then going off to some other application for a while?

Heh, i don't pretend that is useful, it's just fun, read the first sentence of the first post.

Also, what about the way it erroneously counted time away when the camera view was scrolled all the way to the right?
Why people never read totally the main post before post :banghead:

It will be fixed, i know it since i've written the code, hopefully it will be fixed but i've to improve more things before release a new code.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
Code updated, i can't test it on battle.net for the moment but it still should work.

The functions name are annoying, but i hate call them Afk or Away, because it's so wrong.
Anyway if you really want use it, just copy paste the function names each time you want to call them.

Also it needs my personal sync library now, included in the first post.
I've tested only with a good host and 2 players, the needed time could be more than one second with more players and a bad host, therefore it would be totally useless.
If it's the case i will switch to the local unit selection stuff which should be faster.

Any constructive comments about the 2 libraries are welcome.

- Now the camera movements when an use press the arrows aren't stopped anymore.
- The bug when the camera is on top right is fixed.
- I've to hook the lock camera to unit functions, but then also PanCamera and such which should be lame if you pan the cam in sort periodic timers, because of TriggerEvaluate.
 

galled

Cool Member
Reaction score
0
Can you make a method to start the time of detection of the minimized window and another to stop the detection time? I say this to have the timer not running all the time.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
Sure i can, but do you realize all the cons to detect if wc3 is minimized ?
You can't lock camera and you can't use it when a camerasetup or just a camera field which are currently applied during time, last time i checked it fucks up all the move.
Also you can't safely change the camera bounds.
About the target noise i haven't test it.

In other words, do you really need this thing ? Or the cons added will be more lame than the feature added itself (detect if wc3 is minimized)

But ofc i can make a function to enable/disable the check process.

EDIT : But keep in mind that the state detection will fire after it is effectively done, it isn't something instant.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
If the camera is moving, it -obviously- doesn't need to check if they're minimised. :)
Yes, but if wc3 is minimized, the X/Y of camera won't be changed, so the "system" will try to pan the camera, and then fuck up all the move when the player will be "back".
Tested and approved.
 

lscorpionl

New Member
Reaction score
0
Maybe you can detect if the player moves the Mouse or do something ingame per second for know if he is active in the game.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
Maybe you can detect if the player moves the Mouse or do something ingame per second for know if he is active in the game.
Since we don't have natives functions to detect the mouse position it can't be done like that, maybe with Reinventing The Craft but with all his cons too.

In a perfect world where every player doesn't shut off the wc3 sound, i wouldn't need to pan the camera and it would detect properly when a player minimize his wc3, and so have no cons except that the detection is still not instant. (time needed to sync local datas)
But sadly we can't assume that.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top