Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

[RELEASED] Dialogue System for Unity - easy conversations, quests, and more!

Discussion in 'Assets and Asset Store' started by TonyLi, Oct 12, 2013.

  1. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Hi @TheRickMaster17 - The easiest way to include custom integers and strings in save data is to add them to Lua's Variable[] table. You can do this in the Script field of a dialogue entry, or in your own scripts:
    Code (csharp):
    1. DialogueLua.SetVariable("MyVariableName", myCsharpVariable);
    (More info: Lua in Scripts.)

    All values in the Variable[] table get saved, even ones that you've set at runtime rather than defining ahead of time in the dialogue database. (More info: What Gets Saved.)

    If you need to save data into Lua as part of a saved game, and if you haven't already set it in Lua prior to saving the game, you'll want to implement OnRecordPersistentData() and OnApplyPersistentData() methods. OnRecordPersistentData() is called on all GameObjects just prior to saving the game. It gives scripts an opportunity to record their data into Lua first. OnApplyPersistentData() is called after loading a game. (More info: Writing your own persistent data components.)

    If for some reason you can't record your data into one of the existing Lua tables, you can always assign a delegate method to PersistentDataManager.GetCustomSaveData.
     
  2. treshold

    treshold

    Joined:
    Nov 9, 2013
    Posts:
    225
    RPG Kit has been updated to version 3.0 :) just wanted to point out if you are still updating integration for it :)
     
  3. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Hi @treshold - Yes, several projects depend on the Dialogue System + RPG Kit integration. I'll be updating it as soon as possible. RPG Kit 3.0 is a big update, so it'll take a bit of time. I'll post here when it's ready!
     
  4. RealAspireGames

    RealAspireGames

    Joined:
    Dec 24, 2013
    Posts:
    265
    Hey @TonyLi
    I am having a problem with the realistic FPS prefab and dialog system. When I walk up to an NPC and complete a quest to retrieve a weapon for them I still have the weapon that I retrieved. On the conversation I made sure that the script was Variable["Shotgun"] = false But for some odd reason it seems like it is not being called.
     
  5. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Hi @godofwarfare115 - If you're also using S-Inventory, you need to add another command to your Script field. The S-Inventory and RFPS integrations need to work separately to support users who are only using one product or the other. Variable["Shotgun"]=false removes it from RFPS, but you also need to remove it from S-Inventory using RemoveItem(). The "Sad Robot" example conversation uses these Lua commands:
    Code (Lua):
    1. Variable["Shotgun"] = false
    2. RemoveItem("!!!FPS Player", "Shotgun", 1)
    3. Item["Shotgun_for_Sad_Robot"].State = "success"
    4. Variable["Alert"] = "Quest Complete: SHOTGUN"
    (The second line removes it from S-Inventory.)

    You may also want to download the updated SInventory_Support.unitypackage. It includes a bug fix for RemoveItem(). (If an item was equipped, RemoveItem() didn't remove it properly from the equipment UI.) The next release of the Dialogue System will also include this package, or possibly a further-updated one if the new S-Inventory becomes available on the Asset Store by then.
     
    twobob likes this.
  6. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Patch 2015-03-27 Available on Customer Download Site

    A patch is available on the Pixel Crushers customer download site. If you need access, please PM me your Asset Store invoice number. The changes in this patch will also be in the next full release. If you need them earlier, you can import the patch.

    Patch 2015-03-27:
    • Added: Precompiled DLL package for Unity 5 NLua (in Third Party Support).
    • Fixed: If StartConversation() was told to start at a terminating entry, it skipped the entry.
    • Fixed: If a Quest[]/Item[] table element was changed from a subtable to a different data type, QuestLog.GetAllQuests() returned an error.
    • Changed: (Unity UI) Response Menu > PC Image is now an Image (sprite), not a RawImage, to make it consistent with other Images.
    • Action-RPG Starter Kit: Improved inventory syncing during conversations.
    • Adventure Creator: Updated for AC 1.43; fixed a bug that raised an error when building.
    • S-Inventory: Fixed a bug in RemoveItem() when the item was equipped.
     
  7. RealAspireGames

    RealAspireGames

    Joined:
    Dec 24, 2013
    Posts:
    265
    I am currently not using S-inventory at the moment just the standard RFPS with dialog system! I attached the FPSluabridge and the problem is still occurring! I have attached a video link to where you can see what is going on!

     
  8. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    @godofwarfare115 - I haven't been able to figure out how to reproduce what's going on in your video. Can you please email a sample project to tony (at) pixelcrushers.com?

    You can also temporarily set the Dialogue Manager's Debug Level to Info. This will log a lot of information to the console, including the Lua commands that run in your Conditions and Script fields. It might give some insight. Just to make sure -- is the weapon name "Shotgun"? In Lua, you can create new variables just by setting them. So your script can contain this:
    Code (csharp):
    1. Variable["Bazooka"] = false
    or
    Code (csharp):
    1. Variable["Shot_Gun"] = false
    and the Dialogue System won't complain. But the FPSLuaBridge won't do anything special with these variables, because they don't match any of the weapon names in !!!FPS Weapons.
     
    Last edited: Mar 28, 2015
    RealAspireGames likes this.
  9. RealAspireGames

    RealAspireGames

    Joined:
    Dec 24, 2013
    Posts:
    265
    Ok so after hours of thinking and debuging, trying different solutions on what it could be! I have found it it only happens when I attach my own custom scripts to the FPSPlayer such as my Money script and City's Discovered script. When I remove all my custom scripts from the player everything think in the Lua environment works correctly. The shotgun goes away after. But when I add the scripts back the shotgun does not go away and the Lua environment seems not to be functioning correctly.
     
  10. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Hi @godofwarfare115 - Would it be possible for you to send me a copy of those scripts? Can you narrow it down to a single script that's the culprit?
     
    RealAspireGames likes this.
  11. Emre_U

    Emre_U

    Joined:
    Jan 27, 2015
    Posts:
    49
    Hello TonyLi,

    I have been stuck in 2 problems with no answer for a day now. Maybe it is somewhere in your tutorials but honestly I am lost there too. Many tutorials and extensive documentation (it is a good thing :D but I run out of juice! ) Also most of the functions I found are based on the completion of conversations and not in the middle of conversation where an dialogue entry processed.

    Question1: I want to activate a c# script attached to a gameobject when a Dialogue Entry has been spoken. I think it should be something about Lua but I have no clue how I can write a lua script that can call a c# script in a gameobject. (it might very well be reading changing a singleton variable in c# where an update function is constantly checking for bool to come true but it would be kinda messy coding I guess. Though better than nothing. I am not building GTA V anyway.)
    Example: In the middle of conversation NPC creates 3 pieces of Prefabs in game. conversation continues.


    Question2: It is nearly same question but in reverse order. I have a singleton where I keep my global variables between scenes. I want my dialogue manager to read this and enable/disable appropriate dialogue entries in Conversations. So it is kinda from c# to back to Lua.
    Example: Player took at least 2 of the Prefabs even though specially instructed by NPC to take only one, thus NPC won't use trusting expressions in future dialogue entries.


    For information : I am using your built in dialogue manager.

    Edit: I found an answer at page 29 of this thread.Something about SetActive(GameObject); in Sequencer entry but well it didn't worked for me probably I fumbled it. I write down
    SetActive(SoulStone); Delay({{end}}); it just put a warning message and passed that entry in game.
    Tried to write same thing in Script part of entry. This time a red warning message.. I would appreciate if you can express it little more. Because I think it should solve my problems. As long as I can activate a gameobject I can use an attached script to do everything I have dreamed of.

    Edit2: Ok ok I found it!!! It wasn't working because my root parent object was itself and thus inactive + it was a prefab with the same name. It is explicitly stated in your documentation that it will/may cause problems because how unity works. I just made an empty active gameobject to parent the inactive ones and it worked. Ok my 1st question is answered. I only need to learn the 2nd.question. Reverse effecting conversation entries. I am looking for it in documentation too.
     
    Last edited: Mar 28, 2015
  12. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Hello @Emre_U - Since you already have a script, the easiest solution is to add an OnConversationStart method. The script must be on the player, the NPC, or the Dialogue Manager. In this method, set a Lua variable. For example:
    Code (csharp):
    1. using PixelCrushers.DialogueSystem;
    2. ...
    3. int numTaken; // Assume in your script that this records how many prefabs the player took.
    4. ...
    5. public void OnConversationStart(Transform actor) {
    6.     DialogueLua.SetVariable("numPrefabsTaken", numTaken);
    7. }
    In your dialogue entry, check the value of the variable:
    • [0] START

      • [1] NPC: "Thank you for taking only one."
        Conditions: Variable["numPrefabsTaken"] == 1

      • [2] NPC: "Hey! You took more than one!"
        Conditions: Variable["numPrefabsTaken"] > 1
    If you don't want to use this solution, you can register your own C# functions with Lua and call them in the Conditions and Scripts fields. See the "Registering Functions" section in Lua Class.
     
    Emre_U likes this.
  13. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Updated S-Inventory Support Package Available

    S-Inventory v1.23 was released yesterday. It has a API change that requires an updated support package. You can download the updated support package on the Pixel Crushers customer download site or right here.


    I'm working on the RPG Kit 3.0 support package now. RPG Kit 3.0 has a lot of changes, so it'll take a while.
     
    twobob likes this.
  14. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Updated UFPS Support Package Available

    An updated UFPS support package is available to address a cursor lock issue with Unity 5 and UFPS 1.4.9. You can download it on the Pixel Crushers customer download site or right here.

    The RPG Kit 3.0 support update is still under way.
     
  15. BPR

    BPR

    Joined:
    Jan 4, 2013
    Posts:
    56
    Hi Tony,

    can I access "Always force Response Menu" somehow via Script? I have to be flexible during a dialog about the player having to explicity click the answer when there is only one...

    Thank you very much :)
     
  16. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Hi @BPR - Yes: (but! see below)
    Code (csharp):
    1. using PixelCrushers.DialogueSystem;
    2. DialogueManager.DisplaySettings.inputSettings.alwaysForceResponseMenu = true; //or false.
    Better yet, if you only need to force it on occasion, put the "[f]" tag in the dialogue text. This way you don't need to fiddle with scripts.
     
  17. BPR

    BPR

    Joined:
    Jan 4, 2013
    Posts:
    56
    Perfect answer and fast as always, thanks a lot :)
     
  18. hike1

    hike1

    Joined:
    Sep 6, 2009
    Posts:
    401
    A new action rpg starter kit/dialog system demo

    https://dl.dropboxusercontent.com/u/102638093/arpg_new_scene_player_10.zip

    1. Roof disappears on entering building
    2. Alchemy Table -mixing a potion (crafting) (partially working)
    3. Mining gold (partly working, goal is to get random amounts) rock is by Gamedraw
    4. NPC calls you by name-Patty, by Autodesk Pinocchio
    5. NPC stops walking and goes into idle, remembers talking to you- Green Spider, On Asset store
    6. NPC demands Gold, you either pay or fight -headless dwarf by psionic3d
    7. Use a bed (sleeping)
    8. Jumppad-the white cube just jump on it.

    Later, a ladder, and making time pass while you're asleep



    Credits
    Tony Li wrote all the code
    Alchemy Table by facadegaikan blendswap or opengameart.org

    katana and mining hammer by Tabasco
    destroyed walls by lfa

    Unitypackage and tutorial to follow
     
  19. hike1

    hike1

    Joined:
    Sep 6, 2009
    Posts:
    401
  20. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
  21. hike1

    hike1

    Joined:
    Sep 6, 2009
    Posts:
    401
  22. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Love/Hate is now live on the Asset Store!

    It includes integration for the Dialogue System for Unity, PlayMaker, and Behavior Designer. (The Behavior Designer integration package is hosted on Opsive's site.)

    If you have any questions about using Love/Hate with the Dialogue System, please feel free to post on either forum thread.
     
    Emre_U, twobob, hopeful and 1 other person like this.
  23. Emre_U

    Emre_U

    Joined:
    Jan 27, 2015
    Posts:
    49
    Hi Tony, again me.. :)

    I tried to make things work for me. And it is coming out nicely. You should be coding god. I could never do things that I do in my game right now with out The Dialogue System for unity. But I guess enough flatter (no no it is true :) )

    But I have some stupid yellow warning text. Not sure why I am getting it. "Dialogue System: Sequencer received a blank string as a command line"

    Yes . It is blank. Because I didnt even touch that sequencer (Not intentionally at least). It doesn't break anything just gives my console some yellow tint actually . But I kinda get annoyed by not knowing why it is happening. Also came back to thank you.

    Edit : Good Luck with Love and Hate I will probably buy when in discount (cash problems) ( Though At the moment I think, the Dialogue System is so awesome that I can mimic Love and Hate with Lua variables.)
     
  24. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Hi @Emre_U - Does the yellow warning appear for every dialogue entry? Or only one dialogue entry?

    In either case, the warning is harmless. Nevertheless, here's how to get rid of it:

    If it appears for every dialogue entry, please check the Dialogue Manager's Default Sequence. You might have an extra semicolon ( ; ), such as:

    Delay({{end}});;

    Notice the extra semicolon at the end. Semicolons separate sequencer commands. The two semicolons have nothing between them, which makes the Dialogue System think it's a blank command. You also don't need a semicolon at the very end. You can rewrite the sequence as: Delay({{end}}) <-- note: no semicolons needed.

    If it appears in only one dialogue entry, edit the conversation and inspect that entry. The Sequence field may have an extra semicolon.

    If that doesn't help, please post a screenshot of the inspector or email it to tony (at) pixelcrushers.com. Also please feel free to send me a sample project that demonstrates the issue. I'll be happy to take a look.
     
  25. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,647
    BTW, I haven't looked into this at all, but is Dialogue System's integration with ICode (formerly AI for Mecanim) up to date?

    Also, I notice that ICode doesn't include Dialogue System on their "integrations" list.
     
  26. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Updated support for ICode is coming at the end of the weekend. Since the API changed significantly from when it was AI for Mecanim, I had to rewrite all of the ICode actions. I'm testing the ICode integration today and the RPG Kit integration (which relies on ICode) tomorrow.

    Thanks for noticing that the Dialogue System isn't on ICode's integrations list. I'll talk to Zerano.
     
    hopeful likes this.
  27. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    UFPS 1.5.0 Support Package Available

    UFPS 1.5.0 (released yesterday) introduced a breaking change to the API. You can download an updated support package for the Dialogue System here or on the Pixel Crushers customer download page.
     
  28. unit102

    unit102

    Joined:
    Nov 13, 2014
    Posts:
    26
    Hi,

    Does Dialogue System support Oculus dk2 camera?
    I tried using the Adventure creator but I came a cross a big problem.. the oculus camera can't be switched OFF and ON again, it will simply turn off if they got deactivated from a script.

    so in case of Adventure creator, the cameras act like a pool which you can switch to any camera but that won't work with the oculus cameras. so if they turned off then won't turn on until I shutdown the application.

    I checked in the net for a solution and there was a script that helped me somehow but it will kill the system performance . (maybe because the cameras are actually running at the same time?... I don't know..)

    so I hope you can tell me if you had the chance to work with the Oculus dk2.

    Note: I plan on creating a multiple choice questions for a training purpose.


    thanks.
     
    Last edited: Apr 5, 2015
  29. Emre_U

    Emre_U

    Joined:
    Jan 27, 2015
    Posts:
    49
    Hi Tony, Again again me,

    I solved yellow messages. But I have (as always) a new problem.

    My on Trigger Enter setups as below shown in image link. I have a player + empty area colliderboxes where I used as triggers to start convos. Double trigger is only fires when anything gets in any of the triggers. So I can cover areas in scene with multiple colliders.

    But problem is anything that get in collider boxes start the convo. I mean not just player ( I have random moving NPCs). OnTriggerEnter fires up for NPCs too.

    I have read this from documentation : "
    • The new version of PhysX in Unity 5 registers OnTriggerEnter if two colliders are touching when they start. If you have any Dialogue System triggers (conversation, bark, etc.) set to OnTriggerEnter, you may need to set the Condition's Tag or GameObject so it doesn't trigger at the start of the scene."
    But then I don't know where I should set such a tag in Dialogue system. Cause when I try to work with On Trigger Enter (Conversation Trigger) due to it is being a DLL I can't get in code to write down OnTriggerEnter(Collider other) + if (other.tag== "Player"),
    I am looking for a convenient way of doing this is in Dialogue System or else I could call colliders to my script and call for conversations from a main script. But I felt like it is wrong and I am missing something.

    My setup is below in imgur images.

    http://imgur.com/a/hO8Tb
     
  30. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Hi @unit102 - Yes, the Dialogue System supports Oculus DK2. Assign your OVRCameraController to the Dialogue Manager's Alternate Camera Object field as described in the Camera Settings section of the manual. I haven't yet tested this in conjunction with Adventure Creator. I'll send you a PM.

    Hi @Emre_U - On your Conversation Trigger's Condition, increase Accepted Tags to 1 and add "Player".

    p.s. - The source is included if you ever do need to dig into it. (See How to Unpack the Source Code) But it's more convenient to use the DLLs because recompiles of your project are much faster if Unity doesn't have to also recompile all of the Dialogue System's editor scripts.
     
  31. unit102

    unit102

    Joined:
    Nov 13, 2014
    Posts:
    26
    Hello TonyLi,

    I tried it as you instructed but it did not work :(

    I loaded the quest demo and everything works fine with the default camera.
    I did the following:

    *I added the OVRcameraRig into Player.

    *I deactivated the default camera and did the following:

    *I added the "OVRcameraRig" into the Alternate Camera Object as you said
    *I also tried replacing it with the Left Camera (just incase that would work...but didn't help with the following steps)


    (1)I copied the "smooth camera with bumper" into the (OVRcameraRig only) and tested the scene (didn't work)
    (2)I copied the script into the MainCamera (Left Camera) only (didn't work)
    (3)I copied the script into both (left & right) cameras (didn't work)
    (4) I removed this script from the cameras and tested the scene, also nothing works.

    Please point me to the right direction if I missed something.
    I see a white dot in the editor (I presume its my mouse Aim?) I also tried pointing it at any of the soldiers but nothing got highlighted..
    I only see the text (names) of the Soldiers in top of their heads. I can't kill the enemies if I tried getting close to them or in front of them! so there is something wrong with the Aim system? ...


    I own another script which works fine for me, I wonder if you tried it . Its called "NoTouchGUI for VR" that works fine for me but no conversation system either :(

    anyway, I will wait to hear from you. if the Aim works (if you got a demo to try it would be excellent) then i guess everything else should work.

    thanks
     
  32. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Hi @unit102 - Does your scene also have Adventure Creator? Or is it just the Quest Example scene that comes with the Dialogue System? If it's the Quest Example scene, I'll post instructions for integrating DK2. If the scene also has Adventure Creator, I'll need a few days to test it.

    Remember that this is a dialogue system plugin, not a shooter framework. :) The aim/fire system is very rudimentary. It does a raycast from the camera to the center of the screen. If the player model blocks the raycast, it won't hit NPCs. You can fix this by changing the player's layer to Ignore Raycast.
     
  33. unit102

    unit102

    Joined:
    Nov 13, 2014
    Posts:
    26
    just Dialogue System, I removed Adventure Creator because the author doesn't have DK2 and can't help, neither the community managed to help me out. so I dropped it and used alternative assets like Playmaker and few others. so far I managed to produce results but now I am at the core of the project and need dialogue !
    so I hope I get yours working.
    thanks.
     
  34. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Hi @unit102 - Sorry for the delay. My DK2 was flaking out, and I couldn't get it to do anything for hours. I finally went back to an earlier video driver and it's working now. I'll put together an example scene tomorrow and post it here.
     
  35. unit102

    unit102

    Joined:
    Nov 13, 2014
    Posts:
    26
    take my advice, add the video to your collection! its a selling point, write that your asset works with DK2.
    I personally didn't see many Assets advertising so much about DK2 support unless I asked and experiment myself...its a hot gadget in the market ! next to it is the Gear VR (but Samsung might continue to release multiple versions :\ )
    I wonder if you can integrate the raycast to to highlight the conversation choices and simply use mouse click or any shortcut to be a select action .. something similar to Gear VR

    thanks.
     
  36. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    @TonyLi,
    I'm trying to figure out save & load system, to use it on objects in a world and I'm a bit dissapointed. So every object needs to have unique variable name. Right?

    This basically means, that in order to use it on objects like enemies, crates, barrels that are placed as prefabs in a scene, I have to write my own serialization system?
     
  37. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Thanks for the suggestion -- I'll make VR support more prominent. There's no standard input style for VR yet. In the past, developers have used gamepad navigation or buttons assigned to specific response slots. In the example scene, I'll use look-to-select instead.

    Hi @Gua - No, you just need to assign a unique variable name to each object. You could write a script to automatically assign unique IDs. This is what frameworks like Adventure Creator do. If you don't want to do this, you could use a traditional serializing save system such as Easy Save 2, and simply feed the Dialogue System's state into that save system as described in this FAQ.
     
  38. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    Do you know any creative solution for unique IDs problem, for Playmaker user?
     
  39. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    I'll add this to version 1.5.0. It won't make it into today's release (1.4.9). And I'll send you an advance copy when it's ready.
     
  40. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
  41. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Hi @Licarell - They should all tie in nicely, and without any scripting since they all include PlayMaker actions. For example, if you insult an NPC in a conversation (Dialogue System), after enough abuse their affinity might go negative (Love/Hate), at which point they'll stop the conversation and attack you instead (AI Bots for PlayMaker).

    You can start the conversation with a Dialogue System PlayMaker action, check the affinity with a Love/Hate PlayMaker action (probably triggered off a Dialogue System PlayMaker "OnConversationEnd" event), and make the NPC attack using an AI Bots for PlayMaker action.
     
  42. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    I love it when all the kids play nice in the sandbox....
     
    TonyLi likes this.
  43. hike1

    hike1

    Joined:
    Sep 6, 2009
    Posts:
    401
  44. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
  45. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
  46. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    @TonyLi Thank you! You're awesome! I have another question.

    1. I save game.
    2. Destroy enemy that has persistent components.
    3. I load game and enemy isn't there.

    If I understand correctly, that is how it should work, but obviously this is not what I want. So, is the re an easy solution for this problem or I need to create some kind of manager, with arrays and stuff?
     
    Last edited: Apr 8, 2015
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Hi @Gua - If you're using a Persistent Destructible component, can you just not add it? If that doesn't meet your needs, can you please explain what you want? Thanks!
     
  48. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    @TonyLi If I don't add it, I'll get same result. At least if I load game withing same scene. I just want that enemy to be destroyed if he was destroyed when I hit save button or to be "alive" if he was "alive" when I hit save. No matter what happened to enemy after I saved game.

    I'm basically trying to make standard fps quicksave system and trying to figure out if it possible to make it with Dialogue Manager. I know that it does help me with RFPS Player stuff and other objects position, but at this point, I'm not sure that 1.4.8 can help me track if object was enabled/disabled, destroyed/alive when I was saving and return it to the same state when I load the game. I know, that to save advanced changes to the objects using playmaker I need to wait for 1.4.9, but I was under impression that persistent components cover stuff like enabled/disabled, destroyed/alive already.
     
    Last edited: Apr 8, 2015
  49. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Hi @Gua - I'm about to post the notice about 1.4.9 now. I still don't understand. If you want to remember in a saved game (or when switching levels) if something was destroyed, you should add a Persistent Destructible component. You said "this is not what I want" but I don't understand why. Can you describe what you want in each scenario? Please feel free to PM me if you prefer.
     
  50. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,569
    Dialogue System 1.4.9 Released!

    The Dialogue System v1.4.9 is now available on the Pixel Crushers customer download site! (PM me your Asset Store invoice number if you need access.) It should be available on the Asset Store in a few days.

    Highlights:
    • You can now add custom field types to dialogue databases. (Requires scripting.)
    • Updated support packages for a large number of products, including Adventure Creator, RPG Kit, ICode/AI for Mecanim, UFPS, and more. For some reason, a lot of products introduced breaking changes to their APIs in the past few weeks. The updated support packages work with the new APIs.


    Version 1.4.9

    Core
    • Added: Can now add custom field types to dialogue databases.
    • Changed: "Disable internal sequencer commands" checkbox has been removed from Dialogue Manager, accessible only via script now.
    • Fixed: If StartConversation() was told to start at a terminating entry, it skipped the entry.
    • Fixed: If a Quest/Item table element was changed from a table to a different type, QuestLog.GetAllQuests() returned an error.
    • (Unity UI) Added: Unity UI Button Key Trigger component.
    • (Unity UI) Changed: PC Image is now a Sprite Image instead of a Raw Image, to be consistent with the other UI elements.
    • (Unity GUI) Improved: Left-aligned word-wrapped typewriter text doesn't backtrack words at end of line any more.
    Third Party Support
    • Action-RPG Starter Kit: Improved inventory syncing during conversations.
    • Adventure Creator: Updated for AC 1.43; fixed bug that raised error when building.
    • AI for Mecanim / ICode: Updated for change to ICode.
    • Core GameKit: Updated for Core GameKit 3.2.4.
    • Master Audio: Updated for Master Audio 3.5.7.7
    • NGUI: Added an NGUI Quest Tracker HUD.
    • NLua: Added precompiled DLL package for NLua in Unity 5.
    • PlayMaker: Added FSM events OnRecordPersistentData, OnApplyPersistentData, OnLevelWillBeUnloaded.
    • RPG Kit: Updated for RPG Kit 3.0.
    • S-Inventory: Updated for S-Inventory 1.23; fixed bug in RemoveItem() when item was equipped.
    • UFPS: Updated for UFPS 1.5.0; updated for Unity 5 / UFPS 1.4.9 cursor lock issue.
     
    Gua and hopeful like this.