Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   alpha (https://forums.graalonline.com/forums/showthread.php?t=75599)

theHAWKER 07-17-2007 05:18 AM

alpha
 
how does the new alpha function work??

cbk1994 07-17-2007 05:25 AM

Try player.alpha = .5;

alpha is transparency, so if you do that it will make the players transparency half of what it was.

Default is 1.

theHAWKER 07-17-2007 05:32 AM

orly? i think i would have been better with persentages...
like player.alpha = 50; (50%)

but what erver...

thx

EDIT: that dosn't work :(

Crow 07-17-2007 07:19 AM

Quote:

Originally Posted by theHAWKER (Post 1331616)
orly? i think i would have been better with persentages...
like player.alpha = 50; (50%)

but what erver...

thx

EDIT: that dosn't work :(

It's better as it is right now, because the whole alpha system (images, text, and so on) works exactly like the player.alpha does. player.alpha was just a newly added variable in v5. If you are trying it offline, it wont work for sure. If you want to try it online, just put it into the created function of a test weapon or something else.

theHAWKER 07-17-2007 08:29 AM

idk, nothing works. can somone one elce try it?
this is what i did and it still din't work:
function onWeaponFired(){
player.alpha = .5;
}

killerogue 07-17-2007 02:12 PM

onCreated() Try it on onCreated()

JkWhoSaysNi 07-17-2007 04:49 PM

I tested it and it works. Make sure you're setting it clientside.

Crow 07-17-2007 05:01 PM

PHP Code:

//#CLIENTSIDE
function onCreated() {
  
player.alpha .5;


Try that one..

cbk1994 07-17-2007 05:04 PM

Quote:

Originally Posted by theHAWKER (Post 1331616)
orly? i think i would have been better with persentages...
like player.alpha = 50; (50%)

but what erver...

thx

EDIT: that dosn't work :(

eww, no it should be 0 to 1. That's with RGBs, alpha everywhere, and several other things.

Crow 07-17-2007 05:19 PM

Quote:

Originally Posted by cbkbud (Post 1331742)
eww, no it should be 0 to 1. That's with RGBs, alpha everywhere, and several other things.

Well, HEX support would be sweet, too. But its not really needed ;o

PrinceOfKenshin 07-17-2007 05:23 PM

hehe i love the new alpha function...sadly it is only clientside... = ( stefan make it serverside please!

Crow 07-17-2007 06:18 PM

Quote:

Originally Posted by PrinceOfKenshin (Post 1331764)
hehe i love the new alpha function...sadly it is only clientside... = ( stefan make it serverside please!

Clientsided loop.

PHP Code:

for (temp.iallplayers) {
  
findplayer(i).alpha .5;



theHAWKER 07-17-2007 09:11 PM

thank you guys, i now know that player.alpha changes your emotions alpha too, but dose it change your nick names alpha too?

PrinceOfKenshin 07-17-2007 09:46 PM

Quote:

Originally Posted by Crow (Post 1331833)
Clientsided loop.

PHP Code:

for (temp.iallplayers) {
  
findplayer(i).alpha .5;



i know that i want it for serverside :D

Crow 07-17-2007 09:47 PM

Quote:

Originally Posted by PrinceOfKenshin (Post 1331931)
i know that i want it for serverside :D

Why want it serverside? If you would loop it clientside for every single player its just like serverside o.O

Admins 07-17-2007 10:31 PM

Use gani attributes (player.attr[1] = "myscript.gani"), thats they best way to use the new features.


All times are GMT +2. The time now is 02:42 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.