NicotineLL's Forum Posts

  • Yes, thank you! That's works like a charm.

  • How on button pressed to remove the last character from a sprite font? There's an append action (Append Text), but no way to remove a letter.

    This is pretty much what I want to do:

    Variable = "Value"
    Text = Variable
    Letter = "Q"
    
    On Button A pressed -> Text -> Append Letter
                        -> System -> Set Variable to TextSprite.Text
    On Button B pressed -> Text -> Remove Last Letter?
                        -> System -> Set Variable to TextSprite.Text
    
    // On A pressed will output "ValueQ" and I need on each B press to remove one letter from the back
    [/code:3hv1bxii]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've been banging my head on creating a realistic movement for a simple Pong game. After hours of trying to make the whole solid sprites + bullet ball idea to work properly I finally gave up and started doing it with physics. There was a huge improvement and the ball seems to bounce very realistically. However, for some reason if it's moving too slow it will stick to a wall.

    Here's an example, just run it and wait for the ball to hit a wall at a sharp angle.

    https://www.dropbox.com/s/0p5z1jvngoe1k ... .capx?dl=0

  • MaorKeshet that seem like over-complicating things a little. For example how do you plan to apply your system with the following conditions:

    • layouts are selected at random (random levels)
    • not every layout is a level (we have a menu layout, objects layout, etc.)

    And come on, it's not the worst thing selecting stuff by name. Look at jQuery - the whole library is built on this principle and it has been the first choice of web developers for years

  • Refeuh that seems to be the more organized way to do it (even though using groups can make the events sheet neat as well), and if you have layout count in the vicinity of 10 that's fine, but on a larger scale it seems the more practical way to put everything in a single sheet. And in the case that this does not compromise the performance of the game (thank you ErekT for clearing that out) it's like... why do it otherwise at all?

    The only downfall I've encountered is that there is no option to perform event on specific layouts, but with a bit of trickery it can be done. Something like naming layouts "Level1, Level2, Level3, etc.", getting the current layout name, storing it in a global variable and comparing that variable to the layout name:

    On layout start:

    var CurrentLayoutName = LayoutName

    if CurrentLevelName == "Level1" -> do events on this layout in particular

  • I'm developing a game that would have 100+ layouts for different levels, but I'd like to use a single event sheet on them all. That would mean that this event sheet would probably get around 200+ events.

    So the main question is - is it better to have 1 event sheet for general options and include it on a multiple layout event sheets (with the Include Event Sheet) with specific options for different levels or just have 1 major event sheet for all layouts (what I plan to do)? How would this and would it at all affect the performance of the game? Don't you think that it'd be kind of impractical if something has to be changed and we have to go through all the event sheets? Plus the UI of Construct will be permanently filled with tabs.

    E.g. If I have an HTML 10x10 table and I want to make every cell to hold a text of a hex color number and a background with the HEX color I can either go and do that with 100 CSS classes or just dynamically read the HEX and apply the style with JavaScript, if you know what I mean

  • I couldn't quite understand your question. You have a single tower that does 2 types of damage - ranged and melee, correct? Or you have two different towers 1 is ranged and 1 melee?

    This is pretty straight forward:

    Object -> Is Playing -> Animation Name -> Set this damage

    For the damage you can use the random expression. Say you want to do between 50 and 100 damage per hit you can assign it to random(50,100) or if you want only round numbers floor(random(50,100)). Using this for randomly assigning a critical hit could work as well - randomly hit for a random damage between 150 and 200.

  • Elliott this does work, but it bugs out on a special occasion - if the object is tapped ever so slightly for a fraction of a second there's no time for the variable to be created and the event executed so a full jump is performed.

    I'm attaching a file so you can see for yourself. Try tapping the mouse button veeery slightly.

  • Elliott this is pretty much like my first suggestion. It works, but if you release either left or right (most of the time the player uses those to navigate where he/she is landing) that will cut the jump short.

    So you want to stop the jump prematurely if you release the touch? Sorry it's a little confusing. Not sure why you cant just use touch end?

    Yes, that's exactly what I'm trying to do - stop the jump when the jump object is no longer touched, but it seems impossible or at least not straight forward with the given options.

    Wherever I looked people talked about this Touch End option, but I don't have such a thing, not just Touch End. I've On Any Touch End that triggers when any of my 3 touch objects is released and On Nth Touch End that triggers on touch count not on object.

  • I searched high and low and there is no up-to-date information on this function.

    I have a platformer and I want to cut the jump mid air if touch is released. On keyboard/gamepad it's more than easy to do:

    - On Key Press -> Jump
    [ul]
    	[li]On Key Release && Is Jumping -> Fall[/code:m7qzts7u][/li]
    [/ul]
    However there's no release on touch... I've 3 objects for controls - "TouchLeft", "TouchRight" and "TouchJump". This first part is easy
    [code:m7qzts7u]- Is Touching Object "TouchJump" -> Jump[/code:m7qzts7u]
    
    Now here's what I got for the second part so far, but it's all faulty:
    [ul]
    [li][code:m7qzts7u]On any touch end && Is Jumping -> Fall /* works, but that means that if the player releases "TouchLeft" the jump will be cut also */[/code:m7qzts7u][/li]
    [li][code:m7qzts7u]Is NOT Touching Object "JumpTouch" && Is Jumping -> Fall /* Buggy on touch, breaks keyboard and gamepad controls */ [/code:m7qzts7u][/li]
    [li][code:m7qzts7u]Is Touching Object "TouchJump" -> Is NOT Touching Object "TouchJump" && Is Jumping -> Fall /* This does not work for obvious reasons, but I decided to share it nevertheless */[/code:m7qzts7u][/li][/ul]
    
    Any ideas?
  • Because I have no experience in making games or anything I decided my first project to be and recreate the gameplay of "Thomas Was Alone". I'm attaching the Construct 2 file so you can check it out for yourselves (I'm not 100% sure but you might need the personal license at least to open the project).

    There was several things however I could not do right, most of you might think these are just cosmetic issues, but they really bug me I'd love if you guys can help me out a little.

    1. Characters float 1 pixel above ground - I think this is something to do with the physics engine. Both characters have platform, physics and solid behaviours and the ground has solid and physics. The reason I did it like that is because I wanted to make both characters to be able to stack on top of each other (physics), but at the same time to not "freeze" (if only solid) when switched. That's why I think physics are important behaviours for them and cannot do without. The ground has physics because they'd otherwise fall through. If all physics are disabled they "land" on the platform but I loose important behaviours.

    2. Characters should not be able to push each other - Even though I ranked the physics values density and friction to the max they are still able to push each other around.

    3. Character slides when on top of the other - If you've played the original game you'd know that when one of the characters jumps on the "head" of one of the others it'd stay there when the bottom character moves. However mine slide away. I could not think of a way to fix that with friction or anything...

    4. Theres an event chat checks and respawns the character to its original position if it falls outside of the layout, it works fine but for some reason it respawns 2-3 times. I think it might be because I have a System->Wait->0.2 action bound to it, but I need that event for when the character dies in the water. My other option is to create a whole different event for when it falls outside the boundaries, but I was trying to avoid that...

    5. Character slides away when it hits his "head" on a ground platform and has jumping animation. The animation action is no longer present in the file, but I just thought I'd ask anyway. The jumping animation has frames with different sizes, making the rectangle stretch vertically, that makes the engine behave as if the character is stuck inside the ground object and pushes it away to the left or right. I think that I might be able to fix this if I create an event when it hits its head - switch to default animation, but I haven't really tried that.

    Other than that I think I got it quite accurate to the original with the exception of some animations and effects, but after all it's just for education. If you've played Thomas Was Alone, please do let me know if you notice any gameplay feature I'm missing Just to finish it off I will probably add all characters and they respective skills when I have more time to play around with it.

  • Hello,

    I'm Georgi. I'm a front-end developer and a huge fan of "games" I've wanted to create my own years ago (when I was younger and had a bunch of free time), but I never had the patience to learn the "C" or similar programing languages.

    I found out about Construct 2 on some sort of a chart for best JavaScript based game engines or something, only to get addicted I love how the developers have made it easy to do basic casual games without the need of coding. Good luck to them and you all, and have fun.

    P.S. as a true fan of XBox 360 controllers I deeply appreciate the fact that there is a support for them in the engine!