ID:172696
 
First of all, sorry if I didn't spell Richocheit right.. =\

Now to my topic. I don't know how to go about when you click an obj, the obj will move, and when it hits a wall, lets say a wall called "black" it will bounce(richocheit) off of the obj... Please Help.




- Err0r-
It's spelt ricochet.
In response to Mousie_kebabs
^-^ Thanks! *Makes a mental note, that it is in fact Ricochet*. Now, can you please help me? =(


- Err0r-
In response to Err0r
Explain to me more about what you are tying to do.
In response to Mousie_kebabs
What I'm tryin to do. Hmmmm. Say we have a object that is a box. We click the box, and the box moves. When the box hits a wall (the wall named "black") it will ricochet off of the wall, and go wherever.
Is this wat you want?
obj
bulit
density=1
text="<font color=#FF0000>*<font color=#770000>*"
proc/bulit_go()
if(step(src,dir))
spawn(1) bulit_go()
else
var/turf/black/o=locate(/turf/black) in get_step(src,dir)
if(o)
dir=turn(dir,180)
else
del src
In response to Err0r
Err0r wrote:
What I'm tryin to do. Hmmmm. Say we have a object that is a box. We click the box, and the box moves. When the box hits a wall (the wall named "black") it will ricochet off of the wall, and go wherever.
Do you meen /turf/black? Wich way dus the box start moveing?

obj
box
density=1
text="<font color=#FF00FF>#"
Click()
dir=input("Wich way?") in list(NORTH,SOUTH,WEST)
bulit_go()
proc/bulit_go()
if(step(src,dir))
spawn(1) bulit_go()
else
var/turf/black/o=locate(/turf/black) in get_step(src,dir)
if(o)
dir=turn(dir,180)
else
del src
In response to Zzo38computer
Thanks for that, Zzo38computer. But when the boxes hit the black, they dissapear :(