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
  #16  
Old 05-03-2002, 04:49 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Quote:
Originally posted by Kaimetsu


<DELETED ALL PROOFS>
I am pretty sure he wasn't talking to you...
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it

Last edited by Kaimetsu; 05-03-2002 at 08:48 AM..
Reply With Quote
  #17  
Old 05-03-2002, 07:34 AM
Er1c Er1c is offline
Registered User
Er1c's Avatar
Join Date: Mar 2001
Location: Chicago, IL
Posts: 791
Er1c is on a distinguished road
Quote:
Originally posted by Slaktmaster
newx = x+sin(angle)*velocity;

Could that work?
That would be for moving the player, not changing the velocity/angle in a space-like way.
__________________
Eric Kraft
Reply With Quote
  #18  
Old 05-03-2002, 10:57 PM
Er1c Er1c is offline
Registered User
Er1c's Avatar
Join Date: Mar 2001
Location: Chicago, IL
Posts: 791
Er1c is on a distinguished road
Quote:
Originally posted by Kaimetsu


<DELETED ALL PROOFS>
lmao

Well, anyway, could you help me out here with the equations for changing the velocity/speed and the angle you are traveling in? I really have no clue what I should do...
__________________
Eric Kraft
Reply With Quote
  #19  
Old 05-04-2002, 05:38 AM
Sir_Gareth Sir_Gareth is offline
Banned
Join Date: Jan 2002
Posts: 2,419
Sir_Gareth is on a distinguished road
Send a message via AIM to Sir_Gareth
UnholyNation has a space game
Reply With Quote
  #20  
Old 05-04-2002, 06:42 AM
Frolic_RC2 Frolic_RC2 is offline
Banned
Join Date: Jan 2002
Posts: 960
Frolic_RC2 is on a distinguished road
Hmm...heres a script a long while ago.

It needs a TON of optimization, at least in ship movement, but I think it should be useful to you...

Especially the coolness nebula effects...

WARNING:
DUE TO THE NUMBER OF LIGHT EFFECTS, AND THE QUALITY OF MY COMP, THIS MAY LAG ON SOME OLDER COMPS. YOU HAVE BEEN WARNED.
Attached Files
File Type: zip space.zip (4.4 KB, 93 views)
Reply With Quote
  #21  
Old 05-04-2002, 09:47 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Quote:
Originally posted by Kaimetsu


Okiedokie.

Maintain an (dx,dy) for your current velocity. Add to it when you use the thruster in a given direction (dx+accel*cos(ang),dy+accel*sin(ang)) and limit the total speed with a unit vector. Ie:

mag=(dx^2+dy^2)^0.5;
if(mag>maxspeed){
dx=maxspeed*dx/mag;
dy=maxspeed*dy/mag;
}
I learned about vectors and unit vectors in school last week

But I like your explanation kai this is very useful.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #22  
Old 05-06-2002, 02:59 AM
Er1c Er1c is offline
Registered User
Er1c's Avatar
Join Date: Mar 2001
Location: Chicago, IL
Posts: 791
Er1c is on a distinguished road
Quote:
Originally posted by Kaimetsu
Maintain an (dx,dy) for your current velocity. Add to it when you use the thruster in a given direction (dx+accel*cos(ang),dy+accel*sin(ang)) and limit the total speed with a unit vector. Ie:

mag=(dx^2+dy^2)^0.5;
if(mag>maxspeed){
dx=maxspeed*dx/mag;
dy=maxspeed*dy/mag;
}
Isn't there a way I could do this without saving a dx/dy and just saving the angle you're traveling in and the speed?
__________________
Eric Kraft
Reply With Quote
  #23  
Old 05-06-2002, 07:51 AM
Er1c Er1c is offline
Registered User
Er1c's Avatar
Join Date: Mar 2001
Location: Chicago, IL
Posts: 791
Er1c is on a distinguished road
Using angles would make everything else much easier, like shooting projectiles, onwall stuff, upgrades for the ships (like rotation speed upgrades or something), and then I could use the mouse to change the angle for a secondary way to move.

BUT, if it's too hard I'll just use the two velocity variables...
__________________
Eric Kraft
Reply With Quote
  #24  
Old 05-06-2002, 08:14 AM
Er1c Er1c is offline
Registered User
Er1c's Avatar
Join Date: Mar 2001
Location: Chicago, IL
Posts: 791
Er1c is on a distinguished road
If I use a vector I wouldn't need the angle... I'll just use the vectors, heh.

Thanks for you're help, Kaimetsu
__________________
Eric Kraft
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 11:11 AM.


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