What i want is a system that will have the player just shoot the way they are facing. I have no idea of how to go about this though. My main problem is how to figure out which way the user is facing. After I know that, it's pretty easy. So, i'm asking is there any way to get_dir with out needing a second object.
also, i was wondering if you could point me to an faq or something on macros and scripts. I want the players to hit a button to shoot, not click a verb.
am i sounding wanty?
ID:149189
Jun 20 2002, 6:13 am
|
|
In response to Lummox JR
|
|
didn't want to make another thread for this so, i posted it here. My problem is that I have three enemies in a room to begin with. Then, after the user has killed all three i want three more to appear. repop doesn't work for mobs, so what should i do? i tried this...
proc new_wave() enemy_num = 3 var/mob/enemy/normal/E do E = new /mob/enemy/normal (locate(rand(1,10)),(rand(1,10)),1) while (enemy_num) enemy_num = 3 then, in my death proc. if(istype(src, /mob/enemy/)) world << "One Enemy Down!" del(src) enemy_num -= 1 if(enemy_num <= 0) new_wave() this seems that it would work to me, but it does nothing. after i kill all three enemies, it just sits there. What should i add? |
In response to Nebathemonk
|
|
Nebathemonk wrote:
if(istype(src, /mob/enemy/)) Your problem is right in there: By calling del(src), you delete the mob before the death proc finishes; enemy_num is never decremented and the new wave is never started. The solution is to move del(src) to the end of the proc; first you should probably set src.loc=null so new enemies can spawn properly. Lummox JR |
Each atom has a dir var; that's exactly what you want.
Lummox JR