#Adware [CardsPlus]
1 messages Ā· Page 1 of 1 (latest)
@spark sail
also just gonna add it here, it's hard to realize what actually triggers the ad on the player and the delay when you can use it again
Ads [CardsPlus]
Adware [CardsPlus]
There is a purple (magenta?) cooldown bar that only shows up when the ability is cooling down. That should be enough indication of when you can use it again I think, if you know to look out for it
btw, is this issue happening on 1.5.1 or 1.5.0?
@chrome sand
uhm latest when I released?
also I think the ability cooldown bar wasn't showing up then
cause I saw nothing close to my player
unless I'm really blind
nvm just blind then, but yeah the ads where spawning outside the screen from what I understood (I was the one with the card)
I thought I fixed that.... Their root position should be center of screen, and when spawned they're given a random offset:
int maxDeltaX = (Screen.width - 500) / 2;
int maxDeltaY = (Screen.height - 400) / 2;
popupTransform.anchoredPosition += new Vector2(Random.Range(-maxDeltaX, maxDeltaX), Random.Range(-maxDeltaY, maxDeltaY));
(500 and 400 are the width and height of the ads respectively)
I thought this was enough to guarantee they never went off screen- apparently not
no clue? maybe some people have small screens?
I wasn't the one seeing the effect so can't add more to this
not really I was uploading it to check for the cooldown if it seemed strange
it's hard to tell with the resolution, but I'm pretty sure it's there
tho having the card that alters the player size doesn't help
good point
Maybe it should be horizontal, above the player heal bar?
Or just a normal UI element in screen space instead of world space
hmhm dunno I think it's fine, just make it stand out more somehow? like a white outline or something
as I think it blends in too much
I can do that š
should help yeah
also try to somehow display it on top everything? know that it's a mess with render priority but should be doable
but yeah this should help the most, also the outline should be on the whole box and not only the filled part in my opinion
I'll also whip up a quick change that adds a config letting you toggle the ability of Adware to target friendlies or not- this would let you target yourself, and may make it easier to demonstrate popups going off-screen
nice
I don't really want targeting friendlies to be enabled by default, since there's not much true use for it other than testing purposes
yeah yeah
My monitors are all a bit abnormal dimensions/resolution, so maybe that's why I can't recreate. If you'd be willing I could just make a quick build that has targeting friendlies enabled already and send it to you, if you were willing to test
well I can't really know how it was as I said it wasn't me seeing them, but I guess I can try to replicate it on my setup
Yeah, but if you can target yourself then it is could be replicatable in sandbox ig
In the mean time Iāll try making the randomized ranges smaller
At least on my screen it looks like these pending changes prevent anything from getting too close to a screen edge. I'll push it and hope the defect is corrected
instead of using screen width/height multiplied by a constant you probably need to check the actual pixel width/height of the ad boxes
i can test on my 1920x1080 in like 7 hours when iām available
you could also just change your resolution in options to test it yourself x)
the width and height of the ads are supposed to be constant... unless there's a canvas scaler on the unbound canvas
and there may be
well yea but while their width/height are a constant amount of pixels the screen width/height multiplied by a constant is different for every resolution
i donāt think it scales right?
canāt you just do Screen.width - ad.width, add 0.5*ad.width to x coordinates and then randomly spawn in that zone?
and similar for y
like if you have a 1920 screen width and ad is 200 pixels it would be a random range from 100 to 1820 (should work assuming the ads spawn on the center of the coordinate) and they shouldnāt go outside
That's pretty much exactly what I'm doing now :P, with slightly different order of operations:
int maxDeltaX = (Screen.width / 2) - 500;
int maxDeltaY = (Screen.height / 2) - 400;
popupTransform.anchoredPosition += new Vector2(Random.Range(-maxDeltaX, maxDeltaX), Random.Range(-maxDeltaY, maxDeltaY));
Where 500 and 400 are the ad width and height, or what they should be
this order of operations should leave a bit more margin around the edges
are some of the ads different sizes?
oh ok
adding to this effect volume is way too high
I turned it down to 20% ;-; but yeah, it is too much even so