This block has been discussed many times:
Point at x() y()This has been put down though many times because you can place a sprite at that point and have it point at the sprite. However, what you can't do with a sprite is this:
Point at x (pick random (30) to (90)) y (pick random (-40) to (60))I can't think of a way to do this wih a hidden sprite, and even if you could, I think this block is still needed.
Last edited by turkey3 (2012-03-22 18:19:08)
Offline
When gf clicked point towards [Sprite2 v]//on other sprite
When gf clicked hide go to x: (pick random (30) to (90)) y: (pick random (-40) to (60))//on hidden sprite
Last edited by MrMonk999 (2012-03-22 18:39:25)

Offline
Another easy way to replicate it is to get a normal, one pixel big sprite, and go like this
when gf clicked wait until <<point to wherever>=[1]> go to x:<pick random (30) to (90)>y:<pick random (-40) to (60) broadcast [point v]
When I receive [point v] point towards [the sprite above v]
Offline
The above method wouldn't work for 1s1s games though.
We desperately need that block, I have to use an extremely long workaround now :l
Offline
there is a way to do it using trig
when i receive [point v]
if <(y position) = (target y)>
if <(x position) > (target x)>
point in direction (90)
else
point in direction (-90)
end
stop script
end
if <(y position) < (target y)>
point in direction (([atan v] of (((x position)-(target x))/((y position)-(target y))))-(180))
else
point in direction ([atan v] of (((x position)-(target x))/((y position)-(target y))))
If it doesn't work swap round the x's and y's
Last edited by joefarebrother (2012-03-23 12:55:30)
Offline
joefarebrother wrote:
there is a way to do it using trig
Yep, here.
Offline
I don't think this thread is needed...
Offline