gluii's Recent Forum Activity

  • When talking to NPCs I want to click on them to bring up the next line of text. I have figured out a way that I like but it's only happening once.

    My code is-

    *Player_is overlapping_NPC ---> set text to- NPC.Variable=0?"blah,balh,blah":"nothing"&NPC.variable=1?"blah,blah,blah":"nothing"&NPC.variable =2?"blah,blah,blah":"nothing"&NPC.variable=3?"blah,blah,blah":"nothing"

    Subevent

    *on NPC clicked----> Add 1 to Variable

    When I click on the NPC it shows the 1st line of text, then when I click the second time it's shows the 2nd line. But if I try clicking anymore times it does nothing and stays the same.

    Does this mean i Cannot use the ?: indefinitely? Only twice?

  • Actually, I must have had a brain freeze, you don't need chooseindex.

    Just use Array.At(0,counter)

    Oh that makes it so much easier. Thank you so much for your help 😊 XD!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Counter is just a name of a variable. When the dialogue starts, set counter to 0. Each time a dialogue line is shown, you need to increase it by 1. (up to the maximum number of lines)

    Oops sorry I see,ok it worked! Thank you so much for your help I appreciate it!😊

  • choose() expression does exactly that - picks one random option.

    You probably need chooseindex() expression.

    Set Text To---> Chooseindex(counter, Array.At(0,1)Array.At(0,2), Array.At(0,3))

    After each time increase the counter variable.

    Thank you, I’m not sure if I’m typing it wrong but it will not let me type in “Counter” ,I’m not sure why. it’ll just replace it with “cos” or suggest another expression saying (Unkown Expresstion- this is not a system expression or variable name in this scope)

    I typed — chooseindex(counter, Array.At(0,1)Array.At(0,2), Array.At(0,3))

    I have this in a sub event, is that the problem? Is this on my end?

  • I have an Array I'm using to have conversations with NPCs. I want to progress the dialuge each time the Space Bar is pressed ,which I know how to do, but instead of going in order it shows up each element at random.

    I used this code

    *When Player---> Overlaping NPC

    *Set Text To---> Choose(Array.At(0,1)Array.At(0,2), Array.At(0,3))

    I want to progress the Text Array from 1 to 3 for example but it's picking them at random like 3,1,2.

    How do I call elements in Array in oder on each Axis?

  • To open the file I sent in a Google Drive link:

    Step 1: Click on Open local file

    Step 2: Open the file I sent to you to download:

    Magic, you get the project, assets and all the code and the comments. If any more questions. I'm watiting for them ^^

    Oh thanks for explaining that to me and especially using pics for visual aid, that helped alot. And the project you sent was exactly what I need thank so much 😊.

    I just need help with the last pare if you can,walking "Behind The Building" and it goes non-solid & transparent

  • Here are some pictures of the result in my Google Drive link above:

    Outside

    Inside

    Standing on ugly stairs

    Standing near NPC levitating

    Quit the building by same doors

    Thank you, does this have the code for making the outer pic of the building stay invisible while inside then going back visible when walking out? Cause thats all i need now. I actually got walking inside and out and the outer pic of the building going invisible down. I just need help with the last part, walking "Behind The Building" and it goes non-solid & transparent. If your able to help with this I'd very much love it thanks.

    Oh and the link, peps have given me links to download like this before but I'm still not sure what it is let alone know how to use it. I just know it's their project that's all. How do I use your link above?

  • Hello, can I check only the object that the player touches to make the invisibility of only the wall that the player touches. And then it turns out only as in the screenshot

    Thank you, though I have finished the part were I can make the outside pic of the building invisible when the player walks inside. But now I just need help with the last part. Making the building go non-solid and transparent when the player walks behind the building. If you may help with that I love that^^

  • gluii

    Try this:

    1) Set a boolean variable to "true" indicating when a building has been entered. This can be a global if you only have one building or if you have many buildings try with an instance variable for each one.

    2) Set up a condition checking for the value of that variable, if it is "true" then do what ever needs to be done to show the inside of a building. If it is "false" then you do what needs to be done to show the outside of the building.

    3) Set up a condition block to set the variable back to "false". This one should only work, when you are on top of the door AND you press the appropriate keys (maybe the up arrow?) AND the variable itself has a value of "true". That way you can be absolutely sure it will only be turned to "false" at the right time.

    What ever you choose to do, you might run into the problem of entering and exiting very quickly out of the building as long as your character is on top of the door. So you might need some additional conditions to make sure that the actions to enter/exit the building are not executed in rapid succession.

    Hope that helps.

    Thank you, I actually got the walking inside and outside part down. I just need the last part, walking behind the building. I need the building solid and visible but non-solid and transparent when the player walks behind it. If ya know anything about that that would be great 👍

  • Hi. Sorry for the delay, my not Working Construct 3 notifications at their finest.

    Did you get your answer? If not, I will do something quickly with my screenshot from a few days ago with a shareable link with the feature you try to do.

    Maybe people here need more info about what you want, but I understood since the beginning what you want to do, don't worry ^^

    Yes It did and thank you for your help. I'm not sure if everyone got it but one person has helped me with a code that works. Now I'm working on the Boolean for the door, I don't think I'm doing it right. When I walk to the door the outside skin disappears correctly but only while I'm overlapping the door. I need the door to act like a button were when I pass by the door the outer skin disappears and stays that way until I overlap the door again then it'll go back. Do you know how i can do this?

  • For a couple objects in my project I have instance variables set as Booleans so I my have and Action playout. I am trying to get a Boolian to turn ON and stay ON until I turn it off. For example a simple button for a light but also a leaver to move platforms then when moving leaver back platforms stop, and or when the player walks threw a door the environment changes then when walking back threw it changes back.

    I mostly want the Door mechaniqe. 🚪 My goal is to get it were when player walks inside a door the outer skin disappears (which I got down) but says invisible until the player walks back out the door.

    Currently the outer skin disappears after I've walked away from the door shape and the outer skins returns will I'm inside the building and can't see.

    May I have help please? Thank you^

  • > We're you able to see my other reply to you?

    Looks like I missed it.

    > I'd like the transparency to happen when the player is about a quarter or so up the buildings length so it looks the the building is grounded on the floor.

    You can add additional conditions to the "Is overlapping" checks. For example, check that Player.BBoxBottom<=Building.BBoxBottom

    You can also pin an invisible sprite to each building with a slightly smaller collision mask than the building. And check for overlapping with that sprite.

    What does the "Player.BBoxBottom<=Building.BBoxBottom" look like in code, or is it an instance variable?

gluii's avatar

gluii

Member since 9 Jun, 2022

None one is following gluii yet!

Trophy Case

  • 2-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

5/44
How to earn trophies