playMaker

Author Topic: can I pull variables from SFM templates  (Read 1373 times)

Fictive

  • Playmaker Newbie
  • *
  • Posts: 12
can I pull variables from SFM templates
« on: August 24, 2021, 12:39:33 PM »
I need to pull a tag from a game object that I may or may not collide with I tried to use the "get collision2d info" action but it appears to only run on the first frame. so am I able to create an fsm template that runs every frame and then pull the gathered info from that template and apply it to the current fsm?

admittedly this method feels very contrived and I'm open to suggestions if someone wants to push me in a different direction.

NOTE: due to my current circumstances I am writing code through teamveiw. which means I can write code but not really test it.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: can I pull variables from SFM templates
« Reply #1 on: August 24, 2021, 04:22:35 PM »
Hi.
If you use Run Fsm. on the template you can use a Set Fsm Game Object and set the values u need to any fsm/gamobject where you need it.

im not sure what you are doing, but you can use 'Collider Event' and store the object that hit.

Fictive

  • Playmaker Newbie
  • *
  • Posts: 12
Re: can I pull variables from SFM templates
« Reply #2 on: August 25, 2021, 08:34:19 PM »
OK, a collision event works great for what I'm doing, except for one thing. the object I'm trying to check needs to be a trigger but "collision2d event" only seems to do anything if "is trigger" is disabled. is there any way around this?

Thank You for your assistance.

as for what I'm doing. I'm trying to make a system so that when the player enters an area and a button is pressed an action is performed.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: can I pull variables from SFM templates
« Reply #3 on: August 26, 2021, 12:23:17 PM »
Hi.
Use Trigger Event action for triggers :)