How do I program a custom movementhe for a NPC?

Get help using Construct 2

Post » Mon Sep 05, 2016 10:21 pm

I would like to program a NPC's character movement, but not randomly. I mean, for example: On start of layout, sprite A (the NPC) move to (X,Y). There's something I can do for that?
B
4
Posts: 16
Reputation: 232

Post » Mon Sep 05, 2016 11:03 pm

Use Rexrainbow's MoveTo behavior.

behavior-moveto_t63156

Here's an example capx. You need to install the behavior first, in order to open this document.

https://www.dropbox.com/s/4jdj6gj6yeekn ... .capx?dl=0
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Tue Sep 06, 2016 9:35 am

Thank you so much!
B
4
Posts: 16
Reputation: 232

Post » Tue Sep 06, 2016 9:56 am

You can also check out this tutorial (links in the description of the game).
Does not require a third-part behavior.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
294
S
117
G
96
Posts: 7,313
Reputation: 71,094

Post » Tue Sep 06, 2016 1:15 pm

You're welcome, J8U5. :mrgreen:

Kyatric wrote:You can also check out this tutorial (links in the description of the game).
Does not require a third-part behavior.


Great tutorial, Kyatric. :mrgreen:
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Tue Sep 06, 2016 9:48 pm

But, how can i install the behavior?
NOTE: Its is in a 7z file.
B
4
Posts: 16
Reputation: 232

Post » Tue Sep 06, 2016 10:02 pm

You need an application to unzip .7z file. My favorite one is 7zip that can be downloaded from 7zip.org.

After that, please follow the instruction found on this page.

how-to-install-plugins-and-behaviors_t63985
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Tue Sep 06, 2016 10:17 pm

Thanks
B
4
Posts: 16
Reputation: 232

Post » Tue Sep 06, 2016 10:27 pm

You're welcome, J8U5. :mrgreen:

Basically, it's..

1. Close Construct 2.
2. Unzip .7z.
3. Copy the unzipped folder (rex_moveto) to Program Files\Construct 2\exporters\html5\behaviors.

For example, I have installed my C2 to C drive, so my behaviors folder is located at C:\Program Files\Construct 2\exporters\html5\behaviors.
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Thu Sep 08, 2016 10:22 pm

Im most interested in Kyatrics method, cause of posible copyright´s in third party behabiors.But thank you anyway Gmoney!. But i have a question for you. Im using the method of putting a X/Y vector and after, to simulate a control. But, when i put it and i start the layout, The NPC Doesnt move. Even if i put the value of 1000000000000000. It only moves 100 pixels! Could you please check whats going bad?
I will let you an example over here THANKS!

here it is:https://drive.google.com/file/d/0B1qSrA_DxBhrX1J4NTJGQWVDRU0/view?usp=sharing
Last edited by J8U5 on Thu Sep 08, 2016 10:33 pm, edited 1 time in total.
B
4
Posts: 16
Reputation: 232

Next

Return to How do I....?

Who is online

Users browsing this forum: Bing [Bot] and 7 guests