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 06-12-2008, 06:55 AM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
TProjectile

Set a bullet speed?

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

Doesn't work..

TProjectile

How does this work ?
Reply With Quote
  #2  
Old 06-12-2008, 07:05 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
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.
__________________
Do it with a DON!
Reply With Quote
  #3  
Old 06-12-2008, 03:16 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
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..
__________________
Reply With Quote
  #4  
Old 06-12-2008, 08:56 PM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
Quote:
Originally Posted by Chompy View Post
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.
Reply With Quote
  #5  
Old 06-12-2008, 09:01 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
Quote:
Originally Posted by DrakilorP2P View Post
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
__________________
Reply With Quote
  #6  
Old 06-12-2008, 09:05 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
Maybe if you could set the speed at the start?
__________________
Reply With Quote
  #7  
Old 06-12-2008, 09:16 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
UNCALLED FOR! Who would ever think we'd want our projectiles flying at speeds we personally desired! UNHEARD OF.
Reply With Quote
  #8  
Old 07-29-2008, 07:28 AM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
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?
Reply With Quote
  #9  
Old 07-29-2008, 07:34 AM
TheStan TheStan is offline
Stan?
Join Date: May 2008
Location: U.S.
Posts: 100
TheStan is on a distinguished road
Send a message via AIM to TheStan Send a message via MSN to TheStan
Quote:
Originally Posted by Stryke View Post
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().
Reply With Quote
  #10  
Old 07-29-2008, 11:35 AM
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
Not all of them are read-only. You can set the zoom of them
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:21 AM.


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