playMaker

Author Topic: Is it possible to get distance from a created prefab? [SOLVED]  (Read 855 times)

Karin

  • Playmaker Newbie
  • *
  • Posts: 18
Hello everyone

I would like to know if it's possible to create an object from the player and get the distance of the created object on every frame.

I experimented with "Get Distance" after creating the object, but every time I start the game the distance picks up on the something that's not there at 0,0,0 coordinates which is the default value.
« Last Edit: August 06, 2020, 08:18:58 PM by Karin »

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: Is it possible to get distance from a created prefab?
« Reply #1 on: August 06, 2020, 06:54:21 PM »
While you create that object from player, store that created object in a variable. Then, Once created that object, move to next state and get distance between Owner (player) and created object.
« Last Edit: August 06, 2020, 06:56:28 PM by heavygunner »

Karin

  • Playmaker Newbie
  • *
  • Posts: 18
Re: Is it possible to get distance from a created prefab?
« Reply #2 on: August 06, 2020, 08:17:47 PM »
While you create that object from player, store that created object in a variable. Then, Once created that object, move to next state and get distance between Owner (player) and created object.

Wow! I was under the impression it was strictly string based for stored results. Most of the stored results mostly work with bool or String most of the time.

Much appreciated, thanks this was the method I was looking for.  :D