CloudDealer's Recent Forum Activity

  • I am going to go on limb here and try to help.

    It's a little bit hard to follow what is going on, but I think what is happening is that the function NPCInteraction2 is not doing what you expect.

    Inside of it you are checking for an NPCID property of the NPCINTERACT family but the check is not against the instance of the family that was picked when the function was called. I will check with Ashley why is that, I have a feeling that is the expected behaviour, but I will ask him to be sure.

    So what ends up happening is that all that state for showing a dialogue is being set on the wrong instance.

    To get around that, I passed the UID of the picked instance in the call to NPCInteraction2 and inside of it I added an extra condition to Pick by comparison in addition to the NPCID condition. That way you can be sure that state is set in the correct instance.

    Something similar then happens in the call to FormatDialogue, so to get around that I added a few arguments.

    In the calls to DialogueLine, FormatDialogue and PickAnswer I pass in an additional argument with the IID of NPCINTERACT family. I did that so that I would be able to use that value in FormatDialogue to use the expressions NPCINTERACT(IID).itemname and NPCINTERACT(IID).interactname and ensure the function is using the correct instance values every time.

    NOTE that UID and IID are different things.

    All of this is quite hard to explain, but I think I covered everything.

    For the UID part, is this what you're asking me to do? I'll try and read some beginner documentation specifically on UIDs, but I don't really get what you mean--

  • Have the smaller ship spawn behind the big ship whilst the big ship is destroyed. And then have the smaller ship follow a similar/the same path.

  • You could probably figure it out with families. I've never experimented with this, so I have no idea. I hope my idea was helpful!

  • Look at Demonoire, it has a great example of a save system using functions and arrays.

  • What do you mean by this? When the person flips the phone?-- I'm confused.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Did you make those functions?

    The functions that are within the project? Those were copied from a tutorial. I read the tutorial, understood what was going on at a pretty good level, and copied.

    Otherwise, no I have not been able to make any new functions/parameters, since I can't seem to understand exactly what I'm supposed to do based on DiegoM's response.

    I was asking for screenshots so I could get a 'clearer' idea of what was going on. I've tried my own few methods based on what I could understand out of the message, watched a few tutorials, and I can't seem to get it to work myself. I'd need Diego to send some screenshots as examples.

  • I still can't figure it out.

  • I am going to go on limb here and try to help.

    It's a little bit hard to follow what is going on, but I think what is happening is that the function NPCInteraction2 is not doing what you expect.

    Inside of it you are checking for an NPCID property of the NPCINTERACT family but the check is not against the instance of the family that was picked when the function was called. I will check with Ashley why is that, I have a feeling that is the expected behaviour, but I will ask him to be sure.

    So what ends up happening is that all that state for showing a dialogue is being set on the wrong instance.

    To get around that, I passed the UID of the picked instance in the call to NPCInteraction2 and inside of it I added an extra condition to Pick by comparison in addition to the NPCID condition. That way you can be sure that state is set in the correct instance.

    Something similar then happens in the call to FormatDialogue, so to get around that I added a few arguments.

    In the calls to DialogueLine, FormatDialogue and PickAnswer I pass in an additional argument with the IID of NPCINTERACT family. I did that so that I would be able to use that value in FormatDialogue to use the expressions NPCINTERACT(IID).itemname and NPCINTERACT(IID).interactname and ensure the function is using the correct instance values every time.

    NOTE that UID and IID are different things.

    All of this is quite hard to explain, but I think I covered everything.

    Could you send me screenshots? It's hard to understand what's going on through text.

    Cheers!

  • This also helps with a lot of questions I had in my head. I'll be using the dictionary for my inventory system!! :D <3

  • I used variable to reference all of these, but itemname and interactname are both strings. Sorry if that was confusing.

  • I'm a beginner to construct specifically, not game making. But, I can try to figure this problem out myself. The issue is that the dialogue doesn't replace the text with the proper variable.

    There's two trashcan, both in the same NPC/Dialogue family. They're referenced as an object called "openable". The programming itself works fine. The only issue is that the variable called "itemname" doesn't change based on the ID of the trashcan you're interacting with.

  • Nah that doesn't help I need to know where I'm looking in the game to test whatever the problem is. Better if you set up a room to test in that demonstrates the problem.

    Does a room like this work?

    (main_test_room4)

    Proj Link:

    drive.google.com/file/d/1sKAPxkhu0CFTRCH5zrkLjsvVAOb-KjI_/view

CloudDealer's avatar

CloudDealer

Member since 7 Mar, 2021

Twitter
CloudDealer has 1 followers

Connect with CloudDealer