Alright, when you let out a projectile it runs untill it hits something, no? Well when this projectile hits a wall it is supposed to call a proc called Explosion() and add some effects over the range, well it doesn't and it doesn't call UnderExplosion() either, witch destroys all the walls in range.
obj/Missle/MRXMoving
icon = 'Inventory.dmi'
icon_state = "MRX Misslemoving"
density = 1
name = "M.R.X. Missle"
Bump(atom/A)
if(istype(A,/obj/Wall))
A:Blow()
Explosion()
UnderExplosion()
proc
Explosion()
for(var/atom/X in range(1,src))
X.overlays+=/obj/Explosion
spawn(15)
X.overlays.Cut()
UnderExplosion()
for(var/obj/Wall/X in range(1,src))
X.Blow()
Wheres the problem?
ID:174864
Jul 13 2003, 6:17 am
|
|
Jul 13 2003, 6:42 am
|
|
Your proc isn't defined for a specific atom.
|
In response to Super16
|
|
well when i put ATOM for a reason, i want everything to have a overlay.
|
In response to Crashed
|
|
Crashed wrote:
well when i put ATOM for a reason, i want everything to have a overlay. Don't act smart to me src is meaningless in your proc |
In response to Super16
|
|
Well it seems that i got it working, so SRC does mean something. But instead of it all going at once, it goes 1 at a time. First for the turf under the obj, then beside and so on so forth. Didn't mean to be rude in the last post.
|
In response to Crashed
|
|
var/list/listy=list()
for(var/atom/X in range(1)) listy+=X X.overlays += sdjfnsdbfsdf sleep(15) for(var/atom/X in listy) X.overlays.Cut() |
In response to Super16
|
|
No offence or anything, but there is a simpler way. And that for() is just messing me up :/
|
In response to Crashed
|
|
Crashed wrote:
No offence or anything, but there is a simpler way. And that for() is just messing me up :/ If there is a simpler way then do it stop posting on newbie central. |
In response to Super16
|
|
The src does mean something there. It's the reference to the object that owns that proc. By leaving it out you're using usr which is very wrong in that place and will have undesired effects.
[Edit:] That and the extra loop is kinda pointless. |
In response to Crashed
|
|
Oh, it's not the for it's the sleep! it sleeping everything ahh, found the problem. Thanks for your help anyway.
|
In response to Super16
|
|
I just found this new way now -_-
|