Graal Forums  

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

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-19-2003, 08:08 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
"Shoot" Command

Can someone explain me the Shoot command, i don't understand it, but i need it for my Playerworld Project.
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
  #2  
Old 01-19-2003, 08:52 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
shoot x,y,z,angle,zangle,power,gani,params

x - the place on the x axis the projectile starts at
y - the place on the y axis the projectile starts at
z - the place on the z axis the projectile starts at
angle - the angle it moves at, use getangle(vecx(playerdir),vecy(playerdir)) to shoot it at the direction the player is facing
zangle
zangle - the verticle angle it shoots at, 0 gives it a 0 slope (basically it will shoot like this ----------------) and pi/2 will shoot it straight up
power - the strength of the projectile, make it 0 and it will move till it hits something
gani - the gani the projectile uses
params - params for the gani
  #3  
Old 01-19-2003, 10:05 PM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
Quote:
Originally posted by Python523

zangle - the verticle angle it shoots at, 0 gives it a 0 slope (basically it will shoot like this ----------------) and pi/2 will shoot it
Use 3.14/2. As far as I know pi isn't a built in variable.
__________________
new account: Trevor
  #4  
Old 01-19-2003, 10:08 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 tlf288


Use 3.14/2. As far as I know pi isn't a built in variable.
i just said pi because if someone doesn't know what pi is then he or she shouldn't script -.-
  #5  
Old 01-19-2003, 10:19 PM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
Quote:
Originally posted by Python523

i just said pi because if someone doesn't know what pi is then he or she shouldn't script -.-
I am learning new things all the time... Does that mean I shouldn't script?
__________________
new account: Trevor
  #6  
Old 01-20-2003, 01:29 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
pi is indeed a built in variable
  #7  
Old 01-20-2003, 03:02 AM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
Quote:
Originally posted by Loriel
pi is indeed a built in variable
*checks*
*sees it is*

Well, then I take back what I said about it not being a built in variable. :|
__________________
new account: Trevor
  #8  
Old 01-20-2003, 08:01 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
I understand most of it, except for Z and zangle... i tryed to make a script but it soooo sucks
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
  #9  
Old 01-20-2003, 10:57 PM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
Quote:
Originally posted by GoZelda
I understand most of it, except for Z and zangle
Z angle is the angle that it takes while going up\down. Just play around with it. Use numbers from 0.1 to 2.1 .
__________________
new account: Trevor
  #10  
Old 01-21-2003, 06:02 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
K, thanks people. Oh, and pi is 3.14 and another load of numbers behind, it won't stop. so, i DO know that :P
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
  #11  
Old 01-21-2003, 08:12 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
K, if have updated, here is the script. It's going fine, except for the fact that it is going the wrong direction! (I use g2k2 gani's now):
// NPC made by Cyrin
if (created) {
}
if (playertouchsme) {
toweapons Bow;
}
if (weaponfired){
if (playerdir=2){
shoot playerx+.5,playery,3.14*3/2,2.1,3.14/5,1,g2k2bolt,30;
}
if (playerdir=1){
shoot playerx,playery,150,3.14,3.14/2.5,1,re_arrow,0;
}
}

Please tell me what i have done wrong.Oh, and thanks Trevor and all of you, you helped me out a lot with the zangle stuff
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
  #12  
Old 01-22-2003, 12:02 AM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
Quote:
Originally posted by GoZelda

if (playerdir=2){
...
}
if (playerdir=1){
...
}
You cant set a variable like that. more than likely your trying to check what the player's dir is. So use == not =.
__________________
new account: Trevor
  #13  
Old 01-22-2003, 02:30 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
thnaks, but that isn't the problem. When i'm in 2 (down) the arrows shoots like 0 (up)
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
  #14  
Old 01-22-2003, 02:42 PM
Holyblade_Owner Holyblade_Owner is offline
Registered User
Join Date: Feb 2002
Location: USA
Posts: 141
Holyblade_Owner is on a distinguished road
Send a message via AIM to Holyblade_Owner Send a message via Yahoo to Holyblade_Owner
Quote:
angle - the angle it moves at, use getangle(vecx(playerdir),vecy(playerdir)) to shoot it at the direction the player is facing
Did you read what jagen said?
__________________
-Former Governor Nathaniel North (Cresent Pirates)
  #15  
Old 01-22-2003, 02:44 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
didn't work

I played around with it a bit, it works fine now, except for the fact that the arrow lands right in front of me :'( here's shoot thingy:

if (playerdir=2){
shoot playerx+.5,playery,.1
,getangle(vecx(playerdir),vecy(playerdir))
,1.5,1,g2k2bolt,30;
}
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
Closed Thread


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 05:12 PM.


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