playMaker

Author Topic: Movement for NPC? (something like Controller Simple Move) [SOLVED]  (Read 7809 times)

amaranth

  • Full Member
  • ***
  • Posts: 172
Working on a 2D platformer...

Controller Simple Move gave my character gravity and the ability to move by using arrow keys. I have NPC monsters that need gravity and to move randomly. Should I use Controller Simple Move to do this? If yes, does anyone know how to add random movement? If no, what should I use?

Thanks!
« Last Edit: March 30, 2012, 06:07:10 PM by Alex Chouls »

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Re: Movement for NPC? (something like Controller Simple Move)
« Reply #1 on: March 28, 2012, 04:34:08 PM »
Yup, throw a character controller and a character motor on them, but simply turn off the "can control" check box, then you can move them around with controller simple move and the player won't be able to move them.

amaranth

  • Full Member
  • ***
  • Posts: 172
Re: Movement for NPC? (something like Controller Simple Move)
« Reply #2 on: March 28, 2012, 04:56:08 PM »
I don't see a Character Motor action. Does it have another name? Thank you for your help! (I'm new to Unity and playMaker)
« Last Edit: March 28, 2012, 05:29:11 PM by amaranth »

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Re: Movement for NPC? (something like Controller Simple Move)
« Reply #3 on: March 28, 2012, 05:29:05 PM »
Sorry, those are standard unity components. not playmaker actions

Check in your component menu and add the character controller to your player game object (i think character motor gets automatically added when you do if i remember correctly)

They can be found as part of the standard assets if you don't have them imported already (can't find them in the list)

right click your asset window and choose import standard asset -> character controllers

amaranth

  • Full Member
  • ***
  • Posts: 172
Re: Movement for NPC? (something like Controller Simple Move)
« Reply #4 on: March 28, 2012, 05:34:17 PM »
Now it makes sense. Thanks!

Just so you know... in my version of Unity (3.5), there isn't a character controller in the components menu. There is only the character motor. When I add this, the character controller is added to the game object.

When I add the controller simple move action to the game object, this adds character controller, but not character motor to the game object.
« Last Edit: March 28, 2012, 05:50:40 PM by amaranth »

amaranth

  • Full Member
  • ***
  • Posts: 172
Re: Movement for NPC? (something like Controller Simple Move)
« Reply #5 on: March 28, 2012, 07:19:44 PM »
Success! My slimes are moving! Mwahaha!

Saputo

  • Full Member
  • ***
  • Posts: 107
Re: Movement for NPC? (something like Controller Simple Move) [SOLVED]
« Reply #6 on: May 01, 2013, 11:36:39 PM »
How would u go about making them move randomly and not just one direction, like move left or right.

Saputo

  • Full Member
  • ***
  • Posts: 107
Re: Movement for NPC? (something like Controller Simple Move) [SOLVED]
« Reply #7 on: May 02, 2013, 07:26:10 PM »
Bump