Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-21-2005, 06:56 AM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
GS2: add player.triggeraction?

HTML Code:
GraalScript: Function triggeraction not found at line 4 of player in script of Rick


I can't triggeraction specific clients... this is limiting my de-lag of scripts.
Reply With Quote
  #2  
Old 05-21-2005, 07:17 AM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
I found a hack to get around this limitation:

(in a player.join() class):

HTML Code:
public function yourFunction(arg1, arg2)
{
  with (this)
  {
    triggeraction(0, 0, "clientside", "thing", arg1, arg2);
  }
}
Reply With Quote
  #3  
Old 05-21-2005, 01:11 PM
Fry Fry is offline
Registered User
Fry's Avatar
Join Date: Sep 2001
Location: Germany
Posts: 384
Fry has a spectacular aura about
Did you try player.trigger(..)?
__________________
Graal Statistics

Top 3 servers at the moment (players):


Reply With Quote
  #4  
Old 05-21-2005, 02:33 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
with(this)?? x-x
You need to use the "clientside" action like in old script, but it is planned that the triggerserver/triggerclient functions like in Graal3D are added to Graal2D to make it simplier.
Reply With Quote
  #5  
Old 05-21-2005, 04:03 PM
Ajira Ajira is offline
Poont.
Join Date: Oct 2004
Location: NY, USA
Posts: 477
Ajira is on a distinguished road
Quote:
Originally Posted by Stefan
with(this)?? x-x
You need to use the "clientside" action like in old script, but it is planned that the triggerserver/triggerclient functions like in Graal3D are added to Graal2D to make it simplier.
=D
__________________
Liek omigosh.

Reply With Quote
  #6  
Old 05-21-2005, 06:34 PM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
Quote:
Originally Posted by Stefan
with(this)?? x-x
You need to use the "clientside" action like in old script, but it is planned that the triggerserver/triggerclient functions like in Graal3D are added to Graal2D to make it simplier.
It is the only way to use triggeraction() when there is no currently associated player. (That I can see).

What do you mean that I need to use the clientside action? I already am, it's just that you can't do something like this from GScript2 right now:

HTML Code:
temp.player = findplayer("SomePlayer");
temp.player.triggeraction(0, 0, "clientside", "Weapon", etc...);
You have to do:
HTML Code:
temp.player = findplayer("SomePlayer");
with (temp.player)
{
  triggeraction(0, 0, "clientside", "Weapon", etc...);
}
Reply With Quote
  #7  
Old 05-21-2005, 07:46 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by Rick
It is the only way to use triggeraction() when there is no currently associated player
If there's no currently associated player then what does 'this' represent?
__________________
Reply With Quote
  #8  
Old 05-21-2005, 07:53 PM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
Quote:
Originally Posted by Kaimetsu
If there's no currently associated player then what does 'this' represent?
It represents the player, but the NPC server doesn't seem to realize that when using triggeraction(). Hence it's not currently associated
Reply With Quote
  #9  
Old 05-22-2005, 01:01 AM
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
Hmmm the player join stuff has just been added some weeks ago, I guess it should also set the "current player" if you call a script function for the player itself. The "current player" is used for old scripting functions with side effects - triggeraction is a function of npcs, since it is sending the trigger to near players in the current level of the npc, but if the action is "clientside" then it is only sent to the "current player". Adding a triggerclient function for players would make sense here I guess.
Reply With Quote
  #10  
Old 05-22-2005, 01:40 AM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
There also seems to be an issue with sending clientside triggeractions during onCreated() of weapons or the player.join()'d class. Is it possible you could fix that?
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 11:56 PM.


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