Forum rules - please read before posting.

Quite a few questions from an AC noob :)

edited August 2014 in Engine development
Hi guys, 

Sorry im very new here and naturally have a lot of questions/issues:

When I interact with something just as I click the mouse button I get a flash of text (where the real mouse pointer is) showing the text that hovers over the hotspots, how do I stop this?

Also I need to know how to turn the mouse off completely, its still flashing up on and off quite often when I have a hotspot in view. 

Is it possible to have "questions"? I want to interact with a vending machine and have it say do you wish to buy? rather than automatically buying when you click (edit, silly question, ignore that I see theres options for that now!). Also is there any concept of money? so you can buy things and collect money etc? Also is there a control flow, like to handle actual conversations with multiple answers? Or do we need another asset for that?

I also am looking for a way to stop being able to interact with things a long way away, ie I need to be close to highlight and use.

- I followed the tutorial for letting a player enter their own name, its great :) one thing I notices is that [var:0] is flashing up visibly before it swaps it for my name, perhaps this just needs to be done to the string before printing or whatever. I.e I believe its a bug.

- if you use Dialog play speech and no character the text is too far down in the box and looks really strange, if you use character then it shows a character name from the variable itself, ideally id much prefer to enter my own text them sometimes, is it possible to customise this, or simply remove the gap at the top and have the text centred nicely in a box of its own?

- I have been trying to get something to teleport due to an interaction, ive added action type objects teleport and specified the 2 objects, object to move has moveable on it (and sits in _setGeometry), and the other is an empty game object with the marker script on it (sitting in _Navigation/markers) - they are both on ignoreRaycast layer, shouldnt this make it teleport? it doesnt seem to happen. Also maybe I didnt read docs well enough (been working on this for a few hard days) but I dont see exact instructions anywhere for this and a few other things?

- Another issue is after I click resume in the pause menu I still have to hit p again to really unpause the game (im using ufps)

And finally, I cannot get inventory to show using an interaction I have tried with key presses, and also "turn on menu" (tried "3" and "Inventory", etc they dont turn it on, however it does show if I use "manual" enabled on start, so it is weird). 

Thanks again, sorry for the huge amount of questions.
After a rocky start where I was getting frustrated I have now managed to add in functionality that would have taken me weeks to add and im excited to keep learning this asset, so thanks very much for that!.. 

Gareth

