Del()
var/seed_drop = rand(-5,5)//Negative Number
while(seed_drop)
new drop (src.loc,src)
seed_drop--
..()
Okay, if I use a negative number, it laggeths. :9
How could I fix that? With an if statement?
ID:268846
![]() Dec 1 2004, 5:25 pm
|
|
Del() Okay, if I use a negative number, it laggeths. :9 How could I fix that? With an if statement? |
So there's a bigger chance it won't drop anything. :p
I'll just use an if statement to make it zero. |
obj/Del() |
It's because seed_drop will never reach zero if it starts as a negative number, therefor creating an infinite loop. In the context that you're using while(seed_drop), it will only perform the loop until seed_drop equals zero (or null).
In such a situation, I'm not sure why you'd want a negative number anyways.