Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Bug Report (https://forums.graalonline.com/forums/forumdisplay.php?f=193)
-   -   TProjectile.destroy() (https://forums.graalonline.com/forums/showthread.php?t=134259418)

salesman 06-05-2010 11:38 PM

TProjectile.destroy()
 
does not seem to work.

I know I'm getting the projectile correctly because echoing the projectile's data works just fine...it just won't let me kill it!

PHP Code:

temp.proj player.level.projectiles[temp.ind];
echo(
temp.proj.objectType()); // echoes TProjectile
echo(temp.proj.params); // echoes properly as well
temp.proj.destroy(); // doesn't work, but sometimes produces an error. 


DustyPorViva 06-06-2010 12:00 AM

I think projectiles are read-only?

salesman 06-06-2010 12:04 AM

Quote:

Originally Posted by DustyPorViva (Post 1580524)
I think projectiles are read-only?

Not everything on serverside, and /scripthelp says I should be able to destroy it.
Quote:

Script help for 'projectile':
TProjectile.destroy()
You can even grab a projectile and change its parameters if you want:
PHP Code:

echo(temp.proj.params); // echoes {20, account, etc}
temp.proj.params "test";
echo(
temp.proj.params); // echoes "test" 


cbk1994 06-06-2010 01:56 AM

Are you trying to destroy clientside or serverside?

salesman 06-06-2010 02:07 AM

Quote:

Originally Posted by cbk1994 (Post 1580540)
Are you trying to destroy clientside or serverside?

serverside

cbk1994 06-06-2010 02:11 AM

Quote:

Originally Posted by salesman (Post 1580542)
serverside

I can't imagine why it would work serverside. Projectiles are handled completely clientside after shot and aren't synced with serverside.

salesman 06-06-2010 02:36 AM

Quote:

Originally Posted by cbk1994 (Post 1580543)
I can't imagine why it would work serverside. Projectiles are handled completely clientside after shot and aren't synced with serverside.

hmm, you're right. I just tested it. I can change the values of the params, but when it hits something and calls onActionProjectile() on the clientside, it still has the old parameters.

I thought maybe it was synced like clientr.vars or something.

Guess I'll be using custom projectiles =p


All times are GMT +2. The time now is 02:01 AM.

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