Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-10-2008, 05:29 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
Deconstructor?

hi,

it would be nice to have a function that is called when someone updates a weapon but before the update occurs.
__________________
Reply With Quote
  #2  
Old 06-10-2008, 06:13 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
Perhaps a call, but don't wait for it ...

Otherwise, you could do something like this:

PHP Code:
function onWeaponUpdatednameOfWeapon )
{
  while ( 
true )
  {
    
sleep0.05 );
  }

Personally, I really don't see a use. Your scripts should be coded in a way that if that happens, they can keep on going.
__________________
Reply With Quote
  #3  
Old 06-12-2008, 07:07 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by cbk1994 View Post
Perhaps a call, but don't wait for it ...

Otherwise, you could do something like this:

PHP Code:
function onWeaponUpdatednameOfWeapon )
{
  while ( 
true )
  {
    
sleep0.05 );
  }

Personally, I really don't see a use. Your scripts should be coded in a way that if that happens, they can keep on going.
Oh god, all hell would break loose!
__________________
Do it with a DON!
Reply With Quote
  #4  
Old 06-13-2008, 01:29 AM
bscharff bscharff is offline
Bloo
bscharff's Avatar
Join Date: Sep 2006
Location: San Antonio, Texas
Posts: 185
bscharff has a little shameless behaviour in the past
Send a message via AIM to bscharff Send a message via MSN to bscharff Send a message via Yahoo to bscharff
onCreated is triggered on any sort of update...
I'm probably misunderstanding the request.
__________________
Trying to be nice now...
Reply With Quote
  #5  
Old 06-13-2008, 01:34 AM
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
Quote:
Originally Posted by bscharff View Post
onCreated is triggered on any sort of update...
I'm probably misunderstanding the request.
Yes, he wants OTHER scripts to be alerted before a weapon is updated.
__________________
Reply With Quote
  #6  
Old 06-13-2008, 08:00 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
More like the script itself + other Scripts
__________________
Reply With Quote
  #7  
Old 06-13-2008, 08:41 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
wee, would be so much better if we could catch dynamic events.. Could just do a catchevent() on the onCreated event :o
__________________
Reply With Quote
  #8  
Old 06-13-2008, 09:06 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Chompy View Post
Could just do a catchevent() on the onCreated event :o
You could just use function onCreated(). I can't believe you even suggested such a ridiculously stupid thing.
Reply With Quote
  #9  
Old 06-13-2008, 09:20 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
well, nope

its like

update script
onCreated()

but i want

onUpdate()
update script
onCreated()

__________________
Reply With Quote
  #10  
Old 06-13-2008, 09:29 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by projectigi View Post
well, nope

its like

update script
onCreated()

but i want

onUpdate()
update script
onCreated()

I was referring to Chompy's idea of using catchevent on onCreated as being stupid - not this. Although the problem is that the serverside would have to wait for this update function to complete, which sometimes if abused, it never will, and the clientside has no idea that the script has updated until it's been updated anyway.
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 10:19 AM.


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