Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-17-2007, 05:18 AM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
alpha

how does the new alpha function work??
__________________
**FLIP OUT**
Reply With Quote
  #2  
Old 07-17-2007, 05:25 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
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.
__________________
Reply With Quote
  #3  
Old 07-17-2007, 05:32 AM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
orly? i think i would have been better with persentages...
like player.alpha = 50; (50%)

but what erver...

thx

EDIT: that dosn't work
__________________
**FLIP OUT**
Reply With Quote
  #4  
Old 07-17-2007, 07:19 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by theHAWKER View Post
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.
Reply With Quote
  #5  
Old 07-17-2007, 08:29 AM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
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;
}
__________________
**FLIP OUT**
Reply With Quote
  #6  
Old 07-17-2007, 02:12 PM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
onCreated() Try it on onCreated()
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #7  
Old 07-17-2007, 04:49 PM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
I tested it and it works. Make sure you're setting it clientside.
__________________

Coming soon (Hopefully:P)
Reply With Quote
  #8  
Old 07-17-2007, 05:01 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
PHP Code:
//#CLIENTSIDE
function onCreated() {
  
player.alpha .5;

Try that one..
Reply With Quote
  #9  
Old 07-17-2007, 05:04 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by theHAWKER View Post
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.
__________________
Reply With Quote
  #10  
Old 07-17-2007, 05:19 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by cbkbud View Post
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
Reply With Quote
  #11  
Old 07-17-2007, 05:23 PM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
hehe i love the new alpha function...sadly it is only clientside... = ( stefan make it serverside please!
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #12  
Old 07-17-2007, 06:18 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by PrinceOfKenshin View Post
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;

Reply With Quote
  #13  
Old 07-17-2007, 09:11 PM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
thank you guys, i now know that player.alpha changes your emotions alpha too, but dose it change your nick names alpha too?
__________________
**FLIP OUT**
Reply With Quote
  #14  
Old 07-17-2007, 09:46 PM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
Quote:
Originally Posted by Crow View Post
Clientsided loop.

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

i know that i want it for serverside
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #15  
Old 07-17-2007, 09:47 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by PrinceOfKenshin View Post
i know that i want it for serverside
Why want it serverside? If you would loop it clientside for every single player its just like serverside o.O
Reply With Quote
  #16  
Old 07-17-2007, 10:31 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Use gani attributes (player.attr[1] = "myscript.gani"), thats they best way to use the new features.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:01 AM.


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