distance tricks

Create fast, sprite powered games with Animation Engine, co-developed with DerBrill Software!

Moderators: heatherlaine, robinmiller, kevinmiller, malte

Post Reply

Is it helpful?

Yes, more of it.
2
67%
No, too hard.
0
No votes
No, too easy.
0
No votes
Give us more sophisticated tuts!
1
33%
 
Total votes: 3

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

distance tricks

Post by malte » Mon Apr 10, 2006 12:31 pm

Here is the first one. :-)

A card with a graphic "myGraphic". In the cardscript:

Code: Select all

on mouseMove
  put distance(the mouseLoc,the loc of grc "myGraphic") into theDistance
  if theDistance<257 then
    set the backcolor of grc "myGraphic" to 256-theDistance,0,0
  else 
    set the backColor of grc "myGraphic" to 0,0,0
  end if
  pass mouseMove
end mouseMove
All the best,

Malte

Post Reply

Return to “Animation Engine”