Search Unity

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

Beginning 3D Game Development with Unity

Discussion in 'Community Learning & Teaching' started by k3D-Junkie, Jun 20, 2011.

  1. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    oops- it looks like I gave you the wrong info for the chest inside (that's what happens when I'm on a different machine- no cut and paste) -

    it should be :
    Crowbar Icon,0,Crowbar,0

    not Crowbar Icon,0,Crowbar Icon,0 (in Fig.14-2)

    state 0 for the crowbar is in the scene, 1 is not in the scene

    my apologies! editing previous post now

    so this should make the crowbar appear in the chest
    if it doesn't, do this:
    test 1- select the crowbar and see if it is active
    test 2- if it is active, focus in on it to see where it is
     
    Last edited: Aug 10, 2012
  2. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Thanks, the crowbar now works ok, but not the golden sleeve; the look up data that I have for it is:
    LookUpState 0
    element 0: default,1,Golden Sleeve Icon,1
    element 1: Crowbar Icon,1,Crowbar With Sleeve,1,Crowbar Icon,0

    Is this correct?

    PS Neither does the ChestInside object deactivate.
     
    Last edited: Aug 10, 2012
  3. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    looking at page 657, fig 14-2 doesn't have the golden sleeve as one of the objects you can add, so that would explain that!


    select the ChestInside object
    increase the size of both the Lookup State 0 and Reply State 0 to 5
    for the new Lookup State Element 4, add:
    Golden Sleeve Icon,1,Golden Sleeve,0
    this should deactivate chest inside (its state 1) and activate the Golden Sleeve (its state 0)
    change the message for Reply State 4 to something like:
    You carefully place the golden sleeve into the chest.

    if you wanted to add the combo object, you would need to add it as well (and set its drop type to 1)

    I checked my post publish edits file and that Fig. 14-2 was not in there, but definitely should be corrected and added!

    hope this helps!
     
  4. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Thanks Sue. I now have another problem! I've added the ChestChecker object and the animation together with all the code up to page 662 but the sequence on p662 doesn't work. I cannot drop anything into the chest because ChestInside switches itself off as soon as I pick an object. I've made sure the LockPlate doesn't overlap ChestInside.
     
  5. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    What do you mean by " ChestInside switches itself off as soon as I pick an object"?
    When you pick any object?

    When you pick any action object, that's when ChestChecker is activated, I wonder if it's turning ChestInside off instead of on?
     
  6. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    I have done some more exploring. When I run the game the ChestInside object is deactivated (off); then when I go through the full chest sequence and pick in turn the rock, the key, the key from the inventory, insert key, turn key, open lid, pick message, pick ViewMessage at each turn the ChestInside Object is activated and .5 seconds later deactivated. So, its not possible to drop anything into the chest.
    CheckState is called by ObjectLookup, but I can see nothing wrong there.
     
  7. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    okay, let's see if we can narrow it down

    in the DropBox script, OnTriggerEnter function, after the if(other.name ==....line, add:
    print(other.name);

    until you get the message out of the chest, it should only find ChestBase and Message
    once you have the message, it should only find (print out) ChestBase

    oh, and be sure to clear the console regularly while you are testing

    if it only reports ChestBase, copy paste the contents of DropBox I'll see if I can spot the problem

    Sue
     
  8. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Thanks Sue

    I do not get any reference to message, so here's a copy of DropBox

    #pragma strict

    var dropBox : GameObject; // The locaation/object this box is checking
    var contents : GameObject; // The object currently found in the dropBox

    function OnTriggerEnter (other : Collider)
    {

    if (other.name == dropBox.name)
    {print ("other.name " + other.name + " dropBox.name " + dropBox.name);
    return;
    }
    //print ("other.gameObject.tag" + other.gameObject.tag + "1");
    if (other.gameObject.tag == ("ActionObject " || "ActionObject"))
    //print (other.gameObject.name);
    contents = other.gameObject; // Store the found action object
    dropBox.GetComponent (Interactor).currentState = 1;
    dropBox.active = false;
    }

    function CheckState ()
    {
    yield new WaitForSeconds (0.5); // Allow auxiliary objects to finish processing
    // Turn on the drop box
    dropBox.active = true;
    contents = null; // Clear the contents before the next check
    dropBox.GetComponent (Interactor).currentState = 0;
    animation.Play(); // Do the intersection check

    }

    PS I only get a ChestInside report; no mention of message or ChestBase.
     
    Last edited: Aug 14, 2012
  9. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    what object have you got assigned for the dropBox var? ChestInside?

    also, this bit:
    if (other.gameObject.tag == ("ActionObject " || "ActionObject"))

    should be:
    if (other.gameObject.tag == "ActionObject") {

    first, you don't need the extra ()- the or operator, ||, is always evaluated before the ==
    and since you are checking for "ActionObject " or "ActionObject " , the same thing, you only need it once

    but I suspect the culprit is the missing {
    without that, the code below the if line all gets evaluated- including the dropBox.active = false;

    and that will leave you short a closing } for the function also

    so the OnTriggerEnter function should look like:

    function OnTriggerEnter (other : Collider)
    {

    if (other.name == dropBox.name) return;

    print ("other.name " + other.name + " dropBox.name " + dropBox.name);

    if (other.gameObject.tag == "ActionObject")
    {
    //print (other.gameObject.name);
    contents = other.gameObject; // Store the found action object
    dropBox.GetComponent (Interactor).currentState = 1;
    dropBox.active = false;
    }
    }

    as for the print line, sorry, I should have said under, not after the if(other.name ==....line

    hopefully, this gets you sorted out!
     
    Last edited: Aug 14, 2012
  10. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Sorted! Many thanks, Sue. I am puzzled as to why the Unity compiler didn't pick up the missing }.

    Another puzzle; I have managed to get the combo object to work, but have had to set up the ObjectLookup state 0 element 5 to:

    Crowbar with Sleeve Icon,1,Crowbar with Sleeve,1,Crowbar with Sleeve Icon,0

    whereas the golden sleeve object uses:

    Golden Sleeve Icon,1,Golden Sleeve,0,Golden Sleeve Icon,1

    what puzzles me is why the difference between the states of two objects?

    Tony

    PS I have overwritten Animation Tests/Flower.fbx in my Project folder with flower.fbx from the Book Asset/Fixed Flower folder, but it doesn't seem to have had any effect. The cull still deletes the flower when looking at the jewel. What have I done wrong?
     
    Last edited: Aug 16, 2012
  11. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    compiler didn't pick up the missing { because you were also missing the closing one to that if block- so as long as they all have mates, the compiler is happy.

    As to what's puzzling you, I set it up so that state 0 for an object was its startup state in the scene
    The golden sleeve starts out in scene,0, then goes to state 1, out of scene
    Crowbar with Sleeve starts out of scene, 0, then goes to being in scene, 1


    At the time, that seemed easier as you set up an object to set the states in the order they were used
    also, if you had an object that was never out of the scene, it only would need one state

    If we defined 0 as the state not in scene for all objects, then that particular object would need two states- even if it never used one...which would clutter the Inspector and take longer to set up.

    But now, I'm thinking with copy paste of components as one of the improvements to 4.0, it wouldn't be as much of a pain to set up and it would make reading the data easier. So seriously thinking of changing that convention for the next version of the book. We are already doing that for the icons, but then they are less complicated than the 3D objects.

    (btw- adding characters and dialogue trees t next version of book :) )

    glad you're moving forward again!

    Sue
     
  12. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Thanks for the explanation, Sue; roll on the next version of the book. This time I'll get the hard copy rather than the e-book with all those poorly digitized copies of Interactor and Object Lookup settings; not one of Apress's strong points!

    Can I tax your patience once more? I have overwritten Animation Tests/Flower.fbx in my Project folder with flower.fbx from the Book Asset/Fixed Flower folder, but it doesn't seem to have had any effect. The cull still deletes the flower when looking at the jewel. What have I done wrong?

    Tony

    PS And here's another challenge! I'm using Unity 3.5.5, which has a very different particle system.....!
     
    Last edited: Aug 18, 2012
  13. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    hi Tony,

    Haven't had time to look into the flower yet- you might try turning on Gizmos in the Game window selecting the stem(?). That way you can see where the engine thinks the bounding box is. It may also be that you are just too close. For the flower picking sequence, you will eventually add a camera match to move the player back far enough to watch the animation,

    Re particles- forgot about those :)
    I need to rewrite them for Shuriken. Nice thing is the Shuriken parameters are a lot easier to decipher. Let me know if you have any problems I'll post the settings.

    Re hard copy vs e version. The images in the book were pretty bad too. For the next version, I think I'll go ahead and just put all of the Inspector shots into a pdf that will be part of the download. I'll just have to make sure the copy editor drones don't reduce those too far as well.

    Sue
     
  14. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Thanks again Sue

    I've managed to get a sort of pouring action with the vial and have moved on....towards another problem. I have finished the "Scripting the Camera Match" section, but when I run the program I get a Null Reference Exception

    NullReferenceException: Object reference not set to an instance of an object
    CameraMatchData+$DoTheJob$63+$.MoveNext () (at Assets/Adventure Scripts/CameraMatchData.js:24)
    UnityEngine.GameObject:SendMessage(String)
    ObjectLookup:LookUpState(GameObject, Int32, String) (at Assets/Adventure Scripts/ObjectLookup.js:128)
    Interactor:OnMouseDown() (at Assets/Adventure Scripts/Interactor.js:343)
    UnityEngine.SendMouseEvents:DoSendMouseEvents()

    I have attached a copy of CameraMatchData, where the exception occurs. As far as I can see it is the camMatch variable that is causing the problem; I have set that up in GameManager as per the text.
     

    Attached Files:

  15. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Mea culpa, again! I've been back over the coding and have made good omissions from CameraMatchData. It's now working ok.

    With apologies

    Tony
     
  16. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Sue

    A couple of newbie questions. How do I ensure an empty gameobject is located in the same place as an existing object? I've tried creating one on an in-focus object, but for some reason the pivot point is way off-centre. How do I ensure the pivot point and centre coincide?
     
  17. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    Hi Tony,

    Unity doesn't have proper align object A to object B functionality. I suspect you either adjusted the viewport after doing a focus, or you might be focusing on a group rather than one of its children. I usually assume there will need to be some manual adjusting done.

    Sue
     
  18. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Hi Sue

    Thanks for this; I'll double check what I did. However, after duplicating an object should I add the empty to it before or after moving it to its new location?

    And another puzzle; why should an object that appears in the scene view disappear form the game view when I run the project.

    Tony

    PS The only change I have made is to raise the level of the terrain so the object doesn't float above a hole in the ground. I have now done the same with both the shrine light and the shrine safe keep and both disappear from the game view in play mode, but not from the scene view.
     
    Last edited: Sep 6, 2012
  19. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    Disappearing in Game window???? Now that's strange. One idea though- in Player settings, try turning off Static and Dynamic batching
    you might also try turning on Gizmos in the game window and select the missing objects to see if they are really there
    and you could try using a different material to see if it is the material that is disappearing


    For adding objects to empty gameObjects, the only time you need to add the regular gameObject to the empty one first is if the child has an animation on it (specifically, a transform). And you will need to move the new empty (parent) to the child first.
     
  20. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Hi Sue

    I've discovered what was wrong. Somehow, raising the ground level using the paint height tool turned off the objects' (both the light shrine and the safekeep ,shrine) layers. I have now set these to default and it all works ok.

    Best wishes

    Tony Holland

    PS I shall be away for a few days now, so you should be left in peace!
     
  21. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Hi Sue

    Back again! I've been making steady progress, but have now come across another puzzle. I can find the Topi Fruit but when I click on it and get the message "You carefully put the Topi Fruit into your pack", the Topi Fruit disappears (ie it doesn't appear in the inventory). I have checked and double checked the coding and the Interactor and ObjectLookup settings, which all look ok; what have I missed?

    Best wishes

    Tony Holland
     
  22. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    hi Tony,

    looks like that is is one of the images that was wrong snuck by me and the test guys - page 725
    it is missing the instructions to put the Topi Fruit Icon into inventory

    For Topi Fruit Sack,
    Lookup State 1, element 0 should be:
    default,0,Topi Fruit Icon,1,Door Lower,1
     
  23. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Thanks Sue, that's done the trick.

    I have a couple of real newbie questions:

    - In the Lookup State element you've just given me to what do the numbers 0, 1 and 1 refer? Is it the Lookup State of the Topi Fruit Sack (the object picked), or is to the default cursor, Topi Fruit Icon and Door Lower, respectively, Lookup States? I guess this is unlikely in the case of the Topi Fruit Icon and Door Lower because they don't have a Lookup State 1, so I am confused!

    - What selects the Interactor location and visibility elements?
     
  24. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    this is part of the state engine you are creating
    state engine:
    needs object- that's the object that is picked, in this case, the Topi Fruit Sack
    needs its current state- that's 1 in this case, the code gets that as soon as it is picked
    now it needs to know what cursor picked it- that was the default cursor
    since it is in state 1, it looks under Lookup State 1 to see if it finds a match for the default cursor

    default,0,Topi Fruit Icon,1,Door Lower,1

    in the Lookup State data, the first part of the string is the cursor you are checking for a match with the actual one that picked the object
    the next piece of data is the state the object will go into if there was a match, 0 in this case
    so now you have confirmed the event (pick with a valid cursor) and the state the object needs to go into

    with this info, you have all you need to transition the object into its new state
    using the new state number, you will do all the animation, audio and text that is associated with the object- all of that is contained in the Interactor script
    in this case, the Topi Fruit Sack goes into its state 0- out of scene

    what it doesn't have yet is all the other objects that have actions associated with that object's state change- in this case, the Topi Fruit Icon that goes into inventory and the door that opens

    that's where the remainder of the data comes in
    after the first two bits, all the rest, the auxiliary objects, and their new states are always entered in pairs

    so the Topi Fruit Icon goes into its state 1 - inventory/cursor objects always have the same 3 states, 0 is out of scene, 1 is in inventory and 2 is as cursor
    so 1 put the Topi Fruit Icon object into inventory

    the last auxiliary pair is the door
    it goes into its state 1 , open

    here's a pretty good link for the basics of state engines: http://d0server1.fnal.gov/www/online_computing/Meetings/Weekly/M_990507/StateTutorial.pdf
    ours is complicated because it doesn't have a single solution for each state

    see page 442 for the Location and visibility definitions
    Location is the object's physical state/location in the scene- it's not the best word to use, but we are already using state
    in scene, out of scene, in scene but not pickable, etc

    Visibility is how the object goes in or out of the scene
    the Key atLock appears, then stays in the scene when it goes from its state 0 to 1
    the Vial of Elixir appears, does its thing, then disappears
    the rock starts and stays in scene

    hope that helps
     
  25. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Hi Sue

    Many thanks for your helpful explanation; I can follow all of it except the Door Lower,1 - how does it go into state 1 when there is no Object Lookup Lookup State 1? Do action objects have their own state table similar to eg the location table?

    I have done something strange to the Temple of Tizzlebrat object, which has lost half of its passageway to the cavern. Is there any way I can replace it without having to go back to the beginning of chapter 14?

    Best wishes

    Tony
     
  26. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    hi Tony,

    Door Lower,1
    means put the door into its state 1
    you send 1, the new state, directly to the door's ProcessObject function that triggers any action associated with getting it into state 1 (in this case open the door)
    you don't even use a lookup table for the door because you are manually telling it to go into state 1 regardless of its current state

    but if the user picks an action object, you must find out what state it is in and what object picked it before you know what its new state will be. So yes, each object has its own lookup table- it's the data in the ObjectLookup component. By getting the object's state, you know which "row" to look in, and by matching the cursor (column 1), you find the state to put it into, (column 2)
    the rest of the entries are for triggering anything beyond the animations,audio text that live in the Interactor data for the object, or for that matter, any other object

    in a conventional table, you might have the states in a column on the left, and the cursors along a row on the top, where the two intersect in the table, you would find the the number that is the new state. But that style of table doesn't allow for all of the extra things that might need to be done

    Theoretically, since the player never interacts with the door, it doesn't really need an ObjectLookup script/component.

    Re passageway:
    did the cavern get moved? Do you need its correct position in relation to the temple?

    Sue
     
  27. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Thanks again Sue.

    I have moved the cavern and tried to get it back again, but it still looks as if the bottom of the corridor has been sliced off horizontally removing the lower half of the corridor and the entry to the cavern. I'm not sure if relocating the cavern to its correct position will repair the damage, but I'm willing to give it a go, if I knew how.

    Best wishes

    Tony Holland

    PS I've managed to swap the damaged Temple of Tizzleblat for an undamaged one, and after much trial and error got all the bits back together again.
     
    Last edited: Oct 5, 2012
  28. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Hi Sue

    I have now got as far as page 812 and have another problem! Try as I might, I cannot get the camera position process to work for the trunk opening sequence. I have followed the text exactly, but rather than focusing on the trunk opening, the first person controller returns to its original position. The TargetTrunkOpening object won't Align With View; it also realigns with the original location of the fpc. What am I missing?

    Best wishes

    Tony Holland
     
  29. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    not sure- sounds like it is backwards? the targets?
    but you got the other camera matches to work?


    I had a look a the code over the weekend and decided it needed a revamp and simplify.
    I'll let you know when I get it finished
     
  30. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Sue, thanks. Yes, the other camera matches work fine. I'll try to turn the target around and see if that works.

    I now have another problem, this time with the Hanging Fruit Topi/Topi Fruit Hanging. The topi fruit hanging object drops from the tree of life as soon as the final level is started rather than waiting until the tree is tapped with the sleeved crowbar. When the tree is tapped after the tree of life appears hanging topi fruit clones are listed in the hierarchy view but they are not instantiated and don't appear in the game view. There seems to be something missing from the multiple topis text; Figure 15-40 shows a message that doesn't appear in any of the ObjectLookup replies.

    Sorry to be a further pain, but you did say beta testers are welcome!

    Best wishes

    Tony
     
  31. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Hi

    I've discovered what was wrong, tho' I don't know why it happened.

    I cloned the topi fruit trunk and positioned it in the branches of the tree. However, when I subsequently dragged it into the Hanging Topi Fruit prefab its transform went all over the shop, somewhere in deep outer space I think! I have now manually reset the transform position co-ordinates and it works OK

    Any idea why this happened?

    Best wishes

    Tony Holland
     
    Last edited: Oct 19, 2012
  32. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    ok, I think I figured out what happened- after you clone it, it needs to be removed from the group so it doesn't get influenced by the parent transforms before you update the prefab

    here's what happens:
    two objects at 0,0,0
    make B a child of A
    move A to 10,10,10
    B still shows as 0,0,0
    here's the deal, as soon as you take B out of the group, Unity updates its position to 10,10,10
    once on its own, with its true location, not just an offset location, it can be used to update a prefab
     
  33. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Thanks Sue.

    I think there may be an error on page 829:

    if (pos.y > Screen.height - 5.0 pos.x < 5.0 !menuMode)
    miniMenu = true;
    MenuMode (true);
    only works without the MenuMode line; otherwise menuMode is always true and none of the seklections relying on its being false can be accessed.

    Best wishes

    Tony Holland
     
    Last edited: Oct 23, 2012
  34. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    I'm not doing very well! I added a line to the conditional, but left out the curly brackets. They're now in and it works fine.
     
  35. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    On the contrary, Tony, you've been able to solve or work around your last two problems on your own - I'd say that's very good progress.
    Problem solving is, after all, a major part of game development!
     
  36. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Thanks for the encouragement, Sue - now I need a bit more!

    I've got as far as page 864. The "Suspend Navigation and Scene Interaction Finishing Menus" section worked fine. However, now that I am part way through the Real-Time Background section the game has stopped reacting to keyboard input. The camera preview in the scene view shows that the first person controller is reacting as expected to mouse input; its just that that isn't translated into any game movement. I have checked and re-checked coding and cannot find anything amiss. Can you suggest where I should look for a breakdown in game communication?
     
  37. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Another learning experience! I don't know what I did wrong, but I have now corrected it. I deleted the new camera I had created and re-did the process and it works ok. (I think I may not have turned off the camera component of the new camera).

    Incidentally, the StartScene prefab is pretty hard to find, buried away in the Structures/Materials folder...perhaps a hint in the next version?
     
  38. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Sue

    I have another query - this time about Point Light FX (page 775). I can get it to work ok on the drawer until I move it to the first person controller; doesn't it need a clone with a different name before it is moved to the fpc?
     
  39. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Sue

    I have reached page 878 and am getting two types of error message:

    var c ps[9] is an object that doesn't support slicing
    var ao is an object that doesn't support 'active', 'currentState' or 'transform'.

    Is this something that has changed with Unity version 3.5.6?
     
  40. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Sue

    I've solved that problem - it was caused by the" #pragma strict" instruction, which is generated by the editor at the top of the script.

    Now I have another. I'm running the book chapter 16 finished project on Unity 3.5.6 and Windows Vista Home Premium. Now when I save a game the MonoDevelop editor freezes. Any idea why this is happening?

    A couple more things: I've had an index out of range error thrown by the lockplate. The reason I've discovered is because the chestlid Interactor is changing the lockplate's key to 3, when it should be to 2; p.634 Table 13 - 4 at the end of the state 1 entry.

    Figure 13 -19, which should include the chestlid's Interactor data, in fact duplicates that of the message icon, which is the subject of Figure 13 - 20.
     
    Last edited: Nov 9, 2012
  41. colinboyd

    colinboyd

    Joined:
    Nov 16, 2012
    Posts:
    2
    Hello Sue,
    Colin Boyd here from InfiniteSkills, I'd very much like to speak with you about an authoring project, I can be contacted at colinboyd (at) infiniteskills (dot) com
     
  42. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Hi Sue.

    I'm sorry to bother you again, but I've finished chapter 16 and have found that in edit mode, the game view is blacked out rather than showing what can be seen in the camera preview. I have noticed that the same thing happens in the book version and in the Game Bonus version. Please could you explain why this happens and how I can prevent it?

    Best wishers

    Tony Holland
     
  43. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    Hi Tony,

    there's a Fade Out from Black object in the scene- just deactivate it while you are still editing

    a better way would probably instantiate it at scene start (it's already a prefab), but that would mean one more script
    and I seem to remember I sometimes got a flash of the scene before it got instantiated

    Re Mono Develop, I found it not very stable too, that's why I was still using the old UniSciTE editor to finish the book
    hasn't been too bad lately though, maybe something got fixed in 4.0?

    Sue
     
  44. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    Thanks Sue, and thanks for a brilliant book. I've greatly enjoyed coding your game and learnt a lot; now I must try going solo!

    Tony
     
  45. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    Glad you enjoyed it :)

    PM me if you are interested in beta testing the next version's chapter on Dialogue Trees and Characters with Mecanim. There are two characters that will help the player get through the game (or a slightly different version of it, anyway). The chapter is pretty much stand alone, but might even work with the current book.

    Sue
     
  46. tyria101

    tyria101

    Joined:
    Nov 26, 2012
    Posts:
    1
    Looks like a rad book 3d junkie!
     
  47. tholland

    tholland

    Joined:
    May 28, 2009
    Posts:
    129
    I'd be glad to give it a go; can I download the chapter?

    Tony
     
  48. TheVillageWizard

    TheVillageWizard

    Joined:
    Dec 3, 2012
    Posts:
    2
    Hi Sue,

    I'm very much enjoying the book. I'm only on Chapter five and I already understand the basic structure of Unity better than after watching/reading any number of videos or other online tutorials. I'm working on the FPAdventurerController script as described in Chapter five and have hit a snag. It doesn't seem to recognize rotationSpeed or rotationSensitivity. I can't find where those variables are set. I am using Unity 4.0.0f7, so I figure that might be the issue. So my questions are:

    1. Do you have any guidance in this current issue?
    2. Will I be able to complete the book project in this v.4 Unity that I'm using without too many fixes?
    3. Is there a postpub doc for using the book with Unity v.4x?

    Thanks,
    Rick Bruce
     
  49. TheVillageWizard

    TheVillageWizard

    Joined:
    Dec 3, 2012
    Posts:
    2
    My mistake. I took a peek at the finished script in the downloads. Somehow I must have missed where you told me to set the variables. I somehow thought that they were being inherited. Sorry to trouble you. I'll get back to enjoying the book now. :)

    Thanks,
    Rick
     
  50. Freespirit

    Freespirit

    Joined:
    Dec 4, 2012
    Posts:
    4
    Just bought your book Sue and having a quick flick through it looks like its going to be the best book I ever read. So well written and so much detail. Can't wait to start in the new year. I have to finish a 2D app first , how boring lol. Loving this thread and your great support of it.

    Russ.