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 03-15-2005, 12:01 AM
hottstuff911 hottstuff911 is offline
Scripter
hottstuff911's Avatar
Join Date: Jan 2005
Location: USA
Posts: 23
hottstuff911 is on a distinguished road
Send a message via AIM to hottstuff911
Help Scripting Projectiles

can anyone please teach me how to script projectile stuff please and tell me what parts of it does what please.
__________________

~Contact Info~
Aim: Grind64RyGuy
Email: [email protected]
Client Status:
Reply With Quote
  #2  
Old 03-15-2005, 01:14 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
shoot x,y,z,angle,zangle,power,gani,ganiattribute;

x-starting x of the projectile

y-" "y " "

z-" "z " "

angle-the angle at which the shot will fire, in radians. 0 is right, 3.14/2 is up, 3.15 is left, and 3.14*1.5 is down

zangle-same thing but for on the z axis, it decides how "up" the shot will be fired, with 0 being shot straight forward (not good to do, wont get anywhere becuase of the gravity), and 3.14/2 being straight up.

power- the force of the shot. 1 is the default graal arrow, and having 0 will make the projectile not be affected by gravity and travel at a speed of 1 (not sure if that's how it's meant, but my experience tells me this).

gani- gani of the projectile, if you put nothing it uses the player's gani without the player sprites (except for shadow). example: if the player is idle it will shoot a shadow.

gani attribute- same as with setani gani,ganiattribute;



Hope that helps, anyone can correct me if I put something wrong or misguiding here (but dont be an ass about it)


EDIT: forgot a few other things for setting up and recieving the projectile.


setshootparams param0,param1,ect.-for clientside, when recieved, there will be parameters based on what's set here, so if you have iut set as:
NPC Code:

setshootparams 1,2;


when recieved (I'll cover that next) with actionprojectile clientside it will have #p(0) as 1, and #p(1) as 2. if done serverside or with actionprojectile2, when recieved it will have #p(0) as the landing x(where the projectile hits the ground or something else), #p(1) as the landing y, and then #p(2) as 1, and #p(3) as 2.


Recieving:


actionprojectile-if on clientside, it reacts when hit by a clientside projectile. If on serverside it triggers if a clientside projectile lands (or if in a class npc when it's hit by one), and if done serverside, #p(0) is the land x, and #p(1) is the landing y, and the following params will be any ones that were set for the projectile. Otherwise the params are in order of what was set by the player, starting at #p(0).

actionsprojectile-a serverside projectile has landed (meaning a projectile sent by a serverside script). Params are the same as with serverside above. If put in a class npc or on clientside, it will react when hit by a serverside projectile (and params are as the player set)

actionprojectile2- clientside: a clientside projectile has landed. Params are same as actionprojectile on serverside. This command isnt used serverside.



I think that covers it all, hope this helps.
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!

Last edited by falco10291029; 03-15-2005 at 01:24 AM..
Reply With Quote
  #3  
Old 03-15-2005, 01:29 AM
hottstuff911 hottstuff911 is offline
Scripter
hottstuff911's Avatar
Join Date: Jan 2005
Location: USA
Posts: 23
hottstuff911 is on a distinguished road
Send a message via AIM to hottstuff911
ok if you didn't make any mistakes i think this will really help me thanks.
__________________

~Contact Info~
Aim: Grind64RyGuy
Email: [email protected]
Client Status:
Reply With Quote
  #4  
Old 03-15-2005, 02:31 AM
hottstuff911 hottstuff911 is offline
Scripter
hottstuff911's Avatar
Join Date: Jan 2005
Location: USA
Posts: 23
hottstuff911 is on a distinguished road
Send a message via AIM to hottstuff911
do you think you can like make the part when it gets recived by like a player or a baddy they lose 1 hp.

because i dont get how to make that part from your instructions.

:'(
__________________

~Contact Info~
Aim: Grind64RyGuy
Email: [email protected]
Client Status:
Reply With Quote
  #5  
Old 03-15-2005, 11:02 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by hottstuff911
do you think you can like make the part when it gets recived by like a player or a baddy they lose 1 hp.

because i dont get how to make that part from your instructions.

:'(
Don't ask people to do your work for you. You're asking them to break the forum rules, man.
Reply With Quote
  #6  
Old 03-15-2005, 10:22 PM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
If we trust his words, it isn't illegal because it's only showing how to do it and he tried already.
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #7  
Old 03-15-2005, 11:46 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by falco10291029
If we trust his words, it isn't illegal because it's only showing how to do it and he tried already.
The rules clearly say that you shouldn't ask for scripts. All the trust in the world wouldn't obviate this rule.
__________________
Reply With Quote
  #8  
Old 03-16-2005, 12:01 AM
hottstuff911 hottstuff911 is offline
Scripter
hottstuff911's Avatar
Join Date: Jan 2005
Location: USA
Posts: 23
hottstuff911 is on a distinguished road
Send a message via AIM to hottstuff911
how any one help me on to make a projectile script to make it shoot up and go far
__________________

~Contact Info~
Aim: Grind64RyGuy
Email: [email protected]
Client Status:
Reply With Quote
  #9  
Old 03-16-2005, 12:21 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
Quote:
Originally Posted by Kaimetsu
The rules clearly say that you shouldn't ask for scripts. All the trust in the world wouldn't obviate this rule.
Technically he asked for part of one
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #10  
Old 03-16-2005, 02:11 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by falco10291029
Technically he asked for part of one
You are saying that a subset of a script is not itself a script? How do you define the term?
__________________
Reply With Quote
  #11  
Old 03-16-2005, 02:37 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
Quote:
Originally Posted by Kaimetsu
You are saying that a subset of a script is not itself a script? How do you define the term?
It depends what we go by. If we go by the fact that any flag and command could be a script then yes, he is asking for one. But if you go by the fact that he is asking for help in a whole script by wanting help with a part, then he isn't. I go by the latter. I'm not sure how the rules are meant, but misinterpretation is more the writer's fault than mine.
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #12  
Old 03-16-2005, 02:41 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by falco10291029
if you go by the fact that he is asking for help in a whole script by wanting help with a part
He's not "asking for help", he's asking for prepackaged NPC code. Again: How do you define the word 'script'?
__________________
Reply With Quote
  #13  
Old 03-16-2005, 02:47 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
Quote:
Originally Posted by Kaimetsu
He's not "asking for help", he's asking for prepackaged NPC code. Again: How do you define the word 'script'?
He asked for help because he didn't know that type of command. in fatc i gave a universal example not thew exact thing he needed. I define a script as a functioning.....script......but if someone asks for how to use a function in a flag I don't consider it to be a script if I give a universal example
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #14  
Old 03-16-2005, 03:07 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by falco10291029
I define a script as a functioning.....script......
Could you give me a non-recursive definition?
__________________
Reply With Quote
  #15  
Old 03-16-2005, 04:03 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
Quote:
Originally Posted by Kaimetsu
Could you give me a non-recursive definition?
an npc of any sort that has at least one flag and one function and does the desired effect. Also it can't be part of another one
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
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 01:59 AM.


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