Making an image follow a player

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
antn18
Posts: 10
Joined: Fri Feb 26, 2016 6:48 pm

Making an image follow a player

Post by antn18 » Fri Feb 26, 2016 8:53 pm

I'm currently creating a game as part of my unit in sixth form. My game is currently a birds-eye view shooter looking down on the player as he faces waves of enemies. I have the player moving but I'm looking for a way to make the skeleton follow the player to where ever he travels to on the card.

If this can't be done, how do you make the enemy follow a hands free line.

Thanks Ant ;)

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5613
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Making an image follow a player

Post by dunbarx » Fri Feb 26, 2016 9:45 pm

Hi.

This ought to be moved to the "Beginner's" section.

But as long as we are here, check out the "move" command in the dictionary, taking special notice of how a control can move along the points of a graphic.
So any path can be characterized as a list of points, and this can be generated in any number of ways: by the user dragging something, by tracking the cursor, some action under script control, or, as I said above, tracking an existing graphic.

Now the fun part. The points of a graphic are just a property of that graphic. That means that even if you hide it, a control will still move along its points.

Craig Newman

Klaus
Posts: 10472
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Making an image follow a player

Post by Klaus » Sat Feb 27, 2016 3:33 pm

Hi ant,

1. welcome to the forum! :D
2. As Mark mentioned, this s definitively NOT off-topic! 8)
Will move the thread now to the beginners section.

Best

Klaus

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5613
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Making an image follow a player

Post by dunbarx » Sat Feb 27, 2016 5:23 pm

Who's Mark?

Craig

Klaus
Posts: 10472
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Making an image follow a player

Post by Klaus » Sat Feb 27, 2016 6:24 pm

Ouch, sorry, I meant CRAIG of course! :oops:

Just moved to my new flat in Odsnabrück and have internet and telephone for
a couple of hours now and now this, how embarrassing...

SparkOut
Posts: 1822
Joined: Sun Sep 23, 2007 4:58 pm

Re: Making an image follow a player

Post by SparkOut » Sat Feb 27, 2016 8:04 pm

Where's Odsnabrück?

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1808
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Making an image follow a player

Post by [-hh] » Sat Feb 27, 2016 9:03 pm

Odsnabrück is the secret name of Bielefeld.
shiftLock happens

Klaus
Posts: 10472
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Making an image follow a player

Post by Klaus » Sat Feb 27, 2016 10:42 pm

:D :D :D

OK, will sell or just give away a D! 8)

antn18
Posts: 10
Joined: Fri Feb 26, 2016 6:48 pm

Re: Making an image follow a player

Post by antn18 » Fri Mar 04, 2016 1:38 pm

Well this took a weird turn. It doesn't matter now, I found a way around it but thanks anyway.


Mark, no sorry Craig

Wait no, Ant

Klaus
Posts: 10472
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Making an image follow a player

Post by Klaus » Fri Mar 04, 2016 1:47 pm

Hi Ant,

glad you made it working!

And sorry, we (Klaus, Craig, Mark, Hermann, SparkOut etc.) like to behave a bit silly
from time to time, life is serious enough! :D


Best

Klaus

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”