playMaker

Author Topic: Set Property missing some expected variables  (Read 650 times)

clantogw

  • Playmaker Newbie
  • *
  • Posts: 1
Set Property missing some expected variables
« on: June 08, 2021, 03:26:54 PM »
Hi all
I've been working on this problem for a few days. The developer doesn't understand PlayMaker so I have reached a deadend.

I am making a game using Jurassic PACK from the unity asset store. https://assetstore.unity.com/packages/3d/characters/animals/reptiles/jurassic-pack-vol-i-dinosaurs-35660

When I use the asset's built-in manager, It will instantiate dinosaurs from a list, and they will have AI and fight each other automatically.
I want to use PlayMaker to trigger the instantiation instead.

I already have my own way of instantiating the dinosaurs with Playmaker that works.
The problem is the dinosaurs can't see each other unless they are added (as GameObjects) to a list in the inspector on the ManagerScript. (This happens automatically when using the asset's built-in GUI, which I have disabled so I can use PlayMaker)

If I pause the game, drag the instantiated dinosaurs into the Creatures List on the ManagerScript, then press Play again, they see each other and it works! This is what I am trying to accomplish, automatically.

So, what I need to do is have Playmaker add the dinosaurs to that list in the inspector after they are instantiated by "Create Object"

Typically I would do this by dragging in the ManagerScript into the State, and using Set Property, and selecting the relevant property (Creatures List) and setting the value as my stored Game Object variable.
The developer says I can do this by using the following line in a script:
"manager.creaturesList.Add( creature .gameObject); //add creature to creature list"

So I am looking for the "creaturesList.Add" property in PlayMaker, but only creaturesList.Item is available and doesnt work. Here is what I see:


I am trying to get the GameObjects in here:


Is there another method I can use PlayMaker to accomplish this?

I realize this is a confusing problem and I appreciate anyone's help greatly.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Set Property missing some expected variables
« Reply #1 on: June 08, 2021, 04:19:03 PM »
Hi.
you will probably need some custom actions.

the Playmaker API might be helpful.

Also this video might help (for you or the author)