Search Unity

Assets diamond Visual Scripting

Discussion in 'Works In Progress - Archive' started by maz_dev, Jun 17, 2017.

  1. EvilGremlin

    EvilGremlin

    Joined:
    Aug 12, 2016
    Posts:
    231
    When are you going to switch to the paid version? What will the price be?
     
    maz_dev likes this.
  2. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Thank you Ian for noticing it, I fixed it, and it will be fine in the next version that comes this week with good new features:
    More readable graph (better links adaptive shapes and colors for variables type that affect links and fields).

    There will be also a very good new feature that makes diamond Visual Scripting closer more and more of "natural" programming, this feature is the data transfer. Data transfer let you transfer data between graphs (i.e between their generated scripts) so any scripts in the scene can communicate easily.

    Happy diamond scripting :)
     
    Last edited: Aug 20, 2017
    eggeuk likes this.
  3. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Hi EvilGremlin, thank you for encouraging us by 5 stars and your valuable comment on the diamond visual scripting asset store page, this kind of comment help us explaining the diamond concept and benefit.

    At mezanix, to democratize games and app development, we are discussing the idea to let diamond free, the decision is not finalized yet, but we will inform everybody of our decision once it's done.

    Happy diamond scripting :)
     
    Mark_01 and eggeuk like this.
  4. eggeuk

    eggeuk

    Joined:
    Sep 1, 2013
    Posts:
    88
    We can find some assets for Unity with a three-step pricing plan:
    - one as Free or Personal, - second for Indie and - third for Professionals. Unity is one of them too.
    So Diamond could be in the versions of:
    - Diamond Democratized Development
    - Diamond Indie
    - Diamond Professional.

    A word in paying the author of software:
    Someone has to pay all the bills that come to Mezanix. This could be the owners of Mezanix or those who earn money with the product Diamond Visual Scripting. I personally do want Mezanix to stay for the next months and years.

    One is always feeling more happily with some cash flowing in her/his pockets. Besides the fact of getting informations how market reacts to the offered product.

    Perhaps a professional version could be that one using GPU-optimization. I have seen the Demo – really a good job. For now there are no easy to use assets in Unity store for GPU development.

    Those who are starting developing games and apps are getting Diamond for free.
    The others may surly be happy supporting a product that is basically for their own work on games and apps staying alive for many many years.
     
    Last edited: Aug 20, 2017
  5. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Hi eggeuk, thank you for your consideration for mezanix, your idea can be one of the options, anyway, if we decide to charge something, we will try to let it as affordable as possible because there are many talented indie developers that use unity.
     
    Mark_01 and Kennth like this.
  6. Barada

    Barada

    Joined:
    Apr 27, 2015
    Posts:
    99
    You may want to just supply a paypal donate button sooner rather than later, so even though the software is free, if people wanted to support its development, they could.
     
  7. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Thanks, It is a good idea too, anyway, at mezanix we have to find the optimum between our revenue and delivering affordable tools to users.

    Happy diamond scripting :)
     
  8. Barada

    Barada

    Joined:
    Apr 27, 2015
    Posts:
    99
    i`m trying to make a script that i can add 2 game objects to in the editor (public) and read the distance between them. then use this value to change a value in a shader (remap min/max distance to 0-1).

    I feel this would be easier if any "Get" variable nodes would also have a make public option. This is far more like how real programming works isnt it, assigning values to variables.

    With the length of the available options on the nodes, maybe some sort of search function is needed. i just seem to spend all the time going through each catagory trying to find something to do the job. Is there a distance function?
     
  9. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Hi Barada, try this

    Image 3.png

    I added your suggestion of searching for functionalities in the roadmap because you are right, that will help users to find quickly new functions that they haven't used before.

    About your idea to put the get node in public, is it to read its variable in another graph? or to let the variable appears in the inspector of the game object that holds the generated script?
     
    Last edited: Aug 25, 2017
  10. Barada

    Barada

    Joined:
    Apr 27, 2015
    Posts:
    99
    thanks for looking into this. after a little while i actually came across the same solution :) At the moment if i want to make a public float i use an add node, and expose one input there. as for other variable types there may be different work arounds like the game object, i use get name and then a find child by name, just in order to get an exposed game object.
     
  11. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Hi Barada, you are right for the get node, it is urgent to let it expose variables, I am working on it now and will deliver this feature today,

    diamond 1.1.3 is near maturity, I will send it to the asset store this Monday night, I can send you today the current evolution of it that will have this new features:

    Diamond 1.1.3
    -------------------
    1. Colors for variable types. Each field has a color related to its variable type. Links are also colored according to variable types colors.

    2. Links shape enhancement to enhance graphs readability.

    3. Inventory list actions (add, remove, make the object of this index ready) for all lists types.

    4. Expose in the inspector (make variable public) in the get nodes.
    At Monday night I will send a version having a fifth additional feature, the transfer data one, you will see it is more flexible than project variables and I tend to make it cover all the variable types, even lists.

    Happy diamond scripting :)
     
    Kennth likes this.
  12. Barada

    Barada

    Joined:
    Apr 27, 2015
    Posts:
    99
    that sounds great. i will gladly test the current version before submission. i`m hoping to use this script on several object pairs in a hierarchy. i dont know if i`ve outlined its use yet, but its to allow me to blend textures in a shader depending on the movement of the bone objects that control the face of the character i`m working on. for instance when she smiles her cheeks dimple. or when she frowns she gets lines on her forehead. My point here being i need to store the starting points for the bones on each script. are the global variables in the list truely global or only global to that graph instance? so that i can duplicate the graph and add other nodes (maybe having to save the assigned objects to a file?) and NOT have them overwrite the initial object positions. Sorry for all the questions and i`m exceeding grateful for all the consideration. i think were both finding out a lot about how things are used in real world scenarios :)
     
    Kennth likes this.
  13. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Ask questions as much you can, this is by users practicing real projects that diamond can evolve quickly and in the right direction.

    You can test this to get the initial position of the object holding the script, so you can attach this script to all objects of this kind. To transfer this position across your scene to be read by another graph or scripts, with the version you have now (1.1.2), project variables can help, in the version (1.1.3) that I will send you tonight, you can test also the variable transfer feature.

    Edit, variable transfer feature is for Monday night, I apologize :)

    Image 2.png
     
    Last edited: Aug 26, 2017
  14. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    EDIT: the variable transfer feature will be ready Monday night, not tonight. tonight you will have the variable exposure in the get nodes.
     
  15. Barada

    Barada

    Joined:
    Apr 27, 2015
    Posts:
    99
    thats all good. yea i have much of the graph made, its actually quite hard to share images of graphs without being able to zoom out, as they are so large. maybe we need to work on a shorthand way of writing them out, or is there just a single file we can attachto these posts/email to share the graphs we make. you may find it interesting the different (and maybe entirely wrong) way i have made some things. :)
     
  16. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    for now the global zooming by Alt + mouse wheel zoom in out all nodes, but without to be centered to the mouse cursor, so when we zoom out, the nodes still far from each other, I will add to the zooming the ability to be centered to the mouse cursor, so the nodes will get closer when we zoom out.

    The graph file is of little size usually, I don't know if we can send it in the unity forum, but it can be sent by email, the question is sometimes diamond developer won't share his work because he/she want their new ideas to be secret, especially before delivering their game/work.
     
  17. Emerald_Eel_Entertainment

    Emerald_Eel_Entertainment

    Joined:
    Mar 30, 2016
    Posts:
    120
    Hello! As mentioned on your first YouTube tutorial video this is a very valuable asset! I completed the FPS zoom tutorial, but how can I modify the zoom script so that there's smoothing during the transition of zooming in and out? Could it be a float so it can be adjusted in the attached script? I'd like to make the dezoom-to-zoom transition an adjustable float, for example a 0.5 second transition time that could be edited on the script once written and attached to the FPS camera.
     
  18. Emerald_Eel_Entertainment

    Emerald_Eel_Entertainment

    Joined:
    Mar 30, 2016
    Posts:
    120
    Unrelated to my query prior but I have seen a bit of talk regarding possible future payments for Diamond. In my opinion I believe that it being free to download is one of the main appealing factors of its inclusion on the Unity asset store (though I still think it's great!).

    If there will be purchases that could be made inside the plug-in, a recommendation I have is to have a collection of purchasable premade scripts created with Diamond. Each download would have an editable graph and the compiled C# script version too. I'm unsure if this sounds too complicated to pull off but I think it's a great way to give developers more inspiration for graph setups and an incentive to keep using Diamond. :)
     
  19. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Hi Emerald, I tried to do a graph that does animated zoom with a public float as delay, I figured out that it needs a new feature that I need to add to diamond, this feature is an event in a state telling this state that the program had just switched on it.

    I will add this feature and when I submit the new package (tomorrow or Tuesday), I will send you the new version with an example on zooming progressively.
     
  20. Emerald_Eel_Entertainment

    Emerald_Eel_Entertainment

    Joined:
    Mar 30, 2016
    Posts:
    120
    That's good to hear; it introduced a new scenario! :)
     
    maz_dev likes this.
  21. Kennth

    Kennth

    Joined:
    Aug 11, 2017
    Posts:
    116
    QUOTE="maz_dev, post: 3111367, member: 134805"]
    Diamond democratize games and apps development, it's a State Machine node editor extension for Unity using visual scripting, useful for game designing, prototyping, coding, and iterating."

    Hi there, I only found your thread now for Diamond, I am very excited as I do not know C# am older .. :p
    What attracted me to Unity was the idea of democratize games. This has been like for me an interrupted hobby after 40 years.. I can do graphics again.

    I think your idea and heart is wonderful. My concern with people saying they want to write " collections of scripts " to
    piggy back off of Diamond.. kind of feels like the people that wrote the ad-on Playmaker scripts... once they got
    the money and playmaker upgraded, they had made as much money as they thought they would make and had no
    incentive to correct all the errors, that people paid good money for and were left hanging.

    Unity is full of " hit and runs " ( not saying any one person in particular ) But to me your original intend is pure and
    I think you are a kind soul. That said and Karma, I would for sure say I think you should have a patreon page and
    or this page https://pledgie.com/ that a lot of good people are in and I have seen some that are on Github as well advertise in their read me for if you want to send money to me at pledgie.com

    If you decided to go as Github then maybe other will help. And or if I could code I would make them free
    with a " support me " if you find my work useful and or use it in a big game buster :D

    In any case I am glad to have found you. I hope that Diamond goes on to big things in the future :)
    Best wishes.. Ken
     
    Last edited: Aug 28, 2017
  22. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Hi Emerald and Kennth,

    Glad that you like diamond and you want to see it growing. At mezanix we are very grateful to see people caring about how we can earn incomes that help us to continue developing.

    As we said earlier, we are thinking about many ways possible to get incomes, your ideas are good and represent one of the ways we are debating.

    Anyway, any kind of payment will take care of indie developers, if we decide to put a price on a product, it will be affordable by anybody.

    We appreciate so much that you notice our philosophy, our main goal isn't to be 'rich', it is to do a job that passionates us, and we want that passion to be transmitted to others. If one day we get rich - and it is an advice that we give to all rich people - money doesn't have to be accumulated in big banking accounts (it's a wasting), money has to be invested in useful projects for humanity (education, science, health, etc...)
     
  23. Kennth

    Kennth

    Joined:
    Aug 11, 2017
    Posts:
    116
    If it were only possible for Unity to have 2 price tiers one for " professions " who actually make
    money making games .. and then the rest of us " wanabe's " XD ..

    I am sure your decision will be the right one in the end. I am going to read the
    whole forum from page one, then do the tutorials .. ASAP i have time.
    Thank you.
     
    maz_dev likes this.
  24. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Thank you Kennth and don't hesitate to give us suggestions about diamond or advice on how we can get incomes without overcharging our users, the donation idea can be one of multiple good choices, our marketing manager is in mission now, when he comes back he will think about all suggestions given and other ideas concerning the financial aspect.

    I didn't know https://pledgie.com/ yet, our marketing manager will look at it, it seems to be one of the good ideas too.
     
    Kennth likes this.
  25. Barada

    Barada

    Joined:
    Apr 27, 2015
    Posts:
    99
    something that could help simplify the vector3 node. instead of put float to x,y,x,xy etc, what about just having a single menu entry called something like "from/to float" that has the vec3 input and a x,y,z input and output. if a vec3 is input then any of the outputs can be used to get a float (or pass through the vec3, which is mostly pointless). Also if a float is connected to the x,y,z inputs then it will replace any value in the input vec3. this is so its easy to compile a vec3 from floats, swap the values inside a vec3 (and maybe a vec2 version) and also extract any combination of floats. One of the most glaring problems at the moment is the increasing size of the compute type lists.

    what would also help is maybe combining all the maths operations into one, and adding another sub menu to choose the actual operation (add, subtract,divide, multiply) just to shorten that first list again.

    maybe something simpler and similar with the logic (greater than, less than etc) and having a greater, equal and less than output bool. also an "include equal" toggle between the greater and less than lines so the user can choose either => or =< if they want. Just ideas that bring things a little more in line with already available node editors, and that may help simplify the node lists.

    if you would like illustrations then i can mock up visuals
     
  26. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Hi Barada, it doesn't need illustrations, it's clear that you want to get the compute type less heavy, especially for mathematical operations that can be grouped.

    It is a good idea to have a Logic Type called 'Math operations' in which I can add simple, complex and even math functions (exp, log, trigo, etc..).

    Another subject: I am working (finishing) the data transfer feature and would like if you have time to test it, I will send you a version, it is more flexible than project variables and cover all variable types even lists. You can send a variable value by adding to it a name (identifier) and read this value from a completely different graph or logic, so at any time and anywhere in your program you can send and read data.
     
  27. Barada

    Barada

    Joined:
    Apr 27, 2015
    Posts:
    99
    that sounds great. are you implementing it as a logic type? variable type and then variable name would be good. then it can be positioned anywhere in the graph.
     
  28. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    It is a natural function in any variable type, for example, if you want to transfer a gameObjectList, you choose :

    Logic Type: "Compute Or Operation"

    Variable Type "Game Object List" (the variable you want to transfer)

    Compute Type: "Send Me As Transferred Data" if you want to spread this variable value across the scene
    or "Listen To Transferred Data" if you want to receive the value of an already spread variable.

    I am working on how we can find functionalities faster, the feature is not mature yet,

    but for now there is a tip, if you click at Compute Type button for example and you want the "Send Me As Transferred Data" functionality, as long as it begins with 'S', you press 'S' on your keyboard and it will select only words beginning with S, so you can find your choice quicker. maybe you know this tip already but I explain it, so others in the forum can benefit from the info.
     
    Mark_01 and Barada like this.
  29. Kennth

    Kennth

    Joined:
    Aug 11, 2017
    Posts:
    116
    Hello
    I am doing the first tutorial zoom de-Zoom, when i set up the first Edit logic to
    add the Input and and go to state :) Its all good so far .. I went to go add the same to the
    De zoom second level, Sorry I just assumed you wold be able to edit / copy / paste
    one set or i was hoping if you multi- select you could go Clrt C " copy then use paste after ?

    would that be possible to put in ? or Is it possible already ? sorry I was such a rush today I did
    not read the doc's I just started following the You-tube tutorial. Thank you
     
  30. Kennth

    Kennth

    Joined:
    Aug 11, 2017
    Posts:
    116
    I guess i mean edit copy the nodes
     
  31. Barada

    Barada

    Joined:
    Apr 27, 2015
    Posts:
    99
    cool. maybe i can help with some english language translations that read better for some functions. i can go through and compile a list of possible alternates that may be simpler or just better english. For instance i think you have the bool NOT labeled as is not as? i cant quite remember. but the phrase "do this all the time" can be shortened either to a technically more accurate "every frame" or just "continuous" for instance.
     
    maz_dev and Kennth like this.
  32. Kennth

    Kennth

    Joined:
    Aug 11, 2017
    Posts:
    116
    Opps Sorry RTFM found the Duplicate Logic button, its a little twitchy but it works. :)

    The tutorial on youtube and the PDF are different, butI know this will just take a bit of getting used too. :D

    I like it a lot. Am used to double clicking to go to the next level ( logic ) , but i can see if
    you have more then one add logic on a node, how double clicking would not really solve anything.
     
  33. Kennth

    Kennth

    Joined:
    Aug 11, 2017
    Posts:
    116
    Perhaps if its possible, you could double click on the " states " and the same pop up would come
    that come now when you click on the little dots/ buttons..

    Also for the alt + b button for the back to the main graph area,
    on the upper bar where you have New Graph Load Graph Save Graph Save Graph and Scene " Icons "

    Would it be possible to put another Icon up anywhere in that area where you think is good .. just
    another Icon that is linked to the alt + b for back to the main graph area ? I think it would be
    a lot faster. Take all this with a grain of salt.. just observations about the UI .. or wishes ..
     
  34. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Hi Kennth, agree with your ideas about the back button (I think you want it to be always visible), agree also about the double click on the state to open the menu, it accelerates the workflow, I added your ideas to the to do list.

    Continue asking questions, it's with enthusiast users like you that diamond evolves in the right direction :)
     
    Mark_01 and Kennth like this.
  35. Barada

    Barada

    Joined:
    Apr 27, 2015
    Posts:
    99
    I find it quite hard to work out what is going on once the scripts are generated (and things work) maybe the implementation of a debug node that pushes any attached inputs to the console or a separate debug helper object. if it is a separate scene helper object this could be set as active or inactive in the diamond window settings so that they can be left in the graphs and toggled on or off globally. i think the node itself should also have a active, inactive switch so they can be activated depending on which specific thing the user is debugging, or turned off globally for final script generation.
     
    Kennth, maz_dev and eggeuk like this.
  36. Barada

    Barada

    Joined:
    Apr 27, 2015
    Posts:
    99
    Another helper node that may be useful is a global bool option for the "do it" button. so instead of a wired input it can use a single variable globally, directly in every node. this would reduce the number of input wires greatly and would allow for pulse control of the logic (loops) as well as on enter state and always do.
     
    Last edited: Aug 30, 2017
    maz_dev and eggeuk like this.
  37. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    For now, we can use this 2 nodes for debugging things,

    Image 1.png

    All variables have a 'To String' node, so we can write them to console or to UI text,
    object variables (like game object, material ..) has a 'Get Name' node that is a string that we can show also.

    I am thinking about a complete debug system that is user-friendly for diamond, did you mean by your idea is to let diamond automatically generate a debug object in the scene having the functionalities of the two above nodes, and the user can activate or deactivate this object, and also send it information to show ??
     
  38. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    This is a great idea, let me know if I understand your point, is it about having a "Global Do It" button in the logic, so all the individual "Do It" buttons behave like the global one if the user decides to?
     
  39. Barada

    Barada

    Joined:
    Apr 27, 2015
    Posts:
    99
    great. i had not found the print to console. it will be very useful. having a global switch to disable that would be good also, so when things work it i dont have to return to all the various logics to remove nodes.

    Yes, that sounds about right.
    maybe a very useful way would be to have every node have a "use variable" option on the doit button, which adds another drop down menu that holds all the bool variables available in the current logic, including global variables. this would allow the user to set several different pulse generating local and global bools throughout the project.
     
    maz_dev likes this.
  40. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    In the upcoming "data transfer" system you can send and receive all kind of variable types, even bools, so you can send a bool and receive it in another graph or logic. You can receive it in many nodes by using its name (identifier), so no links to draw.

    About a global do IT node, I think that this feature can be useful when in a logic of many logic nodes, the user want all nodes to be activated (called) or sleep at the same time, so it's a global behaviour, so one global do it node can be created in the logic to do the job, I think your need was to reduce as possible the number of links to let the logic be more readable and maintainable.
     
    Kennth and Barada like this.
  41. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Mark_01 and Kennth like this.
  42. eggeuk

    eggeuk

    Joined:
    Sep 1, 2013
    Posts:
    88
    Yes that is realy nice! The articel is comming from Jakarta, Indonesia - just on the other side of the world. Very interesting to see the worldwide community of visual scripters.
    I think, there has to be a great power of making a "collection of scripts" as @Kenneth posted. I would be glad getting the next release 1.1.3.
     
    Kennth likes this.
  43. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
  44. Kennth

    Kennth

    Joined:
    Aug 11, 2017
    Posts:
    116
    I am glad people are starting to talk about Diamond VS :) and it is only 2 months old on the store!

    Maybe if you like for marketing when the time is right this place does a lot of unity reviews http://igdsunshinemag.com/Mag/ you may know of it already.

    The problem I have is the when do it .. So I tried to use the same kind of set up for the Zoom tutorial,
    to make a block go up and down on a click ... like elevator say. I know i was am doing something wrong,
    because I try do it always and on click like say 50 y .. the block just keeps moving up :D
    But if i say do once ? then you could only use the elevator once ? if i understand this right ?
    I know this is a stupid dumb user thing and of course this is easy for diamond, the nice thing
    is, it is very fast and simple to try different things.

    Maybe having the when do it as default always then say when not to do it always, if it seems more often then
    not it is used as always ? I am guessing a global is less coding in terms of elegance.
    As said i do not know c# at all or coding, so i may say stupid stuff, please forgive.

    I want to use Diamond as a way to slowing get to know C# .. it only gives you things that can only go with
    another thing.. I think it will sink in this way ;)
     
  45. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Hi Kennth,

    Try to do the following, don't hesitate to ask any question, and if you want, here is my email:

    mezanixissa@gmail.com

    I can send you the graph by email if needed.

    Image 4.png


    Inside Idle state:
    Image 3.png


    Inside AtBottom state:
    Image 7.png


    Inside MovingUp state: Image 8.png

    Inside AtTop state:
    Image 5.png
     
    Kennth likes this.
  46. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Inside MovingDown state:
    Image 6.png
     
    Kennth likes this.
  47. Kennth

    Kennth

    Joined:
    Aug 11, 2017
    Posts:
    116
    WOW!! I am very grateful for all your kind consideration. :)

    I wrote to you on my email at gmail instead of my hotmail. and included some screen captures, so you know it is me.

    I can copy these for sure and I will.

    I am thinking maybe for your web site, there could be an area when if people wanted they could upload
    their graphs and kind of start a repository for graphs, perhaps in the future.
    Thank you so much for your time, please include that as an example in the next store package if
    you feel it would help forward Diamond further;)

    Even though I am learning I am very excited for the future for Diamond.

    While I am here I was wondering further for the UI .. If in the duplicate logic, would it make
    sense that what ever you were duplicating would " hold the same values " ? That way it would seem
    to me that you could/would be changing one function or state ? like in the zoom / dezoom all you would
    have to change would be the field of view from 30 to 60 ( assuming you were not going to make them public )
     
    eggeuk likes this.
  48. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Hi ken,

    We are working on doing a sharing space of diamond's graphs.

    About the logic duplication, you are right, it needs enhancement, it duplicates all the logic nodes but the user need to readjust some parameters after duplication, it is in the to do list and we hope to deliver a better logic duplication in upcoming versions.

    Happy diamond scripting :)
     
    eggeuk and Kennth like this.
  49. dba999

    dba999

    Joined:
    Oct 3, 2014
    Posts:
    19
    Hello everybody,
    I just tried Diamond Scripting, and, holly Toledo, this is amazing ! The zoom dezoom tutorial is a very good start, very easy to understand, even for a poor skilled coder like me. For sure I'll keep exploring this young tool. I like so much the open mind here.

    Just a simple question. Sorry if I missed it somewhere in the documentation, but I couldn't find any way to trigger an event to a traditionnal script attached to an object. Something like a simple SendMessage with parameters to a specific GameObject or just a variable type taking component javascript/C# script in order to access the public variables of the attached script. And of course, I'd like also to know how to send a message from one of my scripts to a script generated in Diamond.

    Arf, my english is sooo tedious. French I am, so, you know ... :D Hope it was clear enough :)
     
  50. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Hi dba999,

    In the graph that sends an event, create this logic node:

    Image 1.png

    Be sure to play the logic and to click on do it so the event "Player_is_hitted" will be registred in the system.


    Now in your graph that need to listen (recieve) this even create this logic node:

    Image 2.png

    this node list for you the events already registred in the system.

    When you generate your scripts and play, the node "send" will send the event when its "do it" is triggered, and the node "recieve" will listen to this event when its "do it" is triggered too,
    if the event is already sent in the game, the recieve node will have its output turned to "true" that you can use to trigger whatever you want related to this event.


    To send message to a diamond generated script by a script you have created, it is simple,
    The script generated by diamond that you attach in your gameobject, is a natural unity MonoBehaviour script, like any Monobehaviour script created by a developer.
    So the diamond generated script attached to a gamobject, can be accessed by the GetComponent unity function, you can also use the SendMessage to trigger a function in it, if this function is private you can turn it to public, but I think that SendMessage can also deal with private functions.
    As long as it is a natural unity script you can add to it the code you want, but if you add to it a code manually , be sure to put it away from the folder where the graph generates its scripts because diamond will delete the newly added code if your scripts belong in its generation destination.

    Another advice if you want to change a generated script manually is to put it in another namespace, so you know that this script is tweaked by you and it will not have confusions with scripts generated by diamond.

    I am also a francophone, here is my email: mezanixissa@gmail.com

    You can send us emails in french if you want further explanations.
     
    Kennth likes this.