Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-19-2006, 10:04 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
Clientside player-joined class

Alright, people keep telling me that clientside portions of player-joined classes work.
I can't get them to.
Can anyone tell me what I'm doing wrong, or how to do it right? I've tried both 'function' and 'public function'
Nothing is happening.

PHP Code:
//#CLIENTSIDE
function onPlayerChats() {
  
chat "Zomg";
}

public function 
Clamp(value,clamp) {
  
inc clamp 2;
  
nval value clamp;
  if (
nval >= incvalue += (clamp nval);
  else 
value -= nval;
  return 
value;

Reply With Quote
  #2  
Old 01-20-2006, 01:28 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
-Tapsfoot.- I'm gonna bump, just incase people are only looking at the topic on top.. I need a kinda-quick answer.
Reply With Quote
  #3  
Old 01-20-2006, 04:12 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
That code is in a weapon script and you call Clamp() from another npc or so ?
Reply With Quote
  #4  
Old 01-20-2006, 08:49 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
That code is in a class.
The class is joined to the player by the Control-NPC.
The weapon is trying to call 'player.Clamp()'
Reply With Quote
  #5  
Old 01-21-2006, 02:16 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
I love you, Stefan
Reply With Quote
  #6  
Old 01-27-2006, 02:37 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
?
Only weapons and npcs can have clientside code.
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 04:27 PM.


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