Search Unity

FlowCanvas - Visual Scripting Similar to Unreal Blueprints

Discussion in 'Assets and Asset Store' started by nuverian, Apr 14, 2015.

  1. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    It's alright. We all get those outbursts from time to time. But honestly, if you think something need improving, let me know. Please stop being agressive to sanpats. He is just saying his opinion like we all do at the end of the day.

    If minimizing the panel as it stands now is not enough, I could try make it take up less space when it's minimized, like maybe a small box on the top right, instead of hidden completely. If that doesn't look good enough in the end, I could add an option in the Prefs to show/hide completely, yes. It's easy to implement as well.
     
  2. Rixtter

    Rixtter

    Joined:
    Mar 31, 2014
    Posts:
    244
    Thank you. And yes I will stop with the aggression.

    The small box is also an excellent idea, it ideally helps those who like to keep the editor snapped into their layout. Of course the other way around it is to simply have a maximised floating window. Leave as is for now, minor detail.
     
    Last edited: Feb 22, 2016
  3. SONB

    SONB

    Joined:
    Jul 24, 2009
    Posts:
    89
    Hey nuv,

    do I understand it right that, if I put a DoOnce node in my OnUpdate event, it will call Out only once? I never used DoOnce and did it like this:
    do_once.PNG
    And LogText is being called on every update, ignoring DoOnce.
    A bug or... I just don't get it? o_O
     
  4. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    I will implement smaller minimize, or complete hide/show variables preference for the next update (which also includes the static methods from drag and drop by the way).

    Oh. It's a bug due to bad formatting. Sorry.
    Here is the fixed code fo DoOnce.cs:
    Code (CSharp):
    1. using ParadoxNotion.Design;
    2.  
    3. namespace FlowCanvas.Nodes{
    4.    
    5.     [Category("Flow Controllers/Filters")]
    6.     [Description("Filters Out to be called only once. After the first call, Out is no longer called until Reset is called")]
    7.     public class DoOnce : FlowControlNode {
    8.         private bool called;
    9.         protected override void RegisterPorts(){
    10.             var o = AddFlowOutput("Out");
    11.             AddFlowInput("In", (f)=>
    12.                 {
    13.                     if (!called){
    14.                         called = true;
    15.                         o.Call(f);
    16.                     }
    17.                 });
    18.             AddFlowInput("Reset", (f)=> { called = false; });
    19.         }
    20.     }
    21. }

    Thank you.
     
    GamerPET likes this.
  5. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    Hey Nuv,

    About the copy/paste ability of the nodes. I want to copy/paste some nodes from one gameObject to another, not in the same gameObject.

    Is this possible?

    Thanks <3
     
  6. SONB

    SONB

    Joined:
    Jul 24, 2009
    Posts:
    89
    Damn, now I see it too.
    Thanks for the fast fix, hawkeye! :)
     
  7. SONB

    SONB

    Joined:
    Jul 24, 2009
    Posts:
    89
    Hey Nuv, I noticed that I still can't access Simple Waypoint System's fields of the class splineMove, like tween, speed, waypoints etc. I added the class to the list but still nothing.
     
  8. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey,
    Yes, you can select multiple nodes and copy/paste them across different flowscripts, even though I just noticed a small UI bug that makes the new pasted nodes "look like" they are not connected, even though they are. Entering/Exiting playmode will refresh that, but I will certainly fix that for the next version.
    Thanks!

    Cheers!

    Hey,
    Fields aren't supported in FlowCanvas, at least yet. Only properties and methods. This is strictly done for performance since fields can only be retrieved with reflection, while properties and methods can be converted to delegates which are much faster than pure reflection. If the need of fields is mandatory, I could add support for those as well.

    Thanks!
     
    GamerPET likes this.
  9. lugard

    lugard

    Joined:
    Nov 27, 2015
    Posts:
    21
    Hey,
    I removed all ConvertTo nodes and all works fine! But before that WebGL app showed errors: missing AOT types for ConvertTo nodes.
    I have some issue to get a variable of type List<T> from global blackboard "BoardSceneVars". I don't see "Get Variable of List<T>" nowhere. After I created a dummy variable with that type in the local blackboard, I could choose the global variable.
    2016-02-24 03.32.44.png
     
  10. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Ah. Thanks for reminding me!
    I will have to append the Global Variables into the Get/Set categories as well as the List<T>.
    I will fix this and send an update as soon as possible.

    Thanks again :)
     
  11. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    Hello Nuv,

    I'm working on trying to make Easy Save work. The PlayMaker guys didn't replayed yet so I don't know if I can pull the variables from the Blackboard to PlayMaker. Someone else suggested that PlayMaker can read variables if they are set to public or something like that.

    Anyway... I posted that thing about Preferred Types Editor but the guy from Easy Save said this:
    Any ideas Nuv? I would love to be able to use EasySave...

    Thank You
     
  12. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370


    Stupid question... how can this be False? Shoudn't it be True?

    I'm trying to make a function that checks if the player is passed over a number like 5-10-15-20.
    For example if my player moved from 3 to 6 he passed over 5 so = True. If he passed from 6 to 9 it's False.

    So basically I'm trying to make a For that will loop X times. In that For I'm placing a Switch that checks my current position +0 +1 +2 (depends on the Index of the For) ... if at one point it passes over 5-10-15-20 I want to make a bool variable True or something. I will check this Variable in other functions later. Any idea on how to approach this correctly?

    Ok. Stupid me. I have a variable that knows the Segment my player is in. If I get to a new segment, that value automatically updates. What I could do is just Check if my variable updated. Then BAM! I know I am in a new segment. Is there a way to check if a variable got modified or something?
     
    Last edited: Feb 26, 2016
  13. Smolli

    Smolli

    Joined:
    Mar 12, 2014
    Posts:
    84
    Hi,

    I just bought FC, after having read through all the posts here and the documentation. Oh, how I am missing these wonderful starter tutorial videos. nuverian, do you here me? Maybe you could just make these videos and have a text translation and let somebody here who has a wonderful warm and clear oxford english accent do the voice over?

    I have a little bug report that got me hanging my had and regretting my purchase. I think it may even be a double bug report :)

    I installed the Space Invaders Demo and it sort of worked ok. After a few shots or movements the enemies started moving slow and jerky.
    But I wanted to do add a small change to get warm with FC, so I wanted to add a starting X-Position for the tank.
    It was pretty easy, I added an On-Awake and Set_Position and I thought it would work.
    Unity3D_FC_01.jpeg
    But instead I got many error messages in the console, coming from the enemy ships. The error was very simply solved once I had found the source: The bullet has no tag name 'Bullet' set and thus the trigger event couldn't do a comparison.
    Unity_FC_02.jpeg
    That was bug 1 (maybe you should upload a fix, I mean, come on, at least you should check and double check what you offer as helper scene...)
    Bug 2, even worse IMHO, why did the game work at all? It works correctly (except for the stuttering of the enemies) until I add anything. But even when I remove the few nodes I added it doesn't work anymore. THAT I don't understand.

    Hmmm, I find the debugging process a little cumbersome. It's not always easy to find the node-script that causes the problems. Couldn't you maybe add the direct link to the node-script and the group in the console window?

    Thanks and I hope FC will have many many years of healthy prosperity :) And please please do add some more tutorials ( I know that this is the most boring stuff, but you won't really succeed without much improved tutorials and videos, and that would really be a shame!)

    Cheers
     
  14. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey,

    Here are some nodes for EasySave. Just create a cs script and put this code in there.
    Code (CSharp):
    1. using System.Collections.Generic;
    2. using ParadoxNotion.Design;
    3.  
    4. namespace FlowCanvas.Nodes.EasySave{
    5.  
    6.     [Category("Extensions/EasySave")]
    7.     public class EasySave<T> : CallableActionNode<T, string>{
    8.         public override void Invoke(T data, string path){
    9.             ES2.Save(data, path);
    10.         }
    11.     }
    12.  
    13.     [Category("Extensions/EasySave")]
    14.     public class EasyLoad<T> : CallableFunctionNode<T, string>{
    15.         public override T Invoke(string path){
    16.             return ES2.Load<T>(path);
    17.         }
    18.     }
    19.  
    20.     [Category("Extensions/EasySave")]
    21.     public class EasyLoadList<T> : CallableFunctionNode<List<T>, string>{
    22.         public override List<T> Invoke(string path){
    23.             return ES2.LoadList<T>(path);
    24.         }
    25.     }
    26.  
    27.     [Category("Extensions/EasySave")]
    28.     public class Exists : PureFunctionNode<bool, string>{
    29.         public override bool Invoke(string path){
    30.             return ES2.Exists(path);
    31.         }
    32.     }
    33. }
    Let me know if these work for you :)

    Actualy, an event to check if a variable change is very nice suggestion :)
    Here is the code of this event. This will also be included in the next version.
    For update compatibility, please create a .cs file named "VariableChangedEvent" and put it under "FlowCanvas/Module/Nodes/Events/Other". Here is the code for it:
    Code (CSharp):
    1. using NodeCanvas.Framework;
    2. using ParadoxNotion.Design;
    3.  
    4. namespace FlowCanvas.Nodes{
    5.  
    6.     [Name("On Variable Change")]
    7.     [Category("Events/Other")]
    8.     [Description("Fires Out when the target variable change. (Not whenever it is set)")]
    9.     public class VariableChangedEvent : EventNode {
    10.  
    11.         [BlackboardOnly]
    12.         public BBParameter<object> targetVariable;
    13.         private FlowOutput outFlow;
    14.  
    15.         public override string name{
    16.             get {return string.Format("{0} [{1}]", base.name, targetVariable);}
    17.         }
    18.  
    19.         public override void OnGraphStarted(){
    20.             if (targetVariable.varRef != null){
    21.                 targetVariable.varRef.onValueChanged += OnChanged;
    22.             }
    23.         }
    24.  
    25.         public override void OnGraphStoped(){
    26.             if (targetVariable.varRef != null){
    27.                 targetVariable.varRef.onValueChanged -= OnChanged;
    28.             }
    29.         }
    30.  
    31.         protected override void RegisterPorts(){
    32.             outFlow = AddFlowOutput("Out");
    33.         }
    34.  
    35.         void OnChanged(string name, object value){
    36.             outFlow.Call(new Flow());
    37.         }
    38.     }
    39. }

    OnVariableChangeEvent.png


    Hey,
    Thanks for your feedback and sorry for the inconvenience caused. I have highlighted the fact that the tag needs to be added in the downloads page now. The reason that it's not added automaticaly is for the fact that this would require the tag settings to be included in the package, which would overwrite your existing tags, which is something I don't think is desirable in many cases.

    Regarding bug 2, I am not really sure what you mean. How did the game stop working? Did you maybe delete something that shouldnt? Sorry for asking this, but I just can't reproduce some similar case, unless of course I mess up with the existing flowscripts. Can you maybe export a .unitypackage of the no longer working game and send it over to check? (support@paradoxnotion.com)

    Right now, when something goes wrong in the flowscript an error is loged with the graph and node info, and the node causing this is marked red as well in the editor. This can certainly be improved further though, like a button to focus the node in the editor, yes.

    Finally as far as video tutorials, I really want to make some when I get some time off implementing improvements, feature requests, fixing and support. Hopefully these will come soon.

    Thanks again for your feedback.
     
    Smolli likes this.
  15. Smolli

    Smolli

    Joined:
    Mar 12, 2014
    Posts:
    84
    Hi,

    first let me thank you for the EasySave Nodes. I have it too and it's just wonderful that you have added support for it.

    About Bug 2 it's very easy to reproduce. I tried it on my Mac and on my Surface pro 4 with Win10. Go to the nodes for the ship, add a node like On Awake and test the game. You will see that the bullets don't destroy the enemies anymore and each time a bullet passes an enemy it will through an error in the console window about the missing tag.
    Funny thing is, that even when you delete the added node the errors don't go away anymore. IMHO the errors should have been there directly, since the missing tag was missing all along. And I don't understand why the error doesn't go away if I delete the one node and so having the original status again.

    I hope I have explained it better this time. If not I'll do a short video or so.

    About videos: You know, after a feature is before feature ;) ( and I'm really very grateful about all your improvements! Just makes the beginning somewhat harder (and the buying decision)).

    But I have trust in you and so I have bought NC, too :)

    Cheers
     
  16. Smolli

    Smolli

    Joined:
    Mar 12, 2014
    Posts:
    84
    Hi,
    I know it's late but my wife isn't yet back from her kids free going out, so I played a little bit with the EasySave integration. :)

    It works! How cool is that! And with the ES Api it's a breeze to implement the other nodes, too. Cool :)

    I have one error though which I don't understand. It's only when I have the FC Editor window open. Doesn't hurt, but maybe you know more:

     
  17. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    Hey Smolli... can you post a screenshot with your Easy Save nodes? I'm curious on how you save up & load something :p

    Thanks
     
  18. Smolli

    Smolli

    Joined:
    Mar 12, 2014
    Posts:
    84
    Sure, I simply added to what I previously had added in the Space Invaders Demo.
    Unity_FCES01.jpeg
    For the installation I added a new folder called EasySave into FlowCanvas > Modules > Nodes and created the c# script file into it.
    Inside the Node Editor you will then find the nodes in Extensions > EasySave
     
  19. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    I will have to play with this. Let's say that I replace "On Awake" with a custom function I create.... basically after each "Move" my player takes I want to save a couple of variables.

    How can I specify which variables to save?

    EDIT:
    I did a small test:


    And yea... I got a TXT file saved on that location that contained my "Data". :D Pretty cool progress.

    EDIT2:
    Smolli:
    http://www.moodkie.com/forum/viewtopic.php?f=11&t=946

    Can you do a vote? That way EasySave guys might do an official integration.
     
    Last edited: Feb 28, 2016
  20. Smolli

    Smolli

    Joined:
    Mar 12, 2014
    Posts:
    84
    Hi GamerPET, glad you worked it out.

    Will do, waiting for the activation email... ok, got it and voted.

    I think the integration should be pretty simple, looking at the source code nuverian provided. But everything costs time, time and time ;(
     
  21. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    Hey Vaggelis. I have send you an email last week. I don't expect a reply ... but I wanted to check if you got it. Sometimes by emails go to the spam folder. Thanks
     
  22. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087

    Hey,
    You are very welcome! I will upload a more complete EasySave integration package on the website downloads section later today or tomorrow for both FC and NC :) Will post back here to let everyone know.

    Regarding the bug, I honestly can't reproduce it. I add nodes, delete nodes or similar. The "game" still plays. What error is loged? Can you please export a .unitypackage and send to support@paradoxnotion.com ?
    The 2nd error seems relevant to ES2Editor, but I will check if it is something I missed on my part.

    Also thanks a lot for getting NC too, as well as for your kind words! I appreciate it.
    Cheers!

    Hey, I've replied to your email now. I honestly missed it. Sorry.
     
  23. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
  24. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    I started working a bit witH Text Mesh Pro. I want to do a "Combat Log"... basically a text field where I write different events. I did a post on the Text Mesh Pro thread:
    http://forum.unity3d.com/threads/te...ed-text-rendering.248636/page-20#post-2533570

    He tells me that I have to use a += operator... basically I should have a variable with my text, and when I want to add a new line I do a += to that variable. Right?

    My second problem would be something like...

    I want to write a string like: "/nFood Gained" and then I want to add a variable value. In PHP it would be like "Text text" . $variableValue. Not sure how the therm is ..."string operation"? "Food Gained" + $totalFood ... and the text would appear like "Food Gained 12".
     
  25. Smolli

    Smolli

    Joined:
    Mar 12, 2014
    Posts:
    84
    Oh wow, this is truly cool thx! Have you also read the part from the ES dev? Not that the work is done double.
    http://www.moodkie.com/forum/viewtopic.php?f=11&t=946&p=2582#p2582

    I think I found the bug, but I don't have the original scene anymore and it seems as if you have updated it.
    The problem was (I think) that the Bullet Tag was undefined. The button said undefined and not untagged. Normally every object without name is automatically set to untagged. I don't know why this one was undefined and I don't even know how to set it to undefined. Maybe a Unity version error? I don't know. When I now set the tag to untagged I don't get any errors and the bullets fly through the enemies..

    About the 2nd error, it's really only one I open the Node Editor. When it's closed I have no errors. I'll send you the package to have a look in any case.

    And I thank you for those great assets :)
     
  26. Smolli

    Smolli

    Joined:
    Mar 12, 2014
    Posts:
    84
    Hi GamerPet,
    you could use the concat method (do a space search for concat within FC).
    Same with adding a variable as FC automatically changes the type.
    Not sure about the newline. I tried adding \n but it's not working with the console and normal unity text. Could try it with TMpro. But I would rather suggest using 'Environment.NewLine' which isn't yet implemented in FC yet, but could surely be added easily by nuv I think (but I could be wrong of course :))
     
  27. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    \n should work... I think because that's what the TextMesh Pro guy suggested. I want to use the TextMesh Pro because it can color text, etc.

    I will do a search on concat later but thanks for pointing me in the right dirrection.



    Uhhhh yteaaa...
     
    Last edited: Mar 1, 2016
  28. Smolli

    Smolli

    Joined:
    Mar 12, 2014
    Posts:
    84
    Cool :) I think the Escape Character is being parsed to a \\ so as to be displayed. I think we need nuv for this...

    Btw, looking at your graph, it starts being a little bit complicated to read (in comparison to code), I think too big graphs should be split into smaller ones. You could use groups for that or Macros. Something I will also have to think about, taming complexity :)
     
  29. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    yea I think the \n might be escaped. I did a test and we get the \n printed.



    It's ok... so far :p I'm doing a separate deocumentation anyway and I'm learning as we speak. After I started this I realized that I need a UIController so I made one.



    Main Controller - is what you see above.
    DrawSegment - is my "draw new segment" function
    PlayerMovement - handles the player movement ... and this sends info to the MainController
    UIController - Whenever I want an UI updated. (some UI updates are still in the functions because I figured that I need the controller later)
    OnAwake - does the Awake stuff, like setting up some variables, Updating the starting UI, etc.
    XPSystem - this is where I will do the XP system... this will track the player XP and see when I have to level Up, etc.
    SaveLoadController - Future Easy Save stuff.
     
  30. Smolli

    Smolli

    Joined:
    Mar 12, 2014
    Posts:
    84
    Now that sounds like a plan! And I see you even use Playmaker? I'm hoping to get along with NC as to not mix up too many frameworks.
    Good idea about the documentation, I shouldn't forget that, too ;)
     
  31. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    Btw ... the \n works! It's \n and not /n like I did it :p





    -------------
    I plan to use PlayMaker when I need a state machine. Right now the only place where I might need it would be ... when I press ESC to go into a Pause state and show the Menu UI.
     
  32. Smolli

    Smolli

    Joined:
    Mar 12, 2014
    Posts:
    84
    I know it's \n, that's what I added in my experiment. So only TMpro accepts escape codes, good to know as I have TMpro, too :D
     
  33. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    Ok. This is really really cool. In case someone is wondering how I did this:



    Basically the ### Game Started ### is being send by my OnAwake fuctions:

    Every time I move, I also send an event that looks like this:

    As you can see I can even add style and stuff :D

    Finally, my UIController looks like this:

    I receive an event with a String. I get that string and I attach that $newLineChar (which basically is \n ). That way I know that each new text I receive will start on a new lane. Then I take my text and I concat it with my current $textLog variable. Then I update the $textLog value to have... everything. Once I have everything I just set the TMP Text to the new value!

    Bam magic!

    Now I have to implement some kind of scroll bar... and I would love to implement a "fade out" to the top of the chat log. Scroll bar is required, the fade out is more of a polish thing :p

    Just a question, is there a limit on how big the "$textLog" value can be before things start to crash?
    Also, if you have any suggestions on how to improve me please tell me.

    Thank You!
     
  34. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    @nuverian - I have my "tiles" that are set up as prefabs (if you remember). With them I have a code that looks like this:


    The script itself is set up as "Bound" but probably since my tiles are set up as Prefabs... my targets become "null". One "fix" I did was to just send a Global Event as you can see with the "gainFood" event.

    Now for test purposes I'm sending a direct event... but as you can see the Target became "null". What is strange is that the script... still works. It stopped working after I restarted unity. The null got replaces with "Self".

    So do you have any suggestion on how to do this or I still have to send a global event?

    Thank You
     
  35. SONB

    SONB

    Joined:
    Jul 24, 2009
    Posts:
    89
    Hey @nuverian,
    There were two updates for Windows 10 and now I can see all the icons!
    Unbenannt.PNG
    So, problem solved :)
     
  36. SONB

    SONB

    Joined:
    Jul 24, 2009
    Posts:
    89
    Aaaaaand the problem solved as well by reverting factory settings of the Editor layout :cool:

    Nuv, now you have so much more time for more important things :D
     
  37. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    Oh... there are icons? :D
     
  38. SONB

    SONB

    Joined:
    Jul 24, 2009
    Posts:
    89
    Ikr :D

    Yeah, I see that you have the same issue with the missing icons in cast nodes, events and hierarchy. These icons are a part of a font, which was not supported by Win 10 (you're on Win 10, right?). I read somewhere that the latest update for Win 10 brings improved support for some fonts, which fixes FlowCanvas. Also, this was the reason why I've never seen this 'tick'-icon in the Rig Inspector, when you choose Humanoid as the animation type. Now it's there.
     
  39. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    Oh nice:


    And even some penis looking icons:


    Never seen icons :D And yea I'm on Windows 10.
     
  40. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    @GamerPET Thanks for sharing all these posts with the rest of us, even if the post cound can get overwhelming, it can certainly be usuful to others :)

    Hey, you are welcome and thanks as well.

    The EasySave integration for NodeCanvas is online by the way. As for the FlowCanvas ones, I am holding back a bit until the new FC version, so that the more advanced EasySave nodes can be used due to the new features in some of the FC ways of doing.
    Also thanks for letting me know regarding the found cause of the bug and the send package. Ill take a look at the package a bit later on too.

    Thanks again!

    Hey!
    If your tile prefabs are in the project's folder (not an instance of the prefab) and the flowscripts of those prefabs are referencing an object from the scene, it's a no go.
    Basicaly, everything that is in the Projects folder, is an asset and can't reference anything in the scene by unity standards. But, if this is not the case, please let me know of your prefab/references setup.

    Thanks!

    Thanks for letting me know! :) I'm glad those things are fixed (by themselves).
    As such I will make a post a bit later with the update changes :)
    Cheers!

    I see chess pawns :)
     
  41. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370


    Those are my Tiles prefabs. From those I build up my segments.

    So I guess that my only option is to send a global event? It works fine just that the Console Log get's clumped up :D
     
  42. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey,
    Yes, You can't have scene object references to those prefab assets by unity standards.
    Regarding the console logging though, there is an option to turn off event logging in the "Prefs" menu at the top of the editor called "Log Events" :)
     
  43. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello everyone. I've submited the new version to the asset store and will be live in the next few days.
    Here are the changes!

    Latent Action Nodes
    Latent action nodes (those that need time to complete), are now queued one after the other for each call of the node and also all have a Start, Update and Finish output port, which together were essential for some things:

    In the following capture, I repetedly hit down the Fire1 button and you will see that the Wait node is being queued, while the count of queues are also shown right next to the node title for debugging.
    LatentQueue.gif

    @SONB The TweenFloat node you were after, is now also easily possible and will also be included in the extension package online once the update goes live:
    TweenFloat.png
    Which is very similar to how the EasySave Download will also work:
    EasyDownload.png

    Context Menus
    • Global Variables are now shown in the context menu.
    • List<T> types are now shown in the context menus for relevant generic nodes.
    • Static methods are now shown in the context menus even when dragging an instance reference.
    • Extension methods are now also appended in the context menus.
    • Flow Control nodes are now correctly added in the filtered context menus per port type.
    The Rest
    • Added 'OnVariableChanged' event node.
    • The "Self" instance port is now shown in red if the "self" gameobject does not have the component required.
    • Added ability to "Change Type" for generic nodes, through their right click context menu.
    • Added "Break" input flow port in ForEach and ForLoop nodes, to manualy break out of the loop if needed.
    • String port parameters will now show within brackets(" ") for clarity.
    • Fixed serialized port values being reseted in some very rare cases.
    • Coding: The [Description] attribute can now be used in SimplexNodes
    • Coding: Simplex nodes can now easily have out parameters by simply declaring public properties with get accessors.
     
  44. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    Cool new updates!

    ----------------
    Is there a way to stop a for loop?

    I'm working on a "Level Up System".
    Basically I have a List that looks like this:



    So to reach level 2 (Element 2) we require 20 XP. To reach level 3 (Element 3) we require 40. etc



    This is my current spaggetti code :p Basically what I do is a For Loop that will Loop for each element in that List.

    Then we check the item from that Element and we compare it >= with my upcoming XP.

    I have several problems here.

    For example if I'm at level 3 already, I will already run TRUE a couple of times... then the rest will be FALSE.

    1. I want to stop the For Loop when I go to False because in this case there is no point for me to continue.
    2. Do you guys have a better suggestion on how to do this?

    Right now it's a big problem because I don't know exactly when I level up + I update my variable on each "True"... so I can't use the Variable On Change event.

    EDIT: I just re-read the changelog and it seems that you added a Break for the For Loops :)
    EDIT2: I could get my "Current Level" variable and store it... then after I finish my For Loop I do a check to see if Current Level got changed from the stored variable. If it changed it means I leveled up (or down... which you can't do in my game :p )
     
    Last edited: Mar 3, 2016
  45. SONB

    SONB

    Joined:
    Jul 24, 2009
    Posts:
    89
    Oh yesss! Thanks!
    Looks like a nice update. :)
     
  46. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    Is there a way to have more than 4 String.Concat spots?

     
  47. Smolli

    Smolli

    Joined:
    Mar 12, 2014
    Posts:
    84
    Hm, you could easily create a node for that based on the 4 String Concat I think. Didn't look at the code, so wild guessing, but it shouldn't be so difficult imho :)
     
  48. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    Yea... probably :D I thought that there might be some node already that would allow me to dynamically add more... like a List node or smth.
     
  49. Smolli

    Smolli

    Joined:
    Mar 12, 2014
    Posts:
    84
    THAT would be a nice idea however, dynamically adjusting nodes. Nurv, we got a new feature wish :)
     
  50. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    Hmm... I'm finally at a point where I need a "State Machine". I'm thinking on including NodeCanvas in.

    Basically I have:

    - Start State. Here the only thing the player can do is hit "Move".
    - You move. You can alter your move by playing cards.
    - You confirm your move. You "officialy" move to that new tile.
    - Events happen based on the tile you landed.
    - UI get's updated & game is being saved using Easy Save ( soon! :D )

    Now I have to think on how to do this via State Machines. I basically arrived at this problem because of the Game Log I just implemented. Like when you lose food, I have a function that modifies the food variable then it sends an event to update the UI & Update the Text Log.

    My problem was that I was losing food when I was moving... then I was losing food (or whatever) when I landed on the tile.

    So my Game Log got to many new lines.

    This way I think... I can update the Game Log at once in a more controlled way.

    Damn, and I was just getting happy that I arrived at the point where I can do some more design and less programming. I was wrong :(