Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 09-18-2011, 06:39 PM
oralgnome oralgnome is offline
doesnt afraid of anything
oralgnome's Avatar
Join Date: Sep 2011
Posts: 34
oralgnome is an unknown quantity at this point
Quote:
Originally Posted by cbk1994 View Post
Yes, it should have been ==.

What do you mean by passing it to a class?
well, player.dir is generally clientside* so you can't really use it in a class/serverside in general until you pass it serverside

relatively, you can pass a var in a weapon from the clientside to the serverside like this:

PHP Code:
function onActionServerside(cmddir){
if (
cmd == "bomb"){
        
temp.npc putnpc2(player.xplayer.y"bomb");
        
temp.npc.join("personal_pig132_bomb");
        
sendtonc(temp.dir);
  }
}

//#CLIENTSIDE

function onWeaponFired(){
    
temp.dir player.dir;
    
triggerserver("gui"this.name"bomb"temp.dir);

(With trigger.server), but how would you pass that temp.dir var to the class then?

in java you'd just redefine the var with the classname like

PHP Code:
// not gs2
     
classname.firstnum secondclass.num
and then you'd just initiate the num var in secondclass for use

how would you accomplish this in gs2?
__________________
Quote:
Originally Posted by CaySedaiSim View Post
Is there a GS2 for retards book..?
Reply With Quote
 


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 10:19 AM.


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