playMaker

Author Topic: how to activa gameobject from send one scene to another scene?  (Read 2123 times)

ali064

  • Playmaker Newbie
  • *
  • Posts: 5
how to enter trigger(collider box car) activa gameobject for disable button send one scene(into car) to another scene(into button)? sorry im low english

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: how to activa gameobject from send one scene to another scene?
« Reply #1 on: May 18, 2020, 08:15:16 AM »
Hi,
There are a few ways to do this.

if you need to disable/enable the button regular, then you might want to place that object into a globals for easier access.

Then on trigger you can use Set Fsm Actions (for example Set Fsm Bool) or a 'Send Event (By Name)' and target the global.

if not many times you could also use 'find game object' at the start of the scene, to get a reference to that object

ali064

  • Playmaker Newbie
  • *
  • Posts: 5
Re: how to activa gameobject from send one scene to another scene?
« Reply #2 on: May 24, 2020, 02:47:29 PM »
Little difficult, you have there video in YouTube?, pls upload video or youtube? but if not I'm will try

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: how to activa gameobject from send one scene to another scene?
« Reply #3 on: May 25, 2020, 03:01:20 AM »
Hi
This video explain a bit about events :


now if you need to communicate to an object on a different scene.
you can set the button object with the fsm into a global variable and then reference that variable to send a event to.

Now its best not to use a lot of globals.
So if you need to to more than only that button to turn off/on.
it is best to make a fsm (or multiple fsms) on a (empty game) object that can receive the events (i commonly name that object/fsm 'Scene Manager') and then for example send a event to a different object to that scene.
or disables that button

ali064

  • Playmaker Newbie
  • *
  • Posts: 5
Re: how to activa gameobject from send one scene to another scene?
« Reply #4 on: May 25, 2020, 10:37:30 AM »
ok thanks i try but the scene doesn't work connecting with another scene, not for everyone, difficult, but it worked scene only by connecting the prefab assets but not the another scene

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: how to activa gameobject from send one scene to another scene?
« Reply #5 on: May 25, 2020, 03:33:43 PM »
Hi.
You can use 'Set Game Object' on the start of a scene and set the object on a global variable.

ali064

  • Playmaker Newbie
  • *
  • Posts: 5
Re: how to activa gameobject from send one scene to another scene?
« Reply #6 on: May 25, 2020, 05:47:58 PM »
omg it worked, thanks a lot, I try worked good.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: how to activa gameobject from send one scene to another scene?
« Reply #7 on: May 26, 2020, 02:25:33 AM »
Hi.

Try to minimize using globals tho.

what i usually do if i need to reference multiple object in a scene is make a empty object and call it for example 'Level Manager' then on the object i place 'gameobject' variables with the objects that i need to communicate with.

Then on the other scene i use 'Get Fsm Game Object' and get the needed object from the 'Level Manager' Global.
This way i only need 1 Global Variable and can have 100's (and even more) variables to reference.

ali064

  • Playmaker Newbie
  • *
  • Posts: 5
Re: how to activa gameobject from send one scene to another scene?
« Reply #8 on: May 27, 2020, 12:52:19 PM »
Hi again,
I'm try worked but then not work complete just like disappear, what rare and difficult :(
Please can you have in Teamviewer? for better    easy help ;D please

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: how to activa gameobject from send one scene to another scene?
« Reply #9 on: May 27, 2020, 05:13:59 PM »
Hi.
is the other scene still active?

Maybe you can show some images or a video of your project.