Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-21-2005, 07:14 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Projectile Speed

I'm not very familiar with Graal projectiles...

How do you get them to go faster?

I have the angle calculated by:
NPC Code:
((playerdir%4+1)/4)*(pi*2)


(basically, that shoots a projectile in the players direction).

Now, I'm a little confused on how to set the zangle and power. I want the projectile to go straight (so I've been trying a zangle of 0). But, when I change the power, the projectile appears at a certain point in front of the player and disappears right away.

Any suggestions?
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #2  
Old 09-21-2005, 02:11 PM
Ajira Ajira is offline
Poont.
Join Date: Oct 2004
Location: NY, USA
Posts: 477
Ajira is on a distinguished road
An easier way to do the angle would be to use 'getangle(vecx(playerdir),vecy(playerdir)).

And basically, when the power of the projectile is not equal to 0, it will shoot along the zangle. So when the power is 1 and the zangle is 0, it would crash right in front of the player. You need to raise the zangle to see it fly. To make the projectile go straight, put both the zangle and power to 0, but you can't change the speed of the projectile. I wish you could though >.<
__________________
Liek omigosh.

Reply With Quote
  #3  
Old 09-21-2005, 06:04 PM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by Ajira
An easier way to do the angle would be to use 'getangle(vecx(playerdir),vecy(playerdir)).
lol, didn't see that (I'm a unit circle freak).

Quote:
Originally Posted by Ajira
(. . .) you can't change the speed of the projectile. I wish you could though >.<
I wish you could too .

Thanks a lot for the help.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #4  
Old 09-22-2005, 03:13 AM
Velox Cruentus Velox Cruentus is offline
Registered User
Velox Cruentus's Avatar
Join Date: Dec 2004
Location: Quebec, Canada
Posts: 465
Velox Cruentus is on a distinguished road
Send a message via ICQ to Velox Cruentus Send a message via AIM to Velox Cruentus
You can change the speed of a projectile... But throwing it straight up? I don't see the use;

For Ajira, you can shoot almost straight(or straight, for that matter), lower the grav, and it goes faster with the force you put it in.
__________________
In a world of change... Who'll you believe?
Reply With Quote
  #5  
Old 09-22-2005, 04:10 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by Velox Cruentus
You can change the speed of a projectile... But throwing it straight up? I don't see the use;

For Ajira, you can shoot almost straight(or straight, for that matter), lower the grav, and it goes faster with the force you put it in.
Which brings me to my next question xP.

When 'gravity' is changed, does it affect all projectiles, or just the projectiles shot after 'gravity' was changed?
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #6  
Old 09-22-2005, 04:48 AM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
Quote:
Originally Posted by napo_p2p
Which brings me to my next question xP.

When 'gravity' is changed, does it affect all projectiles, or just the projectiles shot after 'gravity' was changed?
Looks like this calls for _someone_ to do some testing on a server! I honestly have no clue whether or not it's immediately updated or if it's for all projectiles launched after the update. Would be a worthy thing to test. Go for it!
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
Reply With Quote
  #7  
Old 09-22-2005, 05:34 AM
Ajira Ajira is offline
Poont.
Join Date: Oct 2004
Location: NY, USA
Posts: 477
Ajira is on a distinguished road
Quote:
Originally Posted by Velox Cruentus
You can change the speed of a projectile... But throwing it straight up? I don't see the use;

For Ajira, you can shoot almost straight(or straight, for that matter), lower the grav, and it goes faster with the force you put it in.
Hmm, totally forgot about gravity.
__________________
Liek omigosh.

Reply With Quote
  #8  
Old 10-10-2005, 05:00 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
o my gosh
NPC Code:

gravity=0;
then shoot command with zangle 0 and power y;


as y approaches infinity, the speed of projectile also approaches infinity, while going straight.
meaning as long as gravity is set to 0 and zangle set to 0, varying the power will give you a different speed while shooting straight.

[edit] gravity is immediately in effect once set, and will affect all projectiles clientside. [/edit]
__________________
Reply With Quote
  #9  
Old 10-10-2005, 08:07 PM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by ZeLpH_MyStiK
o my gosh
NPC Code:

gravity=0;
then shoot command with zangle 0 and power y;


as y approaches infinity, the speed of projectile also approaches infinity, while going straight.
meaning as long as gravity is set to 0 and zangle set to 0, varying the power will give you a different speed while shooting straight.

[edit] gravity is immediately in effect once set, and will affect all projectiles clientside. [/edit]
Thanks a lot for the reply.

I managed to get projectiles to go faster. Nevertheless, your reply helps.

Again, Thanks ;D.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
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 04:48 PM.


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