ID:149238
Jun 12 2002, 3:16 pm
|
|
I need a code, its like when you shoot a gun and the bullets fire in that direction, can any one help?
|
Jun 12 2002, 5:53 pm
|
|
http://www.deadron.com/byond/ ByondBwicki.dmb?ShootingProjectiles
|
Spades wrote:
I need a code, its like when you shoot a gun and the bullets fire in that direction, can any one help? if i ever get around to doing it, ill find my cd full of byond source goodies, and i will release my effects library, it allows to do anything you can imagine with projectiles, its original intent is for spell effects, but it could definately shoot a bullet, along with having smoke trails on that bullet and sound barrier breaking effects around it, ok so maybe i went a little too far, but it does a lot! its been a while since ive touched it, or byond for that matter, so im not sure how it will stack up to the new releases, hopefully it still works. |
In response to Shadowdarke
|
|
thanks for the link, but it made a few new problims
ok first the proc line: mob/X/proc/Shoot(mob/M) when it says this it will shoot a homeing bullet to any one i select even my self. I whant it not to ask me who to shoot at, but to shoot in the direction that i'm faceing. I need the "M" there becouse it sets a var that i need. And also the link says to bput the density to 1, but all that dose is make the bullet stop right in from of them mob is there any one that can help me?? JoS |
In response to FIREking
|
|
ya? can you still use it?
|
In response to Spades
|
|
mob/var/beenshot = 0
mob/verb/fire() missile(/obj/bullet, usr, dir) obj/bullet Enter(O) usr.shotcheck() mob/proc/shotcheck() if(beenshot == 1) usr <<"You get shot again! and took 20 damage!" usr.health -= 20 deathcheck() else usr <<"You are shot for 20 damage!!" usr.health -= 20 bloodtrail() mob/proc/bloodtrail() if(usr.health == 0) deathcheck() else new/turf/bloodtrail(usr.loc) usr.health -= 5 usr <<"WARNING.. YOU NEED TO GO TO A HOSPITAL OR HEAL! YOU HAVE [usr.health] left and every 10 seconds you lose 5!" sleep(10) bloodtrail() mob/proc/deathcheck() if(src.health == 0) usr <<"You die!" del src else ..() |
In response to Spades
|
|
I can't seem to access Bwiki right now, so I can't check the entry. I do have a little directional projectile demo at http://shadowdarke.byond.com/snippets/snippets.html.
Considering the frequency that people ask for this, I really need to clean it up, include more projectile styles, and make a full blown demo of it. |