How do I move each sprite in turn

Get help using Construct 2

Post » Thu Mar 20, 2014 4:31 pm

Usually i can work things out over time

my problem

I have a sprite called Villain - this sprite is repeated a few times over a map randomly placed

when it comes to the bad guy turn (turn based game) i am trying to get the Villains to move closer to the player

it is a tilemap style movement so i am shifting him 32 pixels

however i have tried for each Villain in so many ways to get them to judge the x or y and i just cannot get them to do anything like 'if' x is greater than player.x then villain.x -32 etc

each move takes 1 action point from the villain which is another complication i am really struggling with, any help would be massively appreciated
B
10
S
2
G
2
Posts: 45
Reputation: 2,039

Post » Thu Mar 20, 2014 6:02 pm

Fantastic Idea, I would like to know how to accomplish this too.. I'm trying to wrap my mind around turn based play and would love to see a tutorial.
B
12
S
4
G
2
Posts: 132
Reputation: 1,749

Post » Fri Mar 21, 2014 5:01 am

Is the villan a sprite, or a tile on the tilemap ? I might be able to bang something out if I know which
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,701

Post » Fri Mar 21, 2014 8:52 am

emoaeden wrote:Is the villan a sprite, or a tile on the tilemap ? I might be able to bang something out if I know which


howdy

the villains are sprites moving on a tilemap (they are the same sprite duplicated a random number amount) they have a number of action points by what type of mob they are in this instance they have 2

at the moment i have the player move then it ends turn but my villains either shoot a large distance across the map of stand there like trees :)
B
10
S
2
G
2
Posts: 45
Reputation: 2,039

Post » Fri Mar 21, 2014 11:08 am

Actually think i have cracked it

using 'for each' and conditions + boolean on villain instance variable move true/false

also 'function' in there helped move or fight for very basic AI thanks for reply and if you have a better way i would be massively grateful still
B
10
S
2
G
2
Posts: 45
Reputation: 2,039

Post » Fri Mar 21, 2014 11:10 am

Let me know if you need a hand still
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,701


Return to How do I....?

Who is online

Users browsing this forum: DolyGamesCosmos and 29 guests