Code:
Problem description:
My current system creats massive bugs whenever a bullet is shot into the water, I pretty much know why but cnat seem to make one of my own
ID:271490
Jul 16 2007, 2:15 pm
|
|
In response to Dession
|
|
Thanks for the trouble but I got that down, what i really need is a way for it to auto-delete when it hits a turf with an Etner proc
|
In response to Lt. Pain
|
|
Have the Enter() see what is entering and if it's a bullet then delete it. =P
|
In response to Dession
|
|
yea i did that to (again im not stupid) but it still seems not to work XD i think it is becaause the bullets info about what happens when it hits something is in a proc and not he obj itself
|
In response to Lt. Pain
|
|
You COULD do something like this...
obj |
There are quite a few things you could do here.
But since this isn't just a shooting system in general, I'll just narrow down the possibilities down to a few. 1. You could do what the other people in the thread told you to do. You have bullets that can only travel orthogonally, meaning that you'll have to line yourself up to shoot at your target. These bullets are usually pretty slow, meaning players might be able dodge them, and are usually pretty ugly. 2. You could use bullets with pixel based movement. This potentially lets you make bullets much faster and allows bullets to travel in any angle, meaning that you don't have to be lined up with your target to hit them with a bullet. This is much more realistic, but it's known to create quite a bit of lag if the bullets are too slow and/or the bullets are done inefficiently. Shadowdarke has a good pixel projectiles library for this. IIRC, JtGibson has a vectors library that could be used for this. This typically requires trigonometry to code yourself, but if you're good with geometry, you might be able to do it. 3. You could use line based projectiles. This is pretty much the same thing as #2, but it's much much faster and usually doesn't have any graphics. In this case, bullets are invisible and are near instantaneous. Some simple geometry with line-intercept form can do this. I know that DarkCampainger has made a thread about this in the past... I'll post a link to the thread later. |
Here is an example of what im uing
obj/Guns/Duel_Pistols That is the code that I'm useing, so is he problem in the fact that all the bullet info is deffined in the proc? And if anyone has a simpler system please post it, I dont need a state of the art shooting sysem, just something simple that I can adjust to my games needs. Thanks in advance |
To make it go in your direction do:
Also for future reference... This should go in Developer How-To not Code Problems.