playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - FunD

Pages: [1] 2
1
Playmaker Help / Change of scene on inactive mouse
« on: May 31, 2019, 07:13:12 AM »
Hello,

I was wondering if and how I could set this up with Playmaker. I would like that after a given time of the mouse being inactive, it loads the title screen scene.

Any advice on how to achieve this?
Thanks

2
Oh ok, I just added a global variable to the soundtrack, like mentioned above. I just had problems accessing the global variable, but I got it now. thanks for all the help!

3
Quick update:

I found a really easy way for the music to play across scenes. You just create a GameObject and add 'Don't Destroy On Load' action, by dragging this gameobject. The child of this GameObject is the soundtrack.
However, I don't know how to make the music stop.

What's the opposite of 'don't destroy on Load' if there is one I can add to the last scene?
thanks

4
Hi,

Sorry for the delayed response. I hooked it up as you described, hopefully did it correctly. The problem is I can't call a game object in the second scene via the 'audio play' if it's not  a game object in the current scene, although I set it to global.
Here are some screenshots:
https://ibb.co/vLygFvp
https://ibb.co/kSGwVSr





Hi.
should music play between scenes?

if so i think you will need to load async additive.

on the scene that the sound needs to stop, when loaded, reference the object with the audio listener and use 'audio stop'


Similar like this, but instead, why don’t you make:

1. A scene let’s name it AudioPlayer.scene
2. Insert only audiosource , remove the camera
3. On the audiosource insert playmaker state with set game object > This object to Global Variable “MUSIC PLAYER” and save it

4. Now on scene 1, load async AudioPlayer.scene
5. This will set global variable “MUSIC PLAYER” = audiosource that contain your clip
6. Audio Play MUSIC PLAYER. This will persist as long as you don’t remove the scene
7. On the final scene, simply stop the “MUSIC PLAYER” or unload the scene

Basically you make a dedicated scene that serves as your jukebox.

Good luck

PS: this is probably not the best method, but it should works.

5
Hi,

Okay, so I'd better be using 'Is Done', using a Variable, rather than the 'Done Event'?

According to Playmaker documentation I read online, 'Done Event' is an event that should be sent once scene loading is done:
https://hutonggames.fogbugz.com/default.asp?W1443

So I'm not sure why playing the sound at the beginning of the next scene doesn't work, calling a global event with the 'Done Event'. It does load the next scene though now, by checking 'Allow Scene Activation'.

I tried having state 3 in the same FSM, but I thought maybe the problem was that the event playing the music should be in the next scene so I tried that too.

I can't get it to play the sound. So I tried also with 'Is Done' using a variable.
Then I'm not sure how State 3 that has 'Play Music' calls that variable. The created Variable can't be added in the 'Play Music' action. I tried adding separate actions to that state like 'Get Variable'... still does not work

Do you know what I'm doing wrong? Thanks :)







6
Hi,
Thanks for the tip. This seems like a nice way to do it.

And yes, it should play between scenes, but stop at the final scene.

So this is what I tried (there are screenshots below too):
- I tried to make the background music start when loading Scene 1 (which comes after the beginning scene)
- On the beginning scene there is a UI 'Play' button with an FSM
- After clicking the 'Play' button it sends an event 'Load Scene'
- Which leads to State 2, I had a simple 'Load Scene' there (which worked fine), but replaced it with a 'Load Scene Asynch' now
- I set the Load Scene Mode to Additive
- I am trying for it to send a global event which leads to State 3
- On State 3, there is 'Play Sound'

