Ok, in my game, there is a sniper rifle, and there are 2 commands: fire and aim
when you press fire it shoots at a person in oview, easy,
aim makes a new target next to you, you control the target,
when you press aimfire, you shoot a bullet at the target, when you are shot by normal fire, you die, but how do you make it so.....
when you shoot a bullet at a target and a person(mob) is under the target. How do you call the die()proc for him?
I will give credit to he who helps me
ID:149511
Apr 12 2002, 4:27 pm (Edited on Apr 12 2002, 5:52 pm)
|
|
Apr 13 2002, 10:07 am
|
|
I'm coming for you FireEmblem..watch your back...
|
In response to The Machine Gun
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~BANG!!~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Check the location of the target (assume it's a turf) for any other mobs, and pick the first mob (assume you're only targetting mobs) it finds. I'll assume that you can refer to a player's target by using the variable 'target'. If you can't, you can make it do this by giving the player a new target variable:
<code>mob/var/obj/target/target</code> Then when you aim at something, make the target variable equal to the target you're moving around. <code>var/obj/target/T = new(usr.loc) usr.target = T</code> From there, just check the location of the target: <code>mob/verb/aimfire() for(var/mob/M in usr.target.loc) usr.fire(M)</code> // fire at M <code>return</code> // end the loop |
In response to The Machine Gun
|
|
A machine gun that only makes one "BANG!!"?
That doesn't make much sense...lol |