playMaker

Author Topic: Vegetation System  (Read 8406 times)

Bainto

  • Playmaker Newbie
  • *
  • Posts: 36
Vegetation System
« on: June 24, 2018, 10:38:48 PM »
Im Also trying to figure out how to use playmaker in order to create a transition from 1 vegetation system layout to another based on a trigger or something along those lines. upon entering a building and reaching a point the vegetation changes so when they exit they see the new vegetation.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Vegetation System
« Reply #1 on: June 25, 2018, 07:24:03 AM »
Hi.

There are probably different ways to do so, but it depends a bit also what platforms you are targeting.

But i think Load Scenes Async 'additive'would be the best way to go.

But if you are still new with PlayMaker, i would suggest you to follow some tutorials and make some simple projects to get familiar with PlayMaker.
And then start your main project

You can find many tutorials on the user tutorials wiki page, on the tutorial page and on youtube

Here is a little tutorial about Load Scenes Async Additive :


Bainto

  • Playmaker Newbie
  • *
  • Posts: 36
Re: Vegetation System
« Reply #2 on: June 25, 2018, 08:30:10 AM »
I appreciate the help. Thank you :D

Bainto

  • Playmaker Newbie
  • *
  • Posts: 36
Re: Vegetation System
« Reply #3 on: June 25, 2018, 09:25:37 AM »
Ok so i watched the video but it didn't really answer my question on how to do this but ima do a few tests and try and figure it out. The video mostly covered different ways you may have errors but not on how to do this. a step by step video showing the setup would have been more helpful.

Also each package is an asset not a scene or a level. so maybe i need to know how to load and unload assets.
« Last Edit: June 25, 2018, 10:04:38 AM by Bainto »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Vegetation System
« Reply #4 on: June 25, 2018, 12:45:47 PM »
Hi.
On the video i am 1st showing these errors as it is very important to know this.
After that (around 6th minute) it is showing how to load/unload.

But you can have multiple scenes loaded and load/unload several parts.

Like in this tutorial (this is a c# tutorial, but if you understand the previous video then you can understand what is happening in this video)



So in your case you would load 'vegetation scene 2' and unload 'vegetation scene 1'  upon entering a building and reaching a point .

verybinary

  • Junior Playmaker
  • **
  • Posts: 81
    • The Museum of Digital
Re: Vegetation System
« Reply #5 on: June 26, 2018, 10:30:35 AM »
The building blocks you are essentially asking about are:
-make a global variable, lets call it "gameprogress", in a fsm that sets up everything, set this global to "0"(just in case it isn't 0 at startup)
-when you walk into the house, set up a trigger to check what progress is, if 0, maker it 1, if 1, make it two
-in the fsm that sets up your garden, have it look at gameprogress. if 0, load the dirt. if 1, load the sprouts. if 2, load full crops.

now walk in and out of the building, look at your crops. walk in and out again, they should be fully grown.

when it gets tested successfully, move it from global to a fsm int inside your garden fsm, and when you walk in the house(or whatever its set to), int add 1 to the fsm int. (but then again, that might not work, the garden may not be active when you are inside the house. you might need a gardenmanager object that stays active all the time? or just keep the global)

Bainto

  • Playmaker Newbie
  • *
  • Posts: 36
Re: Vegetation System
« Reply #6 on: June 26, 2018, 10:12:12 PM »
ty for the help :D ill take a look and see if i cant figure it out when i get home.

Bainto

  • Playmaker Newbie
  • *
  • Posts: 36
Re: Vegetation System
« Reply #7 on: June 29, 2018, 05:14:14 PM »
My problem so far is ending up with how to order everything is there a diagram someone can draw up or anything XD

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Vegetation System
« Reply #8 on: June 30, 2018, 12:30:30 PM »
Hi.
That is very depending on your game flow.

What do you have so far and what are you trying to achieve?

Bainto

  • Playmaker Newbie
  • *
  • Posts: 36
Re: Vegetation System
« Reply #9 on: July 01, 2018, 04:59:54 AM »
so far i tried using a trigger object (a cube set as trigger with mesh render off) set on a path as a test for when the player enters to do a Load Scenes Async Additive however that wont work as it wont work with the asset when i try to add it it comes up with a grayed out box with 2 choices that i cant click, so i added a path to the asset and that comes with no errors but wont work either.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Vegetation System
« Reply #10 on: July 01, 2018, 07:12:23 AM »
Hi.

What asset?

Bainto

  • Playmaker Newbie
  • *
  • Posts: 36
Re: Vegetation System
« Reply #11 on: July 01, 2018, 07:33:39 PM »
Vegitation System on the unity asset store

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Vegetation System
« Reply #12 on: July 01, 2018, 08:11:49 PM »
Hi,
Can you share a link to that asset.

you will need to do things differently as you are using an asset

Bainto

  • Playmaker Newbie
  • *
  • Posts: 36

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Vegetation System
« Reply #14 on: July 02, 2018, 06:02:25 AM »
Hi.
As i don't own the asset, i can't really see how they change the vegetation.

Best is to contact the Author and ask if he could support with playmaker actions.

You can also let him contact me if the author needs some help with that.