Individual Step Grid Movement

For questions about using Classic.

Post » Fri Mar 12, 2010 11:55 pm

Okay, I'm not sure if this is an option, or not?

I want it to be impossible to hold down the key and move continuously for pre-built grid movement... essentially I want individual step movement. For a grid-based system where every step has a possible event.

Does such an option already exist, or do I have to kludge it?
B
2
S
1
G
3
Posts: 43
Reputation: 1,086

Post » Sat Mar 13, 2010 12:11 am

'Tis indeed possible, although it's semi-kludging. You should first set the movement to Manual instead of Player controlled. Then, make an event like

[code:1atjayrp]Upon key UP ARROW pressed: move "Sprite" -2 vertically[/code:1atjayrp]

...And just do that for all the directions. When you hold the button down, you will still only move 1 space. :D Remember to make it "upon key pressed" and not "key is down," otherwise you'll have the same problem you do now.
B
4
S
1
G
2
Posts: 54
Reputation: 958

Post » Sat Mar 13, 2010 4:53 pm

Finally got around to trying this, and it's not going to work... The movements are instant and not actual movement, and not constrained by solid objects anymore.
B
2
S
1
G
3
Posts: 43
Reputation: 1,086

Post » Sat Mar 13, 2010 4:57 pm

Oops, that's something I obviously overlooked. My bad; I'm pretty new to Construct so it was jumping the gun a bit to try and help someone. Sorry lol, I'll see if I can find another way around it. :D
B
4
S
1
G
2
Posts: 54
Reputation: 958

Post » Sat Mar 13, 2010 5:02 pm

No, I appreciate the input, and it's basically what I was looking for... I'll keep working on a solution.
B
2
S
1
G
3
Posts: 43
Reputation: 1,086

Post » Sat Mar 13, 2010 6:07 pm

Some time ago, I created a grid movement alternative, involving events and functions instead of behavior, and of course movement not teleport.

Have a look at viewtopic.php?f=3&t=4756&p=37912#p37912

Maybe it helps.
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sat Mar 13, 2010 6:22 pm

[quote="GoldMatenes":1tvmfybk]Finally got around to trying this, and it's not going to work... The movements are instant and not actual movement, and not constrained by solid objects anymore.[/quote:1tvmfybk]

Just check for Solid with an Overlap at Offset before you issue the move action.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Mar 13, 2010 7:34 pm

[quote="deadeye":9mv7jhqa]
Just check for Solid with an Overlap at Offset before you issue the move action.[/quote:9mv7jhqa]

Could you clarify on that? Every time I tried to check for overlapping Solid my cursor would just skip the solid objects or get stuck in them.
B
2
S
1
G
3
Posts: 43
Reputation: 1,086

Post » Sat Mar 13, 2010 8:23 pm

I too tried experimenting with what deadeye said, but I too have no idea what "overlapping at offset" means. Now I'm curious, 'cuz that could come in handy in the future.
B
4
S
1
G
2
Posts: 54
Reputation: 958

Post » Sun Mar 14, 2010 12:44 am

[quote="joeyapplepi":82q7kkrk]I too tried experimenting with what deadeye said, but I too have no idea what "overlapping at offset" means. Now I'm curious, 'cuz that could come in handy in the future.[/quote:82q7kkrk]
It's a view to the future... no really, instead of checking for a current collision, you ask if there would be a collision, if you would move the object to that offset. You get the answer before really doing it, so you can decide to move the object or not.
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests