: : : : Is it possible to...
: : : : 2 : ...(easily) let a sprite (let's name it A), if it's touched by sprite B, change in sprite C.
: : : : 2) Uh... probably, but could you explain your idea more? I'm not quite sure what you're trying to do.
: : : : Well, let's say you have a watergraphic(A) and a rockgraphic(B) (or something else you can push in water). Then you push B to A, then the water changes into C, a graphic where you see the rockgraphic (or something else you pushed in the water) in the water. The script should be attached to the watergraphic.
: : : : So it should be something in the script : when I'm touched by B, I'll change in C and B goes away. Sounds dull huh, but that's the idea. ;)
: : : : Simeon
: : : Why not just have the variable if A touches B kill A and create C? Seems like the most simple way...
: : I think the problem lies in how to tell if one sprite touches another. There are a couple ways. One you can check the distance between A and B (using sp_x and sp_y), or you could do something like how you blow up rocks in Dink. Make a script called dam-rock.c and base it on dam-bomn.c.
: If this rock is only moved ,then why not just check if is within a certin co-ordinate?
: eg:
: //done/spawned after rock has been moved
: if x => 300
: {
: if x =< 330//this will never be read...
: {
: if y => 200//...
: {
: if y =< 220//...
: {
: do whatever
: }
: }
: }
: }
Yeah, something like that would work, but not the way Chrispy has it set up :)
: : : : : Is it possible to...
: : : : : 2 : ...(easily) let a sprite (let's name it A), if it's touched by sprite B, change in sprite C.
: : : : : 2) Uh... probably, but could you explain your idea more? I'm not quite sure what you're trying to do.
: : : : : Well, let's say you have a watergraphic(A) and a rockgraphic(B) (or something else you can push in water). Then you push B to A, then the water changes into C, a graphic where you see the rockgraphic (or something else you pushed in the water) in the water. The script should be attached to the watergraphic.
: : : : : So it should be something in the script : when I'm touched by B, I'll change in C and B goes away. Sounds dull huh, but that's the idea. ;)
: : : : : Simeon
: : : : Why not just have the variable if A touches B kill A and create C? Seems like the most simple way...
: : : I think the problem lies in how to tell if one sprite touches another. There are a couple ways. One you can check the distance between A and B (using sp_x and sp_y), or you could do something like how you blow up rocks in Dink. Make a script called dam-rock.c and base it on dam-bomn.c.
: : If this rock is only moved ,then why not just check if is within a certin co-ordinate?
: : eg:
: : //done/spawned after rock has been moved
: : if x => 300
: : {
: : if x =< 330//this will never be read...
: : {
: : if y => 200//...
: : {
: : if y =< 220//...
: : {
: : do whatever
: : }
: : }
: : }
: : }
: Yeah, something like that would work, but not the way Chrispy has it set up :)
That came out a bit.. messed. heh