Forum rules - please read before posting.

Highlights bothering questions!

edited January 2017 in Technical Q&A
So I am on highlighting of object now but let me get straight to the point.

Is it possible to also use colliders(sphere, box, capsule, not mesh) to the gameobject when using a Hotspot Detection Method of Mouse Over?

I have asked this because;

- when I choose a method of mouse over with mesh collider to the highlight gameobject. The GameObject is highlighting.

- when I choose a method of mouse over with Sphere, Box, Capsule to the highlight gameobject. The GameObject is not highlighting.

but;

- when I choose a method of Player Vicinity (Nearest) with mesh collider to the highlight gameobject. The GameObject is highlighting.

- when I choose a method of Player Vicinity (Nearest) with Sphere, Box, Capsule to the highlight gameobject. The GameObject is also highlighting.


Comments

  • The Collider in question being the one placed on the Hotspot?  There is no restriction on the type of 3D Collider you use - check that it's on the Default layer and Is Trigger is checked.  Please post screenshots showing the GameObject with the issue and its full Inspector.
  • edited January 2017
    Sorry,  it's working. Just didn't realize it early. It is highlighting. Though how do I remove the text when i for example interact, because im using UFPS interaction, and kinda overlaps them in the same position. Solve it by searching the forums. :)

    Edit: Also is it possible to make a gameover screen on AC by editing some managers? Just want to show it on death.

    Another, Is there a tutorial on how to receive a message on AC? Because I want to send my message from UPFS. Or it there is none, I will pass UFPS to Playmaker then to AC. Is that possible theoretically?
  • You can create a GameOver screen either by creating a Menu to show it, or by creating a separate scene and switching to it.  The Menu: Change state Action can be used to turn on any Menu with an Appear type set to Manual, and the Scene: Switch Action can be used to change the current scene.  A series of tutorials on Menus can be found here.

    What message do you want to send to AC?  AC is written in C#, so messages can be recieved just as any other such asset can.  Your question seems more about how you might send one from another asset.  You can see AC's scripting guide here, which details all public functions and variables available.  The most suitable one for you might be ActionList's Interact() function, which allows you to run an ActionList from script.
  • edited January 2017
    Hey, I just want to send UFPS variables, like health. Will look onto your given links.

    EDIT: Based on your given links. I have get the player health from UFPS,

            private void GetPlayerHealth (){
                playerHealth = fpPlayerDamageHandler.CurrentHealth;
            }

    But I'm having a hard time showing the GameOver Menu. Here is my code for it

                if (KickStarter.stateHandler.gameState == GameState.Normal){
                    GetPlayerHealth();
                    if (playerHealth <= 0 ){
                        AC.Menu menu = AC.PlayerMenus.GetMenuWithName("GameOver");
                   
                    }
                }

    How do i show/hide it via code?
  • menu.TurnOn ();

    Be sure that the Menu's Appear type is set to Manual.

    Alternatively, you could do this via AC's ActionLists by reserving an AC global variable for your health, and using:

    AC.GlobalVariables.SetIntegerValue (2, playerHealth);

    To transfer the UFPS variable to AC (where "2" is the ID number of the global AC integer variable you want to affect).  You could then run an AC ActionList Asset, which checks this value and acts accordingly, with:

    myActionListAsset.Interact ();

    Where "myActionListAsset" is a public "AC.ActionListAsset" variable defined at the top of your class and assigned in the Inspector:

    public AC.ActionListAsset myActionListAsset;
  • edited January 2017
    Hello, its me again. I just make that health a global variable on ac. but how do i access it,

    for example while playing, how do I access my health and check if it is 0 or not. Im guessing that it is not through actionlish when turned off or turned off right? or in simple psuedocode "how do I show my gameover menu by checking the health while my health is not in zero"
  • An ActionList asset can do that, and be set to Run In Background.  Use a Variable: Check Action in combination with a Menu: Change state Action.  If the condition is not met, use an Engine: Wait Action to wait for a brief time before re-running the Variable: Check Action.
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.