LittleStain's Forum Posts

  • Working within limitations brings out our creative side..

  • I thought this was very clear:

    Global variables keep their current value - they are not reset. To reset them use the system action Reset global variables.

    If you have an event that on start of layout changes global variables, that event will be run because of the restart of the layout..

    Global means that they are reachable from every eventsheet, so it doesn't make a difference on which event sheet they are..

  • I can't imagine why..

    I have had no issues at all..

    Try this:

    Download this 9-patch.png

    create a new 9-patch object

    load the png

    keep all the settings as is

    it should deform perfectly while keeping the edges the same

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Mobile limitations

    Safari on iOS and Chrome for Android share a limitation in playing music. While sound effects can be played at any time, music is only allowed to start playing when the user touches the screen. This is a limitation in the browsers themselves. As a result, if you play music on the start of layout, you may find in these browsers it does not actually start until the next touch.

    Safari on iOS has a further limitation that no audio can play at all until the first touch. In other words, audio starts off muted and the first touch unmutes audio playback.

    Usually you do not need to handle this in your events. If you try to play sound or music on 'start of layout', the audio object will automatically queue it up for playback the next time the user touches the screen. However you should be aware of this when designing your game. If the first touch changes layout or stops the music, then the music may never be heard. You may want to start playback then encourage the user to touch the screen with a 'Play' icon or something similar.

  • on touch - object set object bullet angle of motion to: angle(object.x,object.y,touch.x,touch.y) it should work as wanted..

    If the object isn't moving yet you will have to set the bullet-speed too ( it has to be set before setting the angle if I recall right)

    This site has a good manual and many tutorials, I'd recommend reading them to get better grips on working with events and expressions.

    Even if they are not for the exact purposes you want, there is still a lot to learn from them regarding working with construct2 in general.

  • From the manual:

    Restart layout

    Restart the current layout. Note that unlike Go to layout, this action resets all event groups to their initial activation state. Global variables keep their current value - they are not reset. To reset them use the system action Reset global variables.

    So global variables will be kept at their current state

    All things not global will re-initiate..

  • Should be as simple as:

    on key pressed start timer

    on key released stop timer

    on timer - special attack

  • through the browser object you can check if the game is in portrait or landscape

    Using the viewportleft, viewportright, viewportbottom and viewporttop, you can get the exact size of the game and change things accordingly.

    It's possible to make completely responsive design this way, scaling layers and or exchanging sprites etc. , depending on the different circumstances.

  • You should check the collision-polygon of your sprites.

    Probably they change during animation so there somtimes are overlaps which cause the getting stuck.

    Using a "hitbox" can delete this problem.

    If you need the sprites to be the "hitboxes" just make sure all events other than the movement relate to the sprite.

    otherwise make sure the collision-polygon stays relatively the same during the animation so unexpected overlaps are avoided.

  • first check if the oldx and oldy are the same as self.x and self.y

    if so the object is not moving and what you'd like to happen can be added in events

    use an else statement to set oldx to self.x and oldy to self.y

  • Strange..

    What image are you using and what are the settings?

  • Try using the 9-patch-object instead of the sprite-object, It is specifically meant for this..

  • This will make my project a lot easier..

  • [attachment=0:1q2a1k8l][/attachment:1q2a1k8l]

    And now for something completely different:

    Wat-Is-Open is a web-app made with Construct2 showing in real-time which bars/clubs are open in the little town of Hilversum (the Netherlands).

    Right now version 0.5 is out for testing across devices and getting feedback.

    It can be used on desktops, laptops, tablets, but is mostly intended for mobile phones.

    It's actually pretty simple, but I've finally made something usable.

    By selecting a marker on the map one can get more information about the establishments.

    Unfortunately, there are still some issues with the geolocation at this time.

    Test it yourself here!

    If at all possible I will expand to other cities later on, offcourse..

    (It'd just consist of adding more info to the database)

  • Change the second chassis in:

    • chassis create distance joint to chassis

    into frontwing1 and everything should work as expected..