lukezero's Forum Posts

  • https://www.dropbox.com/s/g1luc68katnnebe/NPC_Example_lukezero.capx?dl=0

    Thanks, dude! I understand now! I've been having a hard time lately programming because I've a lot of roles in this project and I'm really stressed out.

    Thanks a lot for the help! :D

  • It's changing because it's outside of the trigger, and the value is changing randomly.

    In the original project there is no random change. Even so, it is not working properly. :(

    Can you send the corrected CAPX?

    I want to better understand what's going on with the trigger. ^^

  • So, I don't know if this was a demo-translation typo, but the animation name is wrong. It should be "NPC0"&NPC.Level.

    Yes! In the original project it's named correctly. I corrected it here (and I uploaded), but although the NPCs' HUD changes, it is not stable. It keeps changing involuntarily. :(

  • OK, I see now, it's the animation.

    Exactly! The instance variable (of the NPC object family) 'Level' is associated with each of the 3 animations of 'NPC_HUD' object.

  • (My reply seems to be hidden, so...)

    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.

    blackhornet

    Sure! Thanks, dude! :D

    drive.google.com/file/d/1psXHEVFUgJe49Vl8mjVn4EnkeezwjCDy

  • 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

  • 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

  • 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. :(

  • Tomycase

    It didn't worked. :(

  • 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!

  • 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. :)

  • 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.

  • 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!

  • 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?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You will still be able to define a different state in this variable for different NPC sprites.

    Thanks, man! I'll try here. I didn't know that.