Comments

  • Welcome to the forums!
    When I interact with something just as I click the mouse button I get a
    flash of text (where the real mouse pointer is) showing the text that
    hovers over the hotspots, how do I stop this?

    From the Menu Manager, delete the Hotspot Menu (or to just disable it, check the Start game locked off box)
    Also I need to know how to turn the mouse off completely, its still
    flashing up on and off quite often when I have a hotspot in view.

    The hardware cursor, or the texture one?  Look inside the Cursor Manager, you should find what you need in there.
    Is it possible to have "questions"? I want to interact with a vending
    machine and have it say do you wish to buy? rather than automatically
    buying when you click (edit, silly question, ignore that I
    see theres options for that now!). Also is there any concept of money?
    so you can buy things and collect money etc? Also is there a control
    flow, like to handle actual conversations with multiple answers? Or do
    we need another asset for that?
    You can create Conversations, which provide a list of options on-screen for the player.  More than just dialogue options (as in the demo game), Conversations can be used to let the player make any kind of choice.

    As for money, go to the Inventory Manager and create an Inventory item called Money.  Check Can carry multiple?, and if you've also got Carry on start? checked, you can specify how many units of currency you're carrying.  To deduct currency, use the Inventory: Add or remove Action - when you set it up to remove Money, you'll be able to decide how much money to remove.  And to check if you have enough money, use the Inventory: Check Action - when you select Money, you'll be able to query how much exactly the Player is carrying, and act accordingly.  It's best to do this from within the ActionList Editor window, rather than the Inspector, because it's easier to visualise in there.
    I also am looking for a way to stop being able to interact with things a
    long way away, ie I need to be close to highlight and use.

    At the bottom of the Settings Manager, reduce the Hotspot ray length value. This value determines the distance (in Unity units) that the mouse can "see" from the camera.  For more fine-tuning, you can have the player pass through Triggers that enable/disable Hotspots as well.
    I followed the tutorial for letting a player enter their own name, its great
    one thing I notices is that [var:0] is flashing up visibly before it
    swaps it for my name, perhaps this just needs to be done to the string
    before printing or whatever. I.e I believe its a bug.
    It is, and will be fixed in 1.38.
    if you use Dialog play speech and no character the text is too far
    down in the box and looks really strange, if you use character then it
    shows a character name from the variable itself, ideally id much prefer
    to enter my own text them sometimes, is it possible to customise this,
    or simply remove the gap at the top and have the text centred nicely in a
    box of its own?

    Speech without a speaking Character is known as narration (as explained in the help box inside the Action).  The Subtitles menu, by default, is set to display speech both with a speaker and without.  Within the Speech Menu's properties, Display speech of type is set to All.  You can change this to Characters Only, and then create your own Menu that's set to Narration Only - best thing is to copy/paste the original, and edit it.
    I have been trying to get something to teleport due to an interaction,
    ive added action type objects teleport and specified the 2 objects,
    object to move has moveable on it (and sits in _setGeometry), and the
    other is an empty game object with the marker script on it (sitting in
    _Navigation/markers) - they are both on ignoreRaycast layer, shouldnt
    this make it teleport? it doesnt seem to happen. Also maybe I didnt read
    docs well enough (been working on this for a few hard days) but I dont
    see exact instructions anywhere for this and a few other things?
    The object doesn't need the Moveable script on it - only if you want to use the Object: Transform Action on it.  Rather than create an empty object and add the Marker script, know that you can create Markers from the Scene Manager.
    Another issue is after I click resume in the pause menu I still have to hit p again to really unpause the game (im using ufps)
    What is "p" tied to in your InputManager?  Your game will be paused for as long as there are any Menus active with Pause game when enabled? checked.
    And finally, I cannot get inventory to show using an interaction I have
    tried with key presses, and also "turn on menu" (tried "3" and
    "Inventory", etc they dont turn it on, however it does show if I use
    "manual" enabled on start, so it is weird).
    It depends on the Menu's Appear type.  When set to Manual, the Menu: Change state Action can be used to turn it on.  The name of the menu, "Inventory", is what you need to enter.
  • Wow thanks so much, this will keep me going for days!! I will look into each thing, so thanks very much for the support. 

    One other thing Im facing now is that I want to set a variable for when someone is inside somewhere. Its a bar, so I have a trigger covering the whole room, Ive had to add a second trigger script to the trigger (Im assuming this is wrong? but it does work), the first trigger is onEnter variable set global "inBar" = True, and the second is onExit variable set global "inBar" = False, this works great, I see the variable change in real time as I enter and exit the bar. Now for the actual question, how do I access this from my other scripts? I want for example to press a button when in the bar and something will happen, but I need to access the "inBar" variable in order to do this (to know if theyre in the bar). Thanks in advance, Im finding this very powerful, but I also think many things I want i will have to delve off into my own scripts too which is totally fine, the game already feels tenfold more pro with the hotspots working and I cant wait to implement cash!.. 
  • OK Wow, AC.GlobalVariables.GetBooleanValue(1); did it, liking this more and more, sorry for all the noise, im splashing around with AC hehe... One thing I liked about UFPS is that they precursor all scripts with VP_ it might sound like a mess of refactoring but it really helps i think, I have so many assets in here the only time im comfortable im getting the right scripts is when im using vp_ ones as there is absolutely no ambiguity. 


  • edited August 2014
    just on the off chance before I code it, do you have any support for sort of ongoing events? Ive read a lot of docs and I think not, its far too specific really, but what Im doing is when the guy is in the bar he can drink, and doing so should increase a meter of some kind, the whole while he is in there, periodically charging him for the drinks, is there anything like this is or is this something where I have to get my hands dirty? Ironic that part of me wants to get my hands dirty because these assets are all so powerful lol - seriously though Id rather tap into something nice thats been written than write it. :-)
  • On another note when I try to use the AdvancedPlayer from UFPS (which is far better than the generic one you use in the tutorial, because you get everything set up like guns etc) my camera goes wild, when you get a few minutes do you think you could try setting up the most advanced prefab from ufps (advancedplayer I think) with AC, and see if you encounter any issues? For now I have no guns etc in my game as Im working with AC, I tried to go to my main prefab I was using but as I say the camera shuddered as if there were 2. 
  • I haven't had any issues getting the AdvancedPlayer prefab set up with AC by using the same method, so long as weapons aren't involved.  I've been sent a breakdown on how someone else managed to get weapon cameras integrated, though, which I'll be putting into a tutorial soon.  The extra "weapon" camera is likely the culprit of any issue.

    As for ongoing events, know that you can set Cutscenes to Run In Background via a setting at the top of their Inspector.  This lets you run them without blocking gameplay (so the Pause action becomes a Wait, for example).  You can also use the Menu system to create a Slider, the value of which is linked to a float Global Variable in your Variables Manager.

  • thanks for that, could you tell me how I grab a value from my inventory from code? I want to see how many money items my guy has, then set a meter showing the amount of cash, the meter is my own creation, so really I just need to know how I programatically get at the amount of money I have in the Inventory?

    Cheers.
    gaz.
  • actually got it thanks:

    Debug.Log ("UPDATE THE BAR");

    EnergyBar eb = bar.GetComponent<EnergyBar>();
    if (whichBar.Equals("TOLERANCE"))
    {
    Debug.Log("SET TOLERANCE LEVEL");
    eb.SetValueF(0.1f);
    }
    if (whichBar.Equals("MONEY"))
    {
    Debug.Log("SET MONEY LEVEL");

    Debug.Log("INVENTORY CONTENTS:");
    //set real cash from inventory
    GameObject pe = GameObject.Find("PersistentEngine");
    RuntimeInventory rti = pe.GetComponent<RuntimeInventory>();
    List<InvItem> items = rti.localItems;
    for (int i = 0; i < items.Count; i++) // Loop through List with for
    {
    Debug.Log(i+"/ "+items[i].label);
    if (items[i].label.Equals("Money"))
    {
    Debug.Log("Money found, player has: "+items[i].count);
    float cash = items[i].count;
    cash /= 1000;
    Debug.Log("now setting cash meter:"+cash);
    eb.SetValueF(cash);
    }
    }


    }

  • Hi Chris,
    Regarding the earlier mentioned problem of Hotspot appearing at a real cursor position, I experience the same problem. This is not to do with disabling the hotspot menu, if it is disabled - there is no hotspot name at all. The problem occurs in the first person view. When the game cursor is over a hotspot, the name of that hotspot is correctly displayed right above the game cursor, however once I click to use this hotspot, the name briefly jumps to the location of Windows mouse cursor and then back again to the game cursor. These two cursors are in different positions of the screen, due to the difference in their movement speed I guess. So the question is, how to stop the Hotspot name jumping to the Win mouse position at the time of click?
  • @Vadbag: Can't recreate.  Could you post a shot of your Hotspot menu, and tell me if you're using First Person or Ultimate FPS?  I'm assuming this is occuring when the cursor is "locked" in the centre of the screen, yes?
  • I'm using the UFPS. Yes, the cursor is locked in the centre, otherwse it will be moving all over screen :) How do I post my screen? If I simply drag it into my message the forum says that body is too long.
  • Just take a screengrab and upload it to imgur, or whichever image hosting you prefer, and post the link to it.
  • edited September 2014
    May be fixed in 1.39 - hopefully out this week.  Let me know if it persists after upgrading - sorry for the vagueness, but like I said I can't recreate this - only go by my instinct.
  • Nope, not fixed, unfortunately. And in new hardware mode the cursor doesn't stay in the centre of the screen, just moves in place of Win cursor.
  • By it's nature, the Hardware cursor won't be able to force itself in the centre of the screen - otherwise you wouldn't be able to close the game window.

    However, I have managed to finally recreate this, so I'll be able to fix it - thanks for your patience.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.