What's the best way to establish the same HUD object (and their different states) for all NPCs?

0 favourites
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • Good, using this boolean you can pick which NPC is currently talking or interacted with (system event "Pick by comparison"), and then create the HUD sprite next to the NPC, and in the same action set the HUD frame/animation based on the NPC variable, for example if variable = Happy, HUD : set animation to NPC.(your variable), and when exiting the dialog, destroy the HUD object

    Tomycase

    I never used this "Pick by comparision" function before... :(

    If it's not asking too much and/or take your time, you can make an example to me that working?

  • I won't be available to craft an example for the moment, meanwhile I recommend you to check C2 manual about system conditions : scirra.com/manual/124/system-conditions

    There are also a lot of existing topics about the question, a google search should do the job;

  • I won't be available to craft an example for the moment, meanwhile I recommend you to check C2 manual about system conditions : scirra.com/manual/124/system-conditions

    There are also a lot of existing topics about the question, a google search should do the job;

    I'm not able to do this. :(

    But, hey, thanks!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Really, how so if I may ask?

  • Really, how so if I may ask?

    Because I'm very busy with my game (I produce it myself) and I have to show an improved version tomorrow. I have to take care of the graphics and mechanics improvements by programming in time.

  • These presentations work as sub-goals and I have to manage the priority tasks. I like to program (and learn programming logic), but I often run out of time to stop everything and research. This community speeds up a lot with precise resolutions. :)

  • System : Pick by comparison

    Select the object to compare and which parameter from the object to compare (x, y, variable,...), in your case the boolean that determine if the NPC is talking, equal to 1 if true, equal to 0 if false;

    All the actions next to this condition will pick this specific object;

    Don't forget to compare the family and not the individual object so it can pick any object in the family that meet the condition;

    Also I still recommend you to read the manual

  • System : Pick by comparison

    Select the object to compare and which parameter from the object to compare (x, y, variable,...), in your case the boolean that determine if the NPC is talking, equal to 1 if true, equal to 0 if false;

    All the actions next to this condition will pick this specific object;

    Don't forget to compare the family and not the individual object so it can pick any object in the family that meet the condition;

    Also I still recommend you to read the manual

    Thanks, man! :D

    I'll test it soon!

  • Tomycase

    It didn't worked. :(

  • To begin with, you up arrow event should be at the top, it's no use to put it under an every tick event;

    Next, you picked the wrong object in the pick event, you must pick the NPC object and not the HUD itself, as it is the NPC that contains the variable "NPC_State", so in the action event the game knows which NPC to pick to set the HUD animation name;

  • To begin with, you up arrow event should be at the top, it's no use to put it under an every tick event;

    Next, you picked the wrong object in the pick event, you must pick the NPC object and not the HUD itself, as it is the NPC that contains the variable "NPC_State", so in the action event the game knows which NPC to pick to set the HUD animation name;

    It still didn't work, dude. :(

  • Would you mind to send your project so I can take a look into it, thanks

  • Would you mind to send your project so I can take a look into it, thanks

    Tomycase

    Thanks again, dude! :D

    I made an example based on my game, for you to check the problem. Below is the download link:

    4shared.com/s/fIFsOAnRcea

  • R0J0hound blackhornet

    Sorry to bother you, but do you have any suggestions for solving this problem?

    Thank you in advance for your attention and collaboration. :D

  • Can you use another file service? 4shared wants to change notifications in my OS, and I'm not going to let it do that! Dropbox is the safe standard.

    .

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)