How do I make my character smart?

Get help using Construct 2

Post » Mon Jun 09, 2014 9:49 am

Message: andrexsen is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
hello, i'm developing game that similar to chat noir game ()
i still can figured it out how to make the cat jump to the nearest circle to get out from the screen
i'm tried to use array but i find it's very hard for me, and if i'm going to use nested loop, i'm afraid there are many.

i hope you can understand and give me a flush to my brain that stucked :D
thanks
B
2
Posts: 6
Reputation: 164

Post » Mon Jun 09, 2014 2:29 pm

anyone can help me?
B
2
Posts: 6
Reputation: 164

Post » Mon Jun 09, 2014 3:35 pm

Think you need to supply a screenshot of some sort, cant see the link you have posted. And the text alone doesn't really explain or show the problem :)
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Mon Jun 09, 2014 4:06 pm

Code: Select all
http://www.gamedesign.jp/flash/chatnoir/chatnoir.html

that is the link.. i cant add url right now with my current reputation.. i hope it helps.. i cant explain my problem using words.
B
2
Posts: 6
Reputation: 164

Post » Tue Jun 10, 2014 5:02 pm

Bump.. I want to know this too.
Something like that game in the link:
http://www.gamedesign.jp/flash/chatnoir/chatnoir.html
B
20
S
4
Posts: 387
Reputation: 2,274

Post » Wed Jun 11, 2014 5:58 pm

You can do this with the pathfinder behavior : https://www.scirra.com/manual/154/pathfinding

Use something like los to pick the target and then use the pathfinder to work out the the path.
B
15
S
4
G
5
Posts: 42
Reputation: 3,617

Post » Thu Jun 12, 2014 2:36 am

Or you could pick circle nearest to cat, store its position and move the cat to its position. Jumping movement is another story.
B
6
S
2
Posts: 24
Reputation: 531

Post » Thu Jun 12, 2014 2:57 am

Radiowaves wrote:Or you could pick circle nearest to cat, store its position and move the cat to its position. Jumping movement is another story.

but actually the cat moves to the direction which is nearest to exit the layout
B
2
Posts: 6
Reputation: 164

Post » Thu Jun 12, 2014 3:23 am

You need the cat to jump to the circle thats nearest to exit layout?

You could set *if* coordinates check for circle (Compare two values, system behaviour). If its near to something, pick it. If there are many, then do another pick and pick nearest to the cat. No?
B
6
S
2
Posts: 24
Reputation: 531

Post » Fri Jun 13, 2014 9:07 pm

Radiowaves wrote:You need the cat to jump to the circle thats nearest to exit layout?

You could set *if* coordinates check for circle (Compare two values, system behaviour). If its near to something, pick it. If there are many, then do another pick and pick nearest to the cat. No?

Sorry, I really don't get it... I understand the logic but, in practice, I couldn't do this..
Can someone please make an example? this isn't that easy...
Thank you.
B
20
S
4
Posts: 387
Reputation: 2,274

Next

Return to How do I....?

Who is online

Users browsing this forum: Syazanie Amirin and 47 guests