playMaker

Author Topic: Easy Local variable creation  (Read 4089 times)

redikann

  • Full Member
  • ***
  • Posts: 174
Easy Local variable creation
« on: January 27, 2014, 09:40:31 PM »
I would like to see variable creation act like custom events. Therefore if I create a gameobject variable called "player" everytime I want to use a local gameobject var, maybe inside of the action I want the var  it would show me a list of vars of type I have already declared before and if I want to use one again it will auto create it for me in that state.

Marsh

  • Full Member
  • ***
  • Posts: 227
  • Comfort the disturbed, disturb the comfortable
Re: Easy Local variable creation
« Reply #1 on: January 27, 2014, 10:24:47 PM »
Im confused isnt this how they work already?

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Easy Local variable creation
« Reply #2 on: January 28, 2014, 12:10:43 AM »
I think he wants a list of existing variables in the scene from all FSM's that he can then add to the existing one if it doesn't exist. This could be handy BUT that sure would be a lot of variables :S

Maybe a new list of "shared variables" could be used so all FSM's could use them but they would stay local to the FSM !?!??!
« Last Edit: January 28, 2014, 12:12:29 AM by LampRabbit »

redikann

  • Full Member
  • ***
  • Posts: 174
Re: Easy Local variable creation
« Reply #3 on: January 28, 2014, 12:35:57 AM »
Well I will make a gameobject var to my player in one FSM. If I create another FSM and need to reference the player again it would be slick to auto create based on the fact that I created that var once before, kinda like how events are reused.
The filter would work to only show vars of that flavor needed that you already created.
« Last Edit: January 28, 2014, 12:38:34 AM by redikann »

redikann

  • Full Member
  • ***
  • Posts: 174
Re: Easy Local variable creation
« Reply #4 on: January 28, 2014, 12:42:51 AM »
Im confused isnt this how they work already?

Well yes and no.. you declare the variable and it becomes ready to use in your FSM from dropdowns inside actions. But what if you didn't need to keep declaring variables because playmaker recognized them from other FSM's. They would still be unique local variables.

Marsh

  • Full Member
  • ***
  • Posts: 227
  • Comfort the disturbed, disturb the comfortable
Re: Easy Local variable creation
« Reply #5 on: February 02, 2014, 07:16:24 AM »
Ah I see what you mean, yea it is a bit annoying to have to create all the variables each time.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Easy Local variable creation
« Reply #6 on: February 05, 2014, 12:36:54 PM »
Agreed, I'd like to streamline some of the more repetitive tasks in Playmaker!