Keep Boss On Dungeon Floor

Get help using Construct 2

Post » Fri Jul 11, 2014 4:54 pm

Hi All
My dungeon is made from 30 x 30 sprites including walls, dungeon floor, monsters etc.
I have a boss that I want to move each time the player moves. I figured on mouse click get the boss position
and move 30 pixels in a random direction, problem is the boss moves over walls etc.
How can I make him stay on the dungeon floor only.
B
6
S
1
Posts: 18
Reputation: 342

Post » Fri Jul 11, 2014 5:15 pm

You got to make a condition that walls can't be selected
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
91
S
30
G
22
Posts: 1,985
Reputation: 20,149

Post » Fri Jul 11, 2014 5:22 pm

The boss moves automatically in a random direction + or - 30 pixels both X & Y.
I wondered about using overlapping at offset but can't get it to work
B
6
S
1
Posts: 18
Reputation: 342

Post » Fri Jul 11, 2014 6:19 pm

if you are setting the position manually, you need to also check if it's over a wall, after moving the boss, have another check for if the boss overlaps a wall, if so, either move it back or move it somewhere else.
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 43 guests