playMaker

Author Topic: Tag Problem. Prefab objects reset player at wrong position.  (Read 2128 times)

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
    • View Profile
As reference this is what the scene looks like prior to making the wheel a prefab.



So, here;s my problem. I have a wheel that is a prefab(a cube with Is Trigger box checked) and I have a tagging system set up this way because it wont let me specify objects that aren't prefabs.

On one hand I use this action in order to reset the players position. On the other hand, not only it sets the players position at part of the level that is far from it, but the wheel prefab doesn't collide unless it uses the same tag as the player.



What makes matters worse is I get the same results whether I use a local vector3 variable or not. I'd like to not make the player a pre fab, so what can I do in order to solve this problem?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14237
  • Official Playmaker Support
    • View Profile
Re: Tag Problem. Prefab objects reset player at wrong position.
« Reply #1 on: May 12, 2015, 12:23:16 AM »
Hi,

 I don't understand what doesn't behave as you expected.

first: your "collider tag event" will never be called, your "collide tag" doesn't have any action that will trigger this transition event.

Second: what doesn't let you set a tag on a non prefab GameObject? Unity, PlayMaker, is it at runtime, or during editing?

 Bye,

 Jean

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
    • View Profile
Re: Tag Problem. Prefab objects reset player at wrong position.
« Reply #2 on: May 13, 2015, 01:10:16 PM »
first: your "collider tag event" will never be called, your "collide tag" doesn't have any action that will trigger this transition event.

What will though?


Second: what doesn't let you set a tag on a non prefab GameObject? Unity, PlayMaker, is it at runtime, or during editing?

The prefab wheel wont let me specify a non-prefab game object. And if I use tag related actions plus a trigger event, it spawns the player in a wrong place. Regardless if it's with Axis parameters(X,Y,Z'd fields) or local vector variables.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14237
  • Official Playmaker Support
    • View Profile
Re: Tag Problem. Prefab objects reset player at wrong position.
« Reply #3 on: May 21, 2015, 04:01:44 AM »
Hi,

 you'll need to implement the logic with at least an action that will send the event "Collide tag event" to trigger this transition.

Have you tried the action "TriggerEvent", you can filter by tag.

Bye,

 Jean

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
    • View Profile
Re: Tag Problem. Prefab objects reset player at wrong position.
« Reply #4 on: June 20, 2015, 02:37:46 PM »
Hi,

 you'll need to implement the logic with at least an action that will send the event "Collide tag event" to trigger this transition.

Have you tried the action "TriggerEvent", you can filter by tag.


What would that mean for the wheel? Because it already has a trigger event at the wheels start transition. Plus, wouldn't it be effective to use collision event to have it communicate with a respawn empty object manager?

I ask this because that respawn manager isn't a prefab and maybe it could be used to set up arraymaker data to randomly spawn the player to either respawn points?

Bare in mind, the last time I worked on this stage, I added two respawn points"empty game objects" and thought well if they could be used randomly after the prefab wheel collides/kills player, I could use a non-prefab manager to manage array data related actions.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14237
  • Official Playmaker Support
    • View Profile
Re: Tag Problem. Prefab objects reset player at wrong position.
« Reply #5 on: June 23, 2015, 05:45:33 AM »
Hi,

 using a manager is likely the key yes, it can then list all prefab instances, each prefab sending a global event "I AM HERE" and then this manager would store each gameobject sending that event.

 Bye,

 Jean

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
    • View Profile
Re: Tag Problem. Prefab objects reset player at wrong position.
« Reply #6 on: June 26, 2015, 02:33:40 PM »
What about randomly sending the player to a random respawn point? What would that mean in terms of what actions being used in the array department?

Like for the Array List Get Random action? Or in my case, having that action in the manager FSM after Get Event info like in the context of the checkpoint example scene for array maker samples.