playMaker

Author Topic: wiseguy thread (random tips and tricks whenever you stumple upon them :D)  (Read 7365 times)

kiriri

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
Re: wiseguy thread (random tips and tricks whenever you stumple upon them :D)
« Reply #15 on: November 24, 2012, 05:11:00 AM »
ok 2 things today.
The first is by Alex Chouls. I hope I'm not overstepping it here if I take the liberty of quoting your content here, Alex.
Quote
You can quickly deselect a variable by pressing Esc. It's very useful if you're having a lot of different Variables in one FSM and can't find an empty space to click to deselect the variable.
Source: http://hutonggames.com/playmakerforum/index.php?topic=2283.0

Now, as for the second thing, it's again a bit complicated, but could actually be one of the great strengths of PlayMaker, if used right.

Quote
If you directly change a prefab, those changes will remain even if you stop playing the game. So if you need to change a certain parameter on a lot of gameObjects at once, you could create a (nested) prefab and add every gameObject that needs changing as a child of that prefab. Then you could create an FSM and go through all of the childs of that prefab and do certain actions. Like you may have a naming convention and you could string compare and then have a lot of different changes tailored to that type of GameObject. Then you can stop running the game and all the changes remain. You can then drag the different prefabs back onto their real prefab (if they have one) and voilá, you've then changed an indefinite amount of different objects permanently and all at once.

And yes... I do need to redo the last few tips, they are too hard even on my head, even though I wrote them myself :D
Best,
Sven

kiriri

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
Re: wiseguy thread (random tips and tricks whenever you stumple upon them :D)
« Reply #16 on: December 24, 2012, 07:56:07 AM »
Just found out something amazing, though I'm not sure if it's intentional.
Quote
Playmaker offers default global events of the type "system event". These include mouse down, mouse up, etc, which work just like the mouse event action.
Now, that was probably nothign new to you. The real thing that is just so awesome is that the system events and the action are actually complementary and not redundant. The thing is, if you work with multiple cameras at once (split screen), the mouse event action will always use your active camera to check whether your mouse is over an object. That is nice and stuff, but what if we have the left part of the screen displayed by another camera? The actions will still use the main camera and say you are over something which you can't even see!
And here's where the system events kick in. They don't care what your main camera is. If something is visible on the screen and if it contains a collider, it will be triggered if the mouse is over/on/off. If you use them you will get the actual gameObject you see on your secondary camera and not something from the main camera which you can't even see.

Awesome, isn't it? That just made my day :D

Btw, I've started creating vids for the prev tips, but I'm still new to this and my recording software always dies after like 5 minutes of recording. So it may take me some time still.
Best,
Sven