When pressing the 'Play button' it's not loading the next scene. I wonder what I'm missing? (and it's the correct scene name I entered in 'Load Scene Asynch')

Screenshots:
https://ibb.co/Z84sjwn
https://ibb.co/tZjHDMd
https://ibb.co/mXg4Gwd

Thank you

7
Hi
The subject line is pretty self-explanatory.
I need a background music to play in a few scenes, but not all of them. It needs to stop after a few scenes.
Any advice?

thanks

8
Playmaker Help / Re: Question regarding length of Mouse Over
« on: March 28, 2019, 08:08:27 PM »
Hi,

Thanks for your answer.

Mouse detection might not make much sense for me then, because most objects in my game have colliders..

I never heard of LOD until you mentioned it, so I read some Unity documentation about it today and see how to use that

Hi,

 mouse detection is based on collider, simply remove the colliders of object you don't want to interact with the mouse, if that's possible that would be the best option.

 you can setup a LOD component, that the far version just doesn't have a collider and that's it.

 Bye,

 Jean

9
Playmaker Help / Re: Question regarding length of Mouse Over
« on: March 26, 2019, 01:28:53 PM »
Hi.
'Mouse Pick Event' Should work.

but if you have many objects i would use a different approach.
Many listeners (mouse over/ mouse pick events) would not be so good for performance.

a better way would be :

a fsm doing mouse pick every frame and store game object.

Then another fsm and use 'Fsm Game Object Changed' (Ecosystem)

When changed, check gameobject in an array and get the index.

Then have a 2nd array with the "Press 'E' to get more info" objects.
And with the index you got from the 1st array you can now get the object that you should activate.

Another way, IF the "Press 'E' to get more info", is the same on each object, you could also get the game object position.
and move the "Press 'E' to get more info" to the game object.
Then you can also check if no gameobject by using "Game Object Is Null" and if null disable the "Press 'E' to get more info"

To get the 'Educational Text' you could also use the index and have an array with them.
Have another fsm with a state with get key down and have a global transition to it (enabled)
also have a another state state and have nothing in it, also add a global transition (disabled)

on state after get key down use get fsm int, to get the index....


Scratch the above, just get the attachment below, you can find a sample scene in it and some custom actions from the ecosystem that where needed for the sample.

its easier to understand if you see.

if you have difficulties to understand, let me know and i will make a video on it :)


Hi,

Thank you very much for the help.
I am also sending you a sample scene :) Maybe it makes things easier

..So I imported your Scene with the 'Mouse Pick Handler'. I have a 'Mouse Pick Handler' object now in my Scene.

What I'm confused about, is how does the 'Mouse Pick Handler' link to specific objects in the scene that are supposed to release the 'Press E to get more information' and display of Educational Text.
I tried to figure it out in your sample scene. How is it linked to the 3 cubes exactly?

When I originally did it with 'Mouse Over', (it's in my attached sample scene as well) the FSM was on a collider, so I could place that collider wherever in the scene, where it's supposed to release an educational text when standing close to it.

With the 'Mouse Pick Handler' I have in my scene now, it just detects all objects that have a collider in the scene I think. So not specific spots.
It also does not display the UI Educational Text for some reason.

I need basically three different mouse over actions:
- One that releases Educational Texts
- One for picking up objects
- One for starting a dialogue system with NPC's.

I created three different UI Text objects for that. It's in my sample scene.

I also left the 'Picking up Object on Mouseover and clicking 'E' object, and the 'Object releasing Educational Text on Mouse over' object. Those work, they just have that distance issue I mentioned earlier.
The new Mouse Pick Handler is also in there.

Would I need three different Mouse Pick Handlers in my scene? One for dialogues, one for picking up objects and one for educational texts?

A video would definitely help a lot, or explaining why this scene I am sending you doesn't work. Thank you so much for your time and thanks for your patience on my newbie questions

Sample Scene, download-link:
https://we.tl/t-rR31Rnr4Kd

10
Playmaker Help / Re: Question regarding length of Mouse Over
« on: March 26, 2019, 05:30:34 AM »
Hey there

So what exactly are you trying to do with your project?  I'm assuming you only want to pick up objects that are close to the character/camera? 

What you need to do if thats the case is just do a simple distance check to whatever you're using.  When an object gets mouse over event, have it do a quick compare using the distance from the object itself to the object you are limiting. 

Let me know if that helps otherwise let me know a bit more about the project itself so I can help better.

Thanks


Hello,
I am attaching Screenshots to this message of what I have now. Basically, when the player hovers over a certain object with the mouse, a UI Text appears (Text: 'Press E to get more info'), and then on key down (E), a new UI Text appears on the Screen. And when the player points the mouse cursor away from the object, the UI Text disappears again. I have the same mechanics for picking up objects and starting dialogues etc.

But the problem is that the player can be standing really far away from the object and still the UI Text 'Press E to get more info' appears when placing the cursor on the object.

How do I apply a distance check on what I currently have? I tried 'Get Distance' and 'Raycast' but have not been able to make it work yet.

Screenshots:
https://ibb.co/JmMtbDk
https://ibb.co/xgCrH0x
https://ibb.co/pWN06vh

11
Playmaker Help / Question regarding length of Mouse Over
« on: March 25, 2019, 04:55:58 PM »
Hi,

I'm using 'Mouse Over' States quite a lot in my Adventure Game. To start dialogues with NPC's after hovering the mouse over them, picking up objects, displaying UI Texts.. etc. (see screenshot below)

It's all working fine. Except one problem, that I can't figure out. Basically, the length of the mouse over..
So if I point at an object all the way across the room, although I'm super far, it executes the 'Mouse Over' actions.

Do you know how to change that? That would be really helpful, I'm pretty stuck on this one.

Thanks
Screenshot:
https://ibb.co/5ktmQgd

12
Yes, I have it in the scene and 'Control Mouse Cursor' is checked

It could have been a bug. I made a build again today and suddenly the cursor error is gone.. On Friday I made several builds and the error kept happening. Not sure why.

13
Playmaker Help / Cursor is invisible in playtest mode but not in build
« on: March 22, 2019, 06:09:11 AM »
Hi,
I have a question.
I locked the cursor and made it invisible with playmaker. It works fine when playtesting. But as soon as I make a build, the cursor appears on the screen on and off (it flickers, but then just stays sometimes), however stays locked in the center of the screen. What's even weirder, is that the builds I made so far did not have that issue. I did not change Unity version since.

Why is that?
Screenshot:
https://ibb.co/4dXbvLf

Thanks :)


14
Playmaker Help / Re: Help with Playmaker Actions: Newbie
« on: February 26, 2019, 08:47:17 AM »
Many thanks.

Hi.
On the 1st screenshot : https://ibb.co/TH1FzbF

State 4 and 5 (covo 1, convo 2) should have a finished event and transition them to state 1 (On Trigger)

i made a sample scene to see how it works. (Attachment below)
Just with some set text and a wait,
It also has send event to show you how you can disable movement.
The drag is just optional, you could also use set velocity and set it to 0,0,0 on the disable state to let it stop directly.

15
Playmaker Help / Re: Help with Playmaker Actions: Newbie
« on: February 25, 2019, 11:19:20 AM »
Hello,

Thanks for your message. I tried both options, it still hasn't worked, unfortunately.

What I noticed so far with all options I tried, is that there is no second conversation playing 'on trigger enter', using this asset as an action in playmaker (unless I'm doing it wrong).

So you are right, the problem is probably, that another action is needed to start a new conversation. (Quote: I don't know If the "start conversation" Finish when conversations is ended or immediately as i do not have the asset. (you might need another action for it)

I've looked in the actions provided by the Pixel Crusher Dialogue System, and the one thing I could find, that I thought would apply here, is the "Stop Conversation" action. (Screenshots below)

However, it still won't play a second convo.

One more question I have as well is, which Playmaker action can I use to freeze the player's position?

Thank you.
Screenshots:
https://ibb.co/TH1FzbF
https://ibb.co/RP7BGb9
https://ibb.co/RDkp0JW

Hi.
Yes you can not use The same Transition name more than once on a state.

The 'TRIGGER ENTER' is a pre made event, whick works similar to the 'Trigger Event' action.

You might want to use that instead to understand better the usage of this.

If only 2 conversations you could set up like this :

State 1 :
Have TRIGGER ENTER Transition or use the trigger event action and make an event name (call it 'Start Dialogue' for example) and use that to go to the next state.

State 2 :
Do the dialogue in there.
You could also send an event to the fsm which handles the movement. in there have a state "Disabled' and have a global transition event (call it "Disable Move" for example) connected to that state.
Then also have global transition event to the state where you handle the movement. (call it "Enable Move" for example)

I don't know If the "start conversation" Finish when conversations is ended or immediately as i do not have the asset. (you might need another action for it)

State 3 :
Send event (Enable Move) to you movement fsm.

Then have another trigger event action or TRIGGER ENTER transition.

state 4 :
Do 2nd dialogue.


if you would have several dialogues then you could do this :

State 1 :
Have a trigger event.

State 2 :
Have a "int Add" and add 1 to a variable (name it "Current Conversation" for example")

State 3 have a "int Switch" and place the variable in it.
Then in 'Int Switches' set the amount of conversations you have (4 for example)

Then make 4 states (one for each conversation) and make 4 events (one for each conversation) and use them in the "int Switch"  action.
On compare int, set 1,2,3,4

From each conversation state loop back to the 1st state.

In the last Conversation you could add a "Set Int Value" and set the the value "Current Conversation" to 0
This would start the conversation sequence from the beginning again

Pages: [1] 2