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 08-14-2002, 11:42 AM
zorakid2001 zorakid2001 is offline
Banned
Join Date: Jul 2002
Location: Oregon USA <-- this place sux0rs
Posts: 113
zorakid2001 is on a distinguished road
Send a message via ICQ to zorakid2001 Send a message via AIM to zorakid2001
vecx and vecy

I need help getting my npc to drop a weapon in front of the player. plz help me!
Reply With Quote
  #2  
Old 08-14-2002, 11:52 AM
RavenTelvecho RavenTelvecho is offline
Registered User
RavenTelvecho's Avatar
Join Date: Apr 2002
Location: Toronto, Ontario, Canada
Posts: 0
RavenTelvecho is on a distinguished road
Send a message via ICQ to RavenTelvecho Send a message via AIM to RavenTelvecho Send a message via Yahoo to RavenTelvecho
i still dont get it but here
http://forums.graal2001.com/forums/s...der=descending
__________________

^tuff newbie ;x
RavenTelvecho
!Booj
we are 'brothers'
Reply With Quote
  #3  
Old 08-14-2002, 12:00 PM
zorakid2001 zorakid2001 is offline
Banned
Join Date: Jul 2002
Location: Oregon USA <-- this place sux0rs
Posts: 113
zorakid2001 is on a distinguished road
Send a message via ICQ to zorakid2001 Send a message via AIM to zorakid2001
I found it there.. its for a restaraunt thing
Reply With Quote
  #4  
Old 08-14-2002, 12:04 PM
RavenTelvecho RavenTelvecho is offline
Registered User
RavenTelvecho's Avatar
Join Date: Apr 2002
Location: Toronto, Ontario, Canada
Posts: 0
RavenTelvecho is on a distinguished road
Send a message via ICQ to RavenTelvecho Send a message via AIM to RavenTelvecho Send a message via Yahoo to RavenTelvecho
kk i still have to learn it x.x
__________________

^tuff newbie ;x
RavenTelvecho
!Booj
we are 'brothers'
Reply With Quote
  #5  
Old 08-14-2002, 12:45 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
its a built-in array
vecx vecy
0 0 -1
1 -1 0
2 0 1
3 1 0
Reply With Quote
  #6  
Old 08-14-2002, 01:55 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Quote:
Originally posted by Python523
its a built-in array
vecx vecy
0 0 -1
1 -1 0
2 0 1
3 1 0
why does vecx have two values???

*edit* nm, i see, those are the directions
__________________
[signature]insert here[/signature]
Reply With Quote
  #7  
Old 08-14-2002, 03:23 PM
SingleChance SingleChance is offline
Kill Pirates
Join Date: Apr 2002
Location: Canada
Posts: 1,296
SingleChance is on a distinguished road
Smile

Is that the move script somet like this
move 3,4,2,6;
Not quite shore but thats how u do movie scene's i used to do em like this
playerx=;sprite=0;
lol
Reply With Quote
  #8  
Old 08-14-2002, 09:07 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Quote:
Originally posted by SingleChance
Is that the move script somet like this
move 3,4,2,6;
Not quite shore but thats how u do movie scene's i used to do em like this
playerx=;sprite=0;
lol
lol, thats old school


the vecx and vecy are used in mostly movement scripts


NPC Code:

vecx vecy dir
0 -1 0
-1 0 1
0 1 2
1 0 3



when you move, then it basically does this
playerx+=vecx(playerdir);
playery+=vecy(playerdir);

so if you move up (dir 0), you will get 0 added to your x value, and -1 added to your y value
__________________
[signature]insert here[/signature]
Reply With Quote
  #9  
Old 08-16-2002, 10:30 AM
Spectre1337 Spectre1337 is offline
Banned
Spectre1337's Avatar
Join Date: Nov 2001
Location: United States
Posts: 790
Spectre1337 is on a distinguished road
Send a message via AIM to Spectre1337 Send a message via Yahoo to Spectre1337
Quote:
Originally posted by screen_name


lol, thats old school


the vecx and vecy are used in mostly movement scripts


NPC Code:

vecx vecy dir
0 -1 0
-1 0 1
0 1 2
1 0 3



when you move, then it basically does this
playerx+=vecx(playerdir);
playery+=vecy(playerdir);

so if you move up (dir 0), you will get 0 added to your x value, and -1 added to your y value
We learned something stupid like that in school.. There is the axis thing, its like the big DOT in the middle. the left side is the X and the right is the Y, I think. And you would write the answers to the problems like (0,3) and stuff.. Its freaky.

0 = axis
3 = y

If it were -3, I think it would be X.. im not sure *cries* I hate math
Reply With Quote
  #10  
Old 08-17-2002, 04:38 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
its called a grid

NPC Code:

Y (+)
|
|
(-) | (+)
X--------|------ X
|
|
|
Y (-)




with the (0,3)

you would move 0 spaces on the x axis and 3 on the Y axis, which is equal to up



lol
__________________
[signature]insert here[/signature]
Reply With Quote
  #11  
Old 08-17-2002, 11:40 PM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
it's called a cartesian plane, or coordinate plane....they're a lot more fun to play with in Calculus, trust me ;-)
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #12  
Old 08-18-2002, 01:27 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
NPC Code:
 Input  vecx  vecy
0 0 -1
1 -1 0
2 0 1
3 1 0

__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #13  
Old 08-18-2002, 01:34 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by osrs
NPC Code:
 Input  vecx  vecy
0 0 -1
1 -1 0
2 0 1
3 1 0

thanks for repeating exactly what screen_name and I posted
Reply With Quote
  #14  
Old 08-18-2002, 03:20 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Quote:
Originally posted by mikepg
it's called a cartesian plane, or coordinate plane....they're a lot more fun to play with in Calculus, trust me ;-)
never knew it was called a cartesian plane

anyways i liked messing with them when i had a graphing calculator that was kinda fun


anyways, as for osrs, how is your post going to help anyone??
you didnt even explain anything, just the array setup Xx
__________________
[signature]insert here[/signature]
Reply With Quote
  #15  
Old 08-18-2002, 10:02 PM
Androk2k1 Androk2k1 is offline
Banned
Androk2k1's Avatar
Join Date: Dec 2001
Posts: 1,336
Androk2k1 is on a distinguished road
Screenies explanation was best one x.X But how can I use it in script?
Say I want player to move up, when he wants to move up... what flag do I use, and what script? x.X
Reply With Quote
  #16  
Old 08-19-2002, 05:07 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
thanks for repeating exactly what screen_name and I posted
No Problem...Now you can Learn about that...
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
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 02:58 AM.


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