ID:263298
Sep 3 2006, 4:57 am (Edited on Sep 3 2006, 5:53 am)
|
|
Fixed.
|
Sep 3 2006, 4:59 am
|
|
DBZ game or what?
|
Interesting way of training. Let me see what I can find:
Sup3r 17 wrote: Code: > mob/var/rockshooting=0 Here's one problem. You never set usr.rockshooting. Although, I would suggest finding another way of doing that instead of defining a variable for each mob. Maybe give the variable to the machine so only one player can use it at a time? > else The new process allows you to set the location by passing it as the first argument, no need to do it manually. Also, you're going to get errors from that "del H" line. What if the player clicks and destroys the rock before 10 seconds are up? You should add an "if(H)" in there. > while(H) Ok, a few problems here, including your freezing problem. First off, the way you're checking for players to get hit by the rocks is a bit of a workaround. I would suggest moving the damage part under /obj/shooterrock/Bump(), then Dream Seeker will handle the rest. Now, the freezing problem appears because you have a loop without a sleep. So the loop just runs and runs as fast as it can, freezing your computer. Now, to fix this, you can add a sleep() under the loop, or in this case you could remove the loop entirely. If you move the damaging part under /obj/shooterrock/Bump(), then all that leaves under the loop is step(). You can then replace the step() with the walk() process, which will loop for you, and remove the while(). Sorry if any of that sounded confusing, I just woke up. If you need an explainations or if anything doesn't seem to work, just post back here and I'll see what I can do to help :) |
In response to DarkCampainger
|
|
obj/rock ? |
In response to DivineO'peanut
|
|
I don't understand, what is your question/opinion/statement that you're trying to convey?
Also, why would the usr be anything but a mob? Last time I checked, client.mob could only be set to /mob. |
In response to DarkCampainger
|
|
Oh, whoops, I thought this was in Dev How-To, and that he was asking how to do such a system. Sorry. :p
|
In response to DarkCampainger
|
|
Thanks, i fixed the freezing problem. But i just realized that i made the rock start from the user, so it looks like the user is shooting rock out, which is not what i wanted. becuase i put usr.loc so its starting off were the usr is. How would i make it start from the machine so that it is shooting out of the machine. cuase i cant put like H.loc= (machines loc)
|
In response to Sup3r 17
|
|
Well, think about it for a second. What is the machine in this process? It's the parent, the container, the source of the verb.
|
In response to DarkCampainger
|
|
ah! the src, i never even thought about that. DarkCampainger, thank you byond needs more people like yourself who actually help the person out. Most other people just post useless stuff. But you actually helped me. Thanks again.
|