Strange Behavior

0 favourites
  • 8 posts
From the Asset Store
Strange factory themed set of tiles for your platformer game
  • Situation 1: When I try to make the user input appear only if it isn't already there.

    <img src="" border="0">

    Situation 1 Output:

    <img src="" border="0">

    It seems like half of the gray background box is cut off, and the text that is supposed to spawn doesn't appear at all.

    Situation 2: The 'old code' that works, but if multiple spawn points are selected then the user input box will appear multiple times and overlap with itself.

    <img src="" border="0">

    Situation 2 Output:

    <img src="" border="0">

    Basically I'm trying to prevent the gray user input box from spawning multiple times and overlapping with itself if the user selects a different spawn point. My logic is that I should just be able to check if the box count = 0 before spawning the user input box, but that seems to prevent half the box from displaying in the first place (and the instructions text isn't there either).


  • You wont get rid of me by making a new thread <img src="smileys/smiley17.gif" border="0" align="middle" />

    Looking at your capx atm but havent really found your issue yet. But... is there any reason why you create and destroy the menu each time? cant you just make the menu visible/invisible each time?

    There is also an issue with your tooltip not going away if you go from 1 spawntype to another. (because your destroy funtion only destroys the tooltip if you are not hovering over one of the spawnpoints) So if you get the tooltip for Hack and then move the mouse directly to Bitware then the tooltip for Hack will stay.

  • cvp hahaha, to be honest I generally post problems here as I'm working on solving them and if I find a solution before someone else does, I usually delete the thread.

    I think performance-wise, you are correct that I should be making the menu visible/invisible instead of constantly creating and destroying it. I'll go ahead and make that change now, and then work on addressing the second issue you mentioned.

  • cvp I've updated the .capx so the program spawn window is on its own separate layer that is invisible when a spawn point isn't selected and visible when one has been selected.

  • Excal

    The reason why you are only seeing ? a menu background is because you spawn it half way out of your layout.

    Your image origin on the menu background (ProgramSpawnBG) is in the middle. I tried setting the Y value of the ProgramSpawnBG orgin to 0. That made the whole menu show.

  • I'm a little confused. Are you talking about the origin of the ProgramSpawnBG sprite, which would be in the middle of the sprite?

    Or are you referring to where the ProgramSpawnBG sprite is spawned?

    <img src="" border="0" />

    EDIT: Nevermind, I see what you mean now.

  • Excal

    Dont know if you noticed.. but i am a bit bored today <img src="smileys/smiley1.gif" border="0" align="middle">

    You already have a family for your menu objects. So why not use them to reduce the amount of code you have?

    I have made a few alterations. Have a look at this .capx it should do the same as your code. But with less code.

    I moved your menu variables up to the family level as they were all the same. Then instead of calling a function for each i put those together as well.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • cvp thanks for cleaning up my code :)

    I noticed you removed all the separate program spawn functions and added a single spawn function. It's definitely a lot cleaner.

    I sent you a PM. I've having some issues creating an inventory system and might need some help ;)

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