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: FourthWorld, heatherlaine, Klaus, kevinmiller

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

Making an image follow a player

Post by antn18 »

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: 10504
Joined: Wed May 06, 2009 2:28 pm

Re: Making an image follow a player

Post by dunbarx »

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: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Making an image follow a player

Post by Klaus »

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: 10504
Joined: Wed May 06, 2009 2:28 pm

Re: Making an image follow a player

Post by dunbarx »

Who's Mark?

Craig
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Making an image follow a player

Post by Klaus »

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: 2987
Joined: Sun Sep 23, 2007 4:58 pm

Re: Making an image follow a player

Post by SparkOut »

Where's Odsnabrück?
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Making an image follow a player

Post by [-hh] »

Odsnabrück is the secret name of Bielefeld.
shiftLock happens
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Making an image follow a player

Post by Klaus »

: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 »

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: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Making an image follow a player

Post by Klaus »

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