Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   TProjectile (https://forums.graalonline.com/forums/showthread.php?t=80053)

Stryke 06-12-2008 06:55 AM

TProjectile
 
Set a bullet speed?

player.level.projectiles[player.level.projectiles.size()].speed = 1;

Doesn't work..

TProjectile

How does this work ?

zokemon 06-12-2008 07:05 AM

player.level.projectiles[player.level.projectiles.size()]

wouldn't work anyways as that doesn't exist.

An array with a size of 1 is only gonna have index 0, same as an array with size 2 is only gonna have 0 and 1.

You want:
player.level.projectiles[player.level.projectiles.size() - 1]

Though I'm pretty sure almost all TProjectile variables are read-only.

Chompy 06-12-2008 03:16 PM

As Zero said, you can't edit the projectile object :( Would be cool to edit it though.. instead of making a new one to reflect a projectile we could just alter the angle variable..

DrakilorP2P 06-12-2008 08:56 PM

Quote:

Originally Posted by Chompy (Post 1396514)
As Zero said, you can't edit the projectile object :( Would be cool to edit it though.. instead of making a new one to reflect a projectile we could just alter the angle variable..

The point of the projectiles is that you only have to transmit network data once at creation. The client and the server then runs their own versions of the projectile, minimizing unnecessary traffic. I think that's a reasonable tradeoff.

Chompy 06-12-2008 09:01 PM

Quote:

Originally Posted by DrakilorP2P (Post 1396596)
The point of the projectiles is that you only have to transmit network data once at creation. The client and the server then runs their own versions of the projectile, minimizing unnecessary traffic. I think that's a reasonable tradeoff.

Hmm, probably :o

cbk1994 06-12-2008 09:05 PM

Maybe if you could set the speed at the start?

DustyPorViva 06-12-2008 09:16 PM

UNCALLED FOR! Who would ever think we'd want our projectiles flying at speeds we personally desired! UNHEARD OF.

Stryke 07-29-2008 07:28 AM

Sorry for reviving an old thread, but it's my own thread and I didn't want to create a new one, so.. If you log on to Ol' West on their news message it says that bullets have been slowed down, so how did they do it?

TheStan 07-29-2008 07:34 AM

Quote:

Originally Posted by Stryke (Post 1409479)
Sorry for reviving an old thread, but it's my own thread and I didn't want to create a new one, so.. If you log on to Ol' West on their news message it says that bullets have been slowed down, so how did they do it?

They make custom projectiles by using a class joined to a putnpc2().

DustyPorViva 07-29-2008 11:35 AM

Not all of them are read-only. You can set the zoom of them :)


All times are GMT +2. The time now is 09:51 AM.

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