Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

PlayMaker - Visual Scripting for Unity

Discussion in 'Assets and Asset Store' started by Alex-Chouls, Dec 31, 2010.

  1. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    What is this photon that playmaker will support soon?
     
  2. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
  3. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521


    thanks, I have a question were do I put this script? and what name do I need to give it, if I put it on a game object I get this warning."
    Can't add script behaviour fsmNumLives. The scripts file name does not match the name of the class defined in the script! "

    I'm really more at home in playmaker not so much in scripting :)

    The reason I want to have the global variables in a script is that I once lost the variables from an fsm and just want to make sure they are stored somewhere in simple text so I can edit them or read from a server etc.
     
  4. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Ok I just have to read better the name of the script should be AccessGlobals
     
  5. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Now's your chance to grab Playmaker at 50% off its regular price!!

    It's also a great opportunity to grab extra licenses for your team.

    If you can't access the Unity Asset Store you can now buy direct from Hutong Games:
    http://www.hutonggames.com/store.html

    Make sure to use the GDC2012 Coupon to get the discount!

    This special ends March 17th!
     
  6. jeffweber

    jeffweber

    Joined:
    Dec 17, 2009
    Posts:
    616
    I like to keep my plug-ins in there own folder within Unity. This makes it easier to clear and re-import them when new versions come out.

    When import Playmaker and then move it to my "PlugIns" folder, I get the following:

    "Missing watermark texture: Assets/PlayMaker/Editor/Watermarks/playMakerLogo.png"

    Any chance this file can be made relative so I don't have to have PlayMaker at the root level of my project?

    Thanks.
     
  7. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    I'll look into this for the next update.
     
  8. linusnorden

    linusnorden

    Joined:
    Sep 27, 2010
    Posts:
    123
    Hi Alex

    Do you have any plans on putting up a tutorial on how to use the new networking actions? Would it be possible to use these new actions to get data stored in a mysql database?

    Thanks and great job!
     
  9. linusnorden

    linusnorden

    Joined:
    Sep 27, 2010
    Posts:
    123
    Hi Alex

    Do you have any plans on putting up a tutorial on how to use the new networking actions? Would it be possible to use these new actions to get data stored in a mysql database?

    Thanks and great job!
     
  10. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Yes, we'd like to make some networking tutorials. Have you played with the network samples that ship with Playmaker? They show how to get started with a simple client/server setup. We're working on more samples, but networking is a pretty big/complex topic! In the meantime, the networking actions match the Unity Networking API commands one to one, so standard unity networking tutorials apply in Playmaker.

    We also have Photon actions in the works, and that will make networking significantly easier!

    I think database access will require a custom action, but I'll look into it...I'd ask that on the Playmaker forum - seems like something someone might have done already...
     
  11. linusnorden

    linusnorden

    Joined:
    Sep 27, 2010
    Posts:
    123
    No i didn't know there was a network sample ill check it out.... Photon actions seems interesting :) I'm thinking of buying the ULIB in the asset store but i don't know if i can use it with playmaker in some way...
     
  12. YorickVanVliet

    YorickVanVliet

    Joined:
    Nov 14, 2009
    Posts:
    22
    For a game we are currently making we'd like to use PlayMaker. However our states shouldnt always start at the start of the scene. We solved it initially by having the first State wait for a "Triggered" event, and then do our actions.

    However it seems a bit odd to do it this way, especially after seeing images like these on your website.


    Am i misinterpeting it, or can you have multiple starting points in a FSM? These new blocks are "just there" in this tutorial, i cant find any clues on how to add them, and if they are new starting points at all.
     
  13. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Those are global transitions. Right-click on a state and Add Global Transition.

    Check out this overview:
    https://hutonggames.fogbugz.com/default.asp?W133

    You have to have a Start State, but it can be empty, e.g., an Idle state with no actions. You can then use global transitions to activate other states. Remember, you can also put a global transition on the start state so you can quickly return to Idle when finished.

    This page has an example:
    https://hutonggames.fogbugz.com/default.asp?W361

    $GUIElement_GlobalTransitions.png
     
  14. YorickVanVliet

    YorickVanVliet

    Joined:
    Nov 14, 2009
    Posts:
    22
    Thank you for the fast and helpful reply :)
     
  15. ThomHurks

    ThomHurks

    Joined:
    Jul 27, 2010
    Posts:
    22
    Hey,

    After I import the Playmaker package I get a ton of errors about iTween.
    For example:
    "Assets/PlayMaker/Actions/iTween/iTweenLookFrom.cs(30,24): error CS0246: The type or namespace name `iTween' could not be found. Are you missing a using directive or an assembly reference?"

    Any idea what causes this?
     
  16. rockysam888

    rockysam888

    Joined:
    Jul 28, 2009
    Posts:
    650
    Hi alexchouls,

    Will playmaker include Actions for N-GUI, ex2D and RageSpline in future?
    If playmaker will not support them , how we do to make it working with them ourselves?

    Thanks in advance
     
    Last edited: Mar 16, 2012
  17. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Did you import the ITween directory from the playmaker unitypackage?
     
  18. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Yes, that's the plan.

    Users also post custom actions on the forum:
    http://hutonggames.com/playmakerforum/index.php?board=19.0

    Action packs are collected on the community wiki:
    https://hutonggames.fogbugz.com/default.asp?W547

    And of course you can write your own custom actions:
    https://hutonggames.fogbugz.com/default.asp?W166

    Playmaker ships with the source code for hundreds of actions that you can learn from or adapt to your needs.

    Playmaker 1.3 also shipped with a Custom Action Wizard that makes it easier to block out new custom actions. We'll be building on this more in future updates...

    Also remember, you can use actions like Get/Set Property, Send Message, Add Component etc. for generic control over third party scripts. In some cases this can be enough to do what you need to do...
     
  19. rockysam888

    rockysam888

    Joined:
    Jul 28, 2009
    Posts:
    650
    Great. More users will use Playmaker as RageSpline, NGU and ex2D are top 10 asset items.
     
  20. loki72

    loki72

    Joined:
    Aug 17, 2011
    Posts:
    13
    just purchased this.. incredible!... and only 50$ for the march madness sale. thanks.
     
  21. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Thanks loki72!
     
  22. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
  23. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Been fielding quite a few questions about how PlayMaker interfaces with regular scripts, so here's a quick summary:

    PlayMaker has Script Control Actions:
    https://hutonggames.fogbugz.com/default.asp?W44

    And generic Get/Set Property Actions:
    https://hutonggames.fogbugz.com/default.asp?W688

    These actions let you build state machines that control regular scripts (turn them on/off, call methods, start/stop coroutines, get/set properties etc.). This is great if you have existing scripts, or you're comfortable scripting in Unity. In my experience, using a higher level visual state machine editor/debugger to control your scripts can really help cut down development times... it keeps things organized while empowering content creators to author more game behaviour themselves.

    Of course, you can also create your own custom actions:
    https://hutonggames.fogbugz.com/default.asp?W166

    And use PlayMakerFSMs in your scripts:
    https://hutonggames.fogbugz.com/default.asp?W329
     
  24. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
  25. theBrandonWu

    theBrandonWu

    Joined:
    Sep 3, 2009
    Posts:
    244
    Thanks Alex for the shoutout! PlayMaker rocks and I think everyone enjoyed the demo last week. :D

    p.s. I don't have time to finish Run Megan Run, but if there are any PlayMaker experts who are interested in picking this one up, PM me! (It's 90%+ done with PlayMaker)
     
  26. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
  27. echo17

    echo17

    Joined:
    Nov 24, 2011
    Posts:
    1,249
    Thanks for the PlayMaker bump, Alex. And thanks for such a great sale!
     
  28. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Nice asset store review... from a programmer :)

     
  29. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
  30. ksimm

    ksimm

    Joined:
    Mar 23, 2012
    Posts:
    3
    Hi Alex, this looks great, I was wondering if I purchase on my PC, will I also have to purchase for my Macbook?
     
  31. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    No. The Unity Asset Store license lets a single user use the asset on any number of machines.
     
  32. ksimm

    ksimm

    Joined:
    Mar 23, 2012
    Posts:
    3
    Great thanks, just purchased! :cool:
     
  33. SwiftIllusion

    SwiftIllusion

    Joined:
    Jan 22, 2012
    Posts:
    66
    Hello, I wish to ask, Is there anything to show for photon with playmaker?
    I'm not necessarily asking, and certainly not hassling about asking for a release date, however I heard you were aiming to show it off around GDC, and to be released soon afterwards, but it has been 2 weeks since then and I haven't found any additional information on this which is integral to what I wish to develop with the help of playmaker, hence my wish to hear if there was something I missed somewhere, or it's just that it is still in development stages only?

    I'd appreciate any information at all regarding this
     
  34. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    We're starting a beta for the Photon integration with Playmaker on Monday! I'm very excited about PlayMaker + Photon - it should open up the ability to make multiplayer games to a lot more people!
     
  35. nipoco

    nipoco

    Joined:
    Sep 1, 2011
    Posts:
    2,008
    Does this work with NGUI?
     
  36. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    Hey guys, I thinking of buying Playmaker and at 50 bucks why not... how well does Playmaker handle character animation? Such as a guy throws a punch and the enemy reacts... or I can program damage states... I think I will definitely buy this...
     
  37. SwiftIllusion

    SwiftIllusion

    Joined:
    Jan 22, 2012
    Posts:
    66
    Awesome, that's great news! I can't wait to try it out, as I agree it will no doubt open up multiplayer capabilities of a
    much larger variety to more people, I look forward to seeing it in action :)!
     
  38. UnlimitedEdition

    UnlimitedEdition

    Joined:
    Feb 27, 2012
    Posts:
    287
    Would this be a good solution for networking. I have no clue how to code networking :)
     
  39. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    From what I understand, NGUI uses GameObjects and SendMessage to implement its GUI system. So a lot of built in Playmaker actions should work with NGUI. However, I imagine some custom actions will be required to really integrate the 2 systems. NGUI is a very popular system, so we do plan to make some nice custom actions for it!

    Although the community may beat us to it! Many actions are created and shared on the forums:
    http://hutonggames.com/playmakerforum/index.php?board=19.0

    And action packs are collected on the Community Wiki:
    https://hutonggames.fogbugz.com/default.asp?W547
     
  40. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Playmaker gives you a lot of control over character animations. Check out the Animation Graph screencast:



    This is a simple example, but hopefully it gives you an idea of how quickly you can setup and test animation states.

    Also checkout the Animation Actions:
    https://hutonggames.fogbugz.com/default.asp?W3

    You can even send events to Playmaker from animations, if you want something to happen on a specific frame:
    https://hutonggames.fogbugz.com/default.asp?W181

    Playmaker also handles Unity's built in physics events (OnCollisionEnter etc.) if you want to trigger animation state changes on those...
     
  41. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Playmaker implements the built-in Unity Networking and ships with examples to get you started. It makes a lot of things easier, e.g., syncing variables over the network, however, networking is still a complex topic, so be prepared for some hard work! You will still need to read the Unity Networking docs...

    The Playmaker Networking docs are still very much work in progress, but you can check them out here:
    https://hutonggames.fogbugz.com/default.asp?W852

    Photon makes networking much easier, and we hope to get that out there soon!
     
  42. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    This is definitely awesome, Alex... definitely going to utilise this excellent tool, which will be very useful for fighting game... :) Will I also be able to use Playmaker to access control pads such as the XBox360 pad?

    EDIT: And do I have to use a character controller or can I use a custom object to define movement...?
     
    Last edited: Mar 26, 2012
  43. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Yup. You can access Unity's Input Manager in Playmaker. E.g., Get Axis Vector:
    https://hutonggames.fogbugz.com/default.asp?W453

    You'll notice that action has options for common things you need to do with the input (e.g. make it relative to a camera). Our goal with Playmaker is to make Unity super accessible, so we try to build common usage patterns into actions so users don't have to figure everything out from scratch...

    You can mix scripts with PlayMaker and use Script Control and Get/Set Property actions to control them. There's a post a little earlier in this thread that shows all the ways PlayMaker can work with scripts. PlayMaker is pretty flexible :)
     
  44. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    That sounds cool... I also working on a simple script to get used to using Playmaker... I want to make a light flicker randomly... so far, I have the light turning off when the editor is in play... I also found flicker, which also does the same, but I want to randomise the flickering by changing the intensity of the light... what is a quick way of setting this up?
     
  45. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Make 2 states for the light: Off an On and use Set Light Intensity in each state. Then use Wait with a Random Float to switch between the states.

    $FlickerLight.png

    If you want a smoother change in light intensity you could use Animate Float:

    $animateFloat.png

    Or Float Interpolate etc.
     
  46. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    This is killer :)... thanks...

    EDIT: If you do a new update, I am thinking you could put in a Sine Cosine function... the light flickers, but i am looking for even more random flickering...
     
    Last edited: Mar 26, 2012
  47. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Neptune, may I suggest, for a simple thing like a light flickering, to use the Unity animation system.
    It's great for this kind of stuff. Inexpensive and quick to set up.
    Of course it would be not real random, but if you make an animation 30 seconds long nobody will ever notice that :D
     
  48. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    True... but the main purpose for me using Playmaker is that my game is animation heavy... :)
     
  49. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Uh I don't know what you mean by animation heavy but surely it's less expensive on CPU to use an animation to manage the light power than calculating random values all the time.
     
  50. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    I assumed the flickering light was an exercise to learn Playmaker. But sure, you could do something similar with Unity's animation system and a Play Animation action.

    So why use an FSM at that point?

    The thing about game development is things that start off simple (one state) can quickly get more complex, and need to behave one way in one situation and a different way in another (multiple states). Playmaker is designed to let you manage this growing complexity as you make your game and try different things out.

    Not suggesting your flickering light will necessarily sprout all sorts of complex behaviour! ;) Just saying don't worry too much if some state machines start really simple - chances are you'll need to add something as you make your game, and then you'll be glad to have the structure to build on... and you can optimize if needed as your design solidifies, which, IMHO, only really happens with prototyping and iteration - you discover the game by making it!

    For example, you decide that lights should flicker when one enemy type gets close to them, so you can spot those guys in the level. When the enemy gets really close the light overloads and explodes. Suddenly you've gone from one state, to four states (Idle, Flickering, BlowOut, Dead), and discovered a potentially interesting gameplay mechanic... The other cool thing about FSMs is they provide extra information about the world, so AIs look smarter, but are really just reacting to state changes. E.g., an NPC can look at a light that starts flickering and play a scared animation (providing he's in a state that should react to it - again, managing states...).

    As you start to think in terms of states (what happens in a state, what causes state changes, what reacts to state changes...) you'll discover rich behaviors that look complex but just stem from clear organization...and happy accidents!
     
    Last edited: Mar 27, 2012