![]() |
Help Scripting Projectiles
can anyone please teach me how to script projectile stuff please and tell me what parts of it does what please.
|
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: 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. |
ok if you didn't make any mistakes i think this will really help me thanks. :)
|
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. :'( |
Quote:
|
If we trust his words, it isn't illegal because it's only showing how to do it and he tried already.
|
Quote:
|
how any one help me on to make a projectile script to make it shoot up and go far
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
Also, it is entirely possible to achieve fairly complicated effects without explicitly trapping any events. If I wrote some code to do so, would it not be a script? Lastly, you are saying that there's no such thing as a malfunctioning script? Quote:
The ocean is a large collection of water. Half of the ocean is also a collection of water. Quote:
|
Quote:
Quote:
Quote:
|
Quote:
Quote:
Quote:
|
Quote:
Quote:
|
Hrm... For the projectiles, I have a problem with GS2. When I use the shoot command, although it works in GS, it doesn't in GS2. Is that a bug, or they did something to it?
|
Quote:
|
Quote:
it seems like playerenters often isnt called clientside in the v3.1 client on gani scripts/putnpc2s |
Quote:
Quote:
Quote:
Quote:
|
Quote:
Quote:
Quote:
|
Quote:
Quote:
Quote:
|
Quote:
Quote:
|
Quote:
Quote:
|
Quote:
Besides, the text that we're typing isn't meant to be executed by any particular interpreter, so it's not a script. |
Quote:
Quote:
Full and whole mean the same thing basically right? |
Quote:
Anyway, I already said that they could benefit from clarification, though I do not think they are particularly ambiguous at present. You'd pretty much need to be trying to misinterpret them. |
Quote:
|
Quote:
|
Quote:
You proceeded to post a script that did just that. That is against the rules, as has already been indicated. |
Quote:
Quote:
|
| All times are GMT +2. The time now is 01:44 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.