![]() |
Set Effect
Simple question.
What set effect values would make an image seem slightly transparent, but still have the regular colors and stuff, then what set effect puts it back to normal? Ill go ahead and post my script, because its blocking and from what I know, it shouldn't be. Besides someone probably knows a better way to do what I'm trying to do anyways. PHP Code:
|
It'll need to be clientside, try something like
PHP Code:
|
Quote:
|
You should probably also make it non-blocking under an onCreated() function. As this will make it non-blocking as soon as its created for the client, rather than waiting until the player touches it, From my experience it will take a quick second to become non-blocking waiting for the players touch, as apposed to it already being non-blocking before the player reaches it. ^^
|
Ahh, ok ty. :)
|
Actually, i noticed using this, that the trans shows up too, any way around that?
|
Quote:
|
the trans for that image is yellow, its transparent normally, but after touching it and setting the image to be more transparent, the yellow shows up too
|
3 Attachment(s)
Here are some screens to show what i mean, the code im using is:
PHP Code:
Ive tried a few different things, like using showimg, not including setEffectMode(1) on the timeout and stuff, but regardless of the timeout, when i touch it and it turns more transparent, thats when the yellow shows up. |
Looks like a problem with the image. I suggest you get yourself IrfanView and re-save the file, then try again.
|
Can you upload the image here?
|
Try changing this.mode = 1;
I'm under the impression setEffectMode() changes the mode for setEffect which affects the entire screen, not setColorEffect. When you use setColorEffect this is basically what happens: PHP Code:
PHP Code:
|
Quote:
|
Quote:
|
Still doing the same thing. For whatever reason, changing the alpha is showing up the trans in the image. Any other idea around it?
|
Quote:
Try asking someone the proper way to set the timer in it. |
Cyril, I was on Armageddon earlier, also talking to Decus, and while doing so, I checked out that bridge, and it's working fine, not showing the yellow. Seems to be a problem with your computer (or maybe your locally saved image of that bridge). Try deleting the local copy of the bridge, then restart Graal and let it re-download it. See if it works. If it doesn't, try updating your graphics card drivers.
|
That was it. xD Oh man a two page post on something stupid. Oh man. xD
|
:o
|
Actually decided to take it off a timer, and put it in x, y coordinates, to eliminate the use of timers. I have this, but now its not setting, any obvious reason why?
PHP Code:
|
Since you set the mode in the player enters event, you don't need to keep setting it in the timeout but that's not the issue.
Have tried you placing player.chat = "tests"; in the loop to see if it's actually executing the code you want? You could also use my debugger class, and insert breakpoints instead. |
Finally got time to come back to this. All it says on player is "out", which its in the correct coordinates, so I dont know why its not saying "IN".
PHP Code:
|
Try putting parenthesis' around
player.x+1.5 and player.y+2 like so: if ((player.x+1.5) in |17, 25| && (player.y+2) in |13, 37|) Nvm, that's not the issue but for clarity purposes I would. Is this script on a gmap? because if it is you start dealing with coordinates in the 100s in some cases, a way to get around this would be to use relative coordinates like: this.x, this.x + 10, etc. |
Still saying out and doing nothing.
|
Try displaying the coordinate values using echo or player.chat, so you can actually see what the values are, instead of just in and out.
I.e: player.chat = player.x SPC player.y; |
If you're working on a GMAP those arent going to be the actual x and y of the player
|
Personally, I would do something like this:
PHP Code:
|
i've played around with the scripts on both a gmap and a level, on the level, the script worked fine, on the gmap, it didn't.
so, i'm guessing it's the x/y that needs to be compared to the x/y on the map. i've heard of "getmapx/y()" but i've never used it, i suggest you play around with it :) (between, u can use this.alpha to change the trans instead of setColorEffect() ) EDIT: switch found out how to fix it, by setting the shape to the width and height of the img (i think). |
Quote:
|
| All times are GMT +2. The time now is 06:08 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.