![]() |
Custom Projectile (Bow)
I'm trying to make a custom bow with new images for my world, I found a script online that uses the command I need: "shoot" but I could not find it in the commands list so I don't know how to completely use it properly. Also I can't figure out how to make the arrows do damage, this is what I have so far.
// NPC made by E-Man if (created) { setimg woodenbow.png; } if (playertouchsme) { toweapons Wooden Bow; } if (weaponfired && playerdir=0) { freezeplayer 0.6; setani shoot,woodenbow1.png; sleep 0.2; shoot playerx-0.8,playery+0.5,2,pi/2,0,0,eman_woodenarrow,; } if(weaponfired && playerdir=1){ freezeplayer 0.6; setani shoot,woodenbow1.png; sleep 0.2; shoot playerx-1,playery+2,2,pi,1,0,eman_woodenarrow,; } if(weaponfired && playerdir=2){ freezeplayer 0.6; setani shoot,woodenbow1.png; sleep 0.2; shoot playerx+0.2,playery+3,2,1.5*pi,.5,0,eman_woodenarr ow,; } if(weaponfired && playerdir=3){ freezeplayer 0.6; setani shoot,woodenbow1.png; sleep 0.2; shoot playerx+1.3,playery+2,2,pi*2,1,0,eman_woodenarrow, ; } Also for some reason when I shoot left the arrow is transparent, I think that may be because of the shoot command though. |
Shoot inherits basic gani properties. In this case you can just set the graphics in the gani for each direction and they will be set automatically when fired. You can also simplify the script like so:
PHP Code:
|
Quote:
(Btw, how do you put a script in a PHP Code box?) |
PHP Code:
|
Can you give me an example line that uses "shoot because that is kind of confusing. I mainly don't get the variables of : z, angle, zangle, and ganiparams. Also I still don't know how to use setshootparams or how to call it, and setshootparams is to do damage, right?
|
Quote:
Quote:
|
Quote:
|
Since graal functions work in radians, pi is an important variable seeing as pi *2 is equivalent to 360 degrees.
Apart from that it has no further significance. |
Quote:
http://uploads.graalcenter.org/uploa...987bd6e5ae.jpg Notice how the radians on the circle (they have pi attached) compare to the degrees. So to get the angle bullets should fly at, we can do.. PHP Code:
http://uploads.graalcenter.org/uploa...directions.png So we can start filling in values for that expression PHP Code:
PHP Code:
http://uploads.graalcenter.org/uploa...-annotated.jpg This is where our bullets will fly. Try the same thing for any direction and you'll find the angle matches up to the direction the player is facing. |
Quote:
|
Quote:
I wouldn't know the best way to handle damage in GS1; assuming you can't use GS2 because you're a trial and have no access to Testbed, have you tried using SuperRewards to get enough gelats for a month of gold? It might take some time, but you can usually squeeze 300 gelats out of it without too much trouble. I really hate to see someone learning such an old and horrible language (GS1) just because they're a trial. |
Quote:
|
Quote:
|
Now that everyone knows that I can't get gold, let's get back to the issue of figuring out how to do damage to npc baddies with a projectile on offline editor
(Why can't offline editor just used gs2 :() |
Quote:
Ok, now I completely understand this. Thank you for sending this. I was even able to fix your shorted script that you said earlier Quote:
PHP Code:
|
| All times are GMT +2. The time now is 06:51 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.