playMaker

Author Topic: Edit Prefab Question[SOLVED]  (Read 1518 times)

Dijon

  • Playmaker Newbie
  • *
  • Posts: 12
Edit Prefab Question[SOLVED]
« on: November 22, 2018, 10:35:26 AM »
Hi everyone. I'm brand new to PlayMaker (just bought it this morning) and after watching some tutorials, wanted to try some examples myself (so far, so good). I added an FSM (two actually) to a tank prefab that I have. When I want to edit an FSM, I have to select each time whether to edit the prefab, or this instance. I'm assuming that this is by design, but I'd like to confirm that it's not one of my settings.

Second question: I have an FSM on my tank and I want to add another to the turret and the gun. I started with the gun and I'm getting an error that "Owner needs a Collider", even though there is already a Box Collider on the barrel. Does anyone know why this is happening? Thanks.
« Last Edit: November 23, 2018, 12:58:36 AM by jeanfabre »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Edit Prefab Question
« Reply #1 on: November 22, 2018, 04:14:14 PM »
Hi,
Yes its by design, when you edit the prefab, and you also use the prefab (for example on a different scene) the changes will change directly.
if you change on the instance, it will only change the prefab when you "Apply" the changes.

On what actions you get this error?
Can you show some images?

Dijon

  • Playmaker Newbie
  • *
  • Posts: 12
Re: Edit Prefab Question
« Reply #2 on: November 22, 2018, 08:45:28 PM »
Thank you for your reply, it makes sense.

Regarding the error, I didn't realize that once I had fixed the problem (added a collider), I could clear the errors. Thanks again.

Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: Edit Prefab Question
« Reply #3 on: November 23, 2018, 09:57:34 PM »
Thank you for your reply, it makes sense.

Regarding the error, I didn't realize that once I had fixed the problem (added a collider), I could clear the errors. Thanks again.

If an action wants a collider or any other component, it might also be the wrong place for the FSM. Maybe the FSM should be attached to some other object. However, in some cases you want the FSM on one object but still use components that are on another object: in that case, you need to store the other object (with the component) in a variable (with get by tag, get by name, get parent, etc.) and then use this on the action as the game object.