playMaker

Author Topic: Changing Adventure Creator variables in PM  (Read 3373 times)

Twood

  • Junior Playmaker
  • **
  • Posts: 76
Changing Adventure Creator variables in PM
« on: March 09, 2014, 03:35:51 PM »
Hi,

I'd like to be able to change some game variables of the Adventure Creator asset in PM, so I could use them together.

I'm having some trouble figuring if this is doable. The thing is the variables are in a run time list.

So to change them in code you'd do something like

Code: [Select]
    // get reference to RuntimeVariables. don't do this in an Update loop
    RuntimeVariables runtimeVariables = GameObject.FindWithTag(Tags.persistentEngine).GetComponent<RuntimeVariables>();
    // set the 3rd variable in my variables list, which is an integer, to 12
    runtimeVariables.SetValue(2, 12, AC.SetVarMethod.SetValue);


Is there a process to recreate that in Playmaker? Can't get it to happen with what I've tried.

Thanks

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Changing Adventure Creator variables in PM
« Reply #1 on: March 10, 2014, 08:02:47 AM »
You would need a custom action, but you could probably also do it with Set Property, have you checked it out before?

Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Twood

  • Junior Playmaker
  • **
  • Posts: 76
Re: Changing Adventure Creator variables in PM
« Reply #2 on: March 10, 2014, 11:08:39 AM »
The thing is I don't see properties I want, just generic stuff like enabled, name, useGUIlayout...

Also because it's a run-time type thing I can't even get that far without dragging the component I want from play mode. And that means from what I can tell I can't even save stuff to the FSM if I'm adding it in play mode?

I guess it just isn't going to work at this point.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Changing Adventure Creator variables in PM
« Reply #3 on: March 10, 2014, 12:21:40 PM »
You can get the component at runtime easily, but if the variables are not in the list it is either a partial script or the variables are not exposed as public. You should probably get in touch with the Author and see what he can do, does he have a forum or support thread?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Twood

  • Junior Playmaker
  • **
  • Posts: 76
Re: Changing Adventure Creator variables in PM
« Reply #4 on: March 11, 2014, 06:31:52 PM »
I asked but I don't think Chris is well versed enough at Playmaker to get this figured out. And I have no clue so I guess I'll just scrap the idea of them sharing variables for anything.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Changing Adventure Creator variables in PM
« Reply #5 on: March 11, 2014, 06:35:18 PM »
Added to Trello for custom actions, you can upvote it there.

https://trello.com/c/qPJvdxuD/64-adventure-creator
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Twood

  • Junior Playmaker
  • **
  • Posts: 76
Re: Changing Adventure Creator variables in PM
« Reply #6 on: March 11, 2014, 06:47:41 PM »
Well that might save my bacon, thanks!