I can not get my shoot to work i want it so it plays a sound as well as shooting in a stright line at any time instead of firing only when a enemy is there and not all the time. If you have played tanks like that.Could some one plz help me.
Unix
ID:150121
Dec 9 2001, 5:19 am
|
|
In response to Gazoot
|
|
Still need help so ive put somet on to it like this
usr.hp -= 10 but how do i add a sound or make it so it shows up a icon?? |
In response to Unix
|
|
obj
bullet New(dir) walk(src,dir,3) Bump(atom/A) // Damage check here usr.hp -= 10 icon = 'shoot.dmi' icon_state = "moving" mob verb Fire() new/obj/bullet(get_step(src,src.dir)) ive doen this so far but i dont realy get it <font color=yellow>Unix (bit of a n00b) |
In response to Unix
|
|
Some one help me
|
In response to Unix
|
|
Unix wrote:
obj Ahem, bumping posts is not nice, so please don't do that. Does the example work? I see that you have usr.hp -= 10, but the Bump proc supplies an atom A as the bumped object. So you need to test if A is a mob, and then subtract 10 hitpoints from A. Also, the icon and icon_state shouldn't be in the Bump proc. You can put it on top like all other objects. /Andreas |
You should of course test more things in the fire() verb, but I think this is a good start.
/Andreas