Actor's displayed Speed not changing when dragging it with the mouse

blamekillyblamekilly Member Posts: 5
edited November -1 in Working with GS (Mac)
Hello !

I'm trying to make a land mine that can be moved by touching and dragging it but I would like it to have a critical speed that would make it explode so the player will have to handle these mines carefully.

I used the magnitude( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y ) trick and constrained it to an attribute (real) and displayed it.

It keeps displaying "0" when I drag it around with the mouse.
If I give it a "Move" behaviour it displays the speed (50) I gave it but whever I dragg it around fast or keep it still with the mouse it's displayed speed remains 50...

Is there a way to get this mine's speed when dragging it with the mouse ?

Comments

  • POMPOM Member Posts: 2,599
    Take a look at the template :
    "Cool movement control demo"

    You can use it for your effect , make the mover actor invisible and when you drag the "mine" calculate the
    distance between the "mine" and the "mover" and if its too big then trigger the behavior .

    Roy.
Sign In or Register to comment.