How do I make buildings transparent when walking behind them?

1 favourites
From the Asset Store
Buildings - Isometric view - PNG transparent - multi styles, multi fonctions buildings
  • 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.

  • Hi. Sorry, I missed time tonight. I will try my best to send you here a Goole drive link with an MVP Construct 3 project.

    Have a nice night!

  • 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

  • Here as promised gluii

    drive.google.com/file/d/1x5XpXEEzvyZt4mVxhyKaig1efdCbwXQB/view

    Don't mind the ugly shameful stairs attempt or my gravity try, focus on the fact that this is working as you wanted it to.

    I added a lot of comments. Tell me if something is wrong with the link.

  • 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

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

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

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

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

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi.

    Behind The Building and it goes non-solid & transparent

    ?

    Easy, I will update my test Construct 3 project and his Google Drive link when I will have time. Expect possibly a few days before this update since I'm a bit busy right now ^^

    Have a nice day!

  • Here is the update for being able to go behind the building. I also updated my comments.

    drive.google.com/file/d/1X6e-cMYF7uWqz8QBsqkP9n1fEvqPOgQ3/view

    Have a nice night!

  • Welp, I forgot about the transparent thing. Will do it soon. Gn!

  • Hi, sorry for the delay, I was really busy.

    Here is a new link with the opacity feature requested.

    drive.google.com/file/d/1VszeSUAdcjoR6lQn60fIvaV978hf7KeR/view

    Have a nice day ^^

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