Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-02-2009, 06:01 AM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
Exclamation iv got a zoom script i need help with

this is the weapon

NPC Code:
//#CLIENTSIDE
function onWeaponFired()
{
if (this.on != true)
{
this.on = true;
player.attr[31] = "global_size.gani";
player.zoom = 6;
player.chat = "Zoom = On";
}
else
{
this.on = false;
player.attr[31] = "";
player.zoom = 1;
player.chat = "Zoom = Off";
}
}



and this is
global_size.gani

NPC Code:
function onPlayerEnters() {
if (params.size()>0)
this.setzoom = params[0];
player.zoom = this.setzoom;
}




But i cant figure Out how to make it Zoom so other people can see it.

Can sombody help me Please?
Reply With Quote
  #2  
Old 11-02-2009, 06:08 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
You have to add your zooming code into a gani script and attach the gani to the player.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #3  
Old 11-02-2009, 04:09 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
you didn't send any params to the gani.
u should use your own gani scripts instead of taking the effectcards ganis.
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #4  
Old 11-02-2009, 05:49 PM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
Wink so i should do this?

so i should put player.zoom in the gani and put as an attribute?
Reply With Quote
  #5  
Old 11-02-2009, 11:29 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
The simplest GANI script would be something like

PHP Code:
SCRIPT
function onPlayerEnters() {
  
onCreated();
}
function 
onCreated() {
  
player.zoom 2;
}
SCRIPTEND 
You'd then do something like

PHP Code:
player.attr[8] = "mygani.gani"
GANI paramaters are passed through attributes using commas, like this:

PHP Code:
player.attr[8] = "mygani.gani,2"
__________________
Reply With Quote
  #6  
Old 11-03-2009, 06:00 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
Quote:
Originally Posted by cbk1994 View Post
GANI paramaters are passed through attributes using commas, like this:

PHP Code:
player.attr[8] = "mygani.gani,2"
Oh my god, thankyou.
Reply With Quote
  #7  
Old 11-03-2009, 06:19 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Quote:
Originally Posted by Codein View Post
Oh my god, thankyou.
x2

"You must spread some Reputation around before giving it to cbk1994 again."
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #8  
Old 11-03-2009, 07:02 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by Switch View Post
x2

"You must spread some Reputation around before giving it to cbk1994 again."
x3
also
x2, gotta spread too.
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #9  
Old 11-03-2009, 08:54 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
Quote:
Originally Posted by Deas_Voice View Post
x3
also
x2, gotta spread too.
x3, gotta spread too.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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:47 PM.


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