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 10-02-2007, 05:05 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
Player Paused

Is there a function on command for a player being paused? I don't mean something like "if (playerpaused) {}"
__________________
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
  #2  
Old 10-11-2007, 04:36 PM
BonzaiXxXSRStudios BonzaiXxXSRStudios is offline
Since 2001
BonzaiXxXSRStudios's Avatar
Join Date: Jul 2007
Location: Atlanta, Georgia USA
Posts: 108
BonzaiXxXSRStudios is on a distinguished road
Send a message via MSN to BonzaiXxXSRStudios
If it was a function woudnt be an event, so in that case why in Gods sweet strawberry slushy would you start with "if" anyway. XD but maybe you can find your answer here.. http://wiki.graal.net/index.php/Crea...ns:_NPC_Server.

Good luck!
__________________


Nutos (Jasler) and Yoke (lDarkDragonl) at Bonzai and Storm Reach Studios
Reply With Quote
  #3  
Old 10-11-2007, 04:37 PM
BonzaiXxXSRStudios BonzaiXxXSRStudios is offline
Since 2001
BonzaiXxXSRStudios's Avatar
Join Date: Jul 2007
Location: Atlanta, Georgia USA
Posts: 108
BonzaiXxXSRStudios is on a distinguished road
Send a message via MSN to BonzaiXxXSRStudios
Quote:
Originally Posted by BonzaiXxXSRStudios View Post
If it was a function woudnt be an event, so in that case why in Gods sweet strawberry slushy would you start with "if" anyway. XD but maybe you can find your answer here.. http://wiki.graal.net/index.php/Crea...ns:_NPC_Server.

Good luck!
Edit-If it was a function, woudnt be an event? So in that case why in Gods sweet strawberry slushy would you start with "if" anyway. XD but maybe you can find your answer here.. http://wiki.graal.net/index.php/Crea...ns:_NPC_Server.
__________________


Nutos (Jasler) and Yoke (lDarkDragonl) at Bonzai and Storm Reach Studios
Reply With Quote
  #4  
Old 10-11-2007, 04:51 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
Well, why dont you use "if (playerpaused)". I doubt theres a function for that, just check the if one in a timeout.
Reply With Quote
  #5  
Old 10-11-2007, 05:13 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
to my knowledge there isn't one. would be cool though !!
__________________
Reply With Quote
  #6  
Old 10-12-2007, 12:34 AM
Kyranki Kyranki is offline
Freelance Coder
Join Date: Aug 2007
Location: At the end of the rainbow, in the pot of gold.
Posts: 202
Kyranki is on a distinguished road
Send a message via AIM to Kyranki Send a message via MSN to Kyranki
I believe ispaused is a variable of the player object.
__________________
Stan.
Reply With Quote
  #7  
Old 10-12-2007, 03:25 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Kyranki View Post
I believe ispaused is a variable of the player object.
True.

Meaning, you could do something like:

PHP Code:
//#CLIENTSIDE
function onCreated() setTimer(.05);

function 
onTimeOut()
{
  if (
player.ispaued) {
    
// What would happen if the player paused? Hmmm...
  
}
  
setTimer(.05);

__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #8  
Old 10-12-2007, 10:01 PM
BonzaiXxXSRStudios BonzaiXxXSRStudios is offline
Since 2001
BonzaiXxXSRStudios's Avatar
Join Date: Jul 2007
Location: Atlanta, Georgia USA
Posts: 108
BonzaiXxXSRStudios is on a distinguished road
Send a message via MSN to BonzaiXxXSRStudios
Quote:
Originally Posted by xXziroXx View Post
True.

Meaning, you could do something like:

PHP Code:
//#CLIENTSIDE
function onCreated() setTimer(.05);

function 
onTimeOut()
{
  if (
player.ispaued) {
    
// What would happen if the player paused? Hmmm...
  
}
  
setTimer(.05);


At the end of your script...why set the timer again? thats in fact if you did set the timer again.
__________________


Nutos (Jasler) and Yoke (lDarkDragonl) at Bonzai and Storm Reach Studios
Reply With Quote
  #9  
Old 10-12-2007, 10:20 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Because player.ispaused is a boolean, not an event. So you have to check it in an event, most likely one that is looped.
Reply With Quote
  #10  
Old 10-12-2007, 11:03 PM
BonzaiXxXSRStudios BonzaiXxXSRStudios is offline
Since 2001
BonzaiXxXSRStudios's Avatar
Join Date: Jul 2007
Location: Atlanta, Georgia USA
Posts: 108
BonzaiXxXSRStudios is on a distinguished road
Send a message via MSN to BonzaiXxXSRStudios
Quote:
Originally Posted by DustyPorViva View Post
Because player.ispaused is a boolean, not an event. So you have to check it in an event, most likely one that is looped.
So it this script will timeout when you first log in for .5 seconds, do an action during the script, then at the end of that function, time you out for .5 more seconds, right?
__________________


Nutos (Jasler) and Yoke (lDarkDragonl) at Bonzai and Storm Reach Studios
Reply With Quote
  #11  
Old 10-12-2007, 11:41 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Quote:
Originally Posted by BonzaiXxXSRStudios View Post
So it this script will timeout when you first log in for .5 seconds, do an action during the script, then at the end of that function, time you out for .5 more seconds, right?
That would be the nature of a timeout loop.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #12  
Old 10-13-2007, 01:44 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by BonzaiXxXSRStudios View Post
So it this script will timeout when you first log in for .5 seconds, do an action during the script, then at the end of that function, time you out for .5 more seconds, right?
To be more precise..

When you first login, or the script gets updated, the onCreated() event will trigger and call the event onTimeOut() after 0.5 seconds. Once onTimeOut() is called, it will call itself after 0.5 seconds over and over again.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #13  
Old 10-13-2007, 02:07 AM
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 BonzaiXxXSRStudios View Post
If it was a function woudnt be an event, so in that case why in Gods sweet strawberry slushy would you start with "if" anyway. XD but maybe you can find your answer here.. http://wiki.graal.net/index.php/Crea...ns:_NPC_Server.
Then why have "onPlayerChats" and "player.chat"? It's so that it doesn't come out of nowhere and that you don't need timers going every second like I did in the cript I was using.
__________________
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
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 12:49 AM.


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