LiteSnacks's Forum Posts

  • this looks good. thanks for the reply.

  • say there is an event that must compare values on multiple array cells in say a 5 x 5 area in a for each X&Y loop.

    for example, if I wanted to compare all cells in a 5 x 5 area to be equal to 0. The first thing that comes to mind is:

    for each XY element:

    compare at XY X: array.curX Y: array.curY Value = 0

    compare at XY X: array.curX + 1 Y: array.curY Value = 0

    compare at XY X: array.curX + 2 Y: array.curY Value = 0

    compare at XY X: array.curX + 3 Y: array.curY Value = 0

    compare at XY X: array.curX + 4 Y: array.curY Value = 0

    compare at XY X: array.curX Y: array.curY + 1 Value = 0

    compare at XY X: array.curX + 1 Y: array.curY + 1 Value = 0

    ... & so on until compare at XY X: array.curX + 4 Y: array.curY + 4 Value = 0

    -----> [action]

    this would work, but it's awfully spacious. Any thoughts on applying some form of math or technique to shorten this but still be able to check all 25 conditions?

    Hope this was clear enough, much appreciated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How do I immediately place "canvas snapshot" .jpg into hard drive folder?

  • How do I compare two strings in an expression?

    more specifically use the conditional operator inside an expression; for example: textBox.text [is equal to] "" ? [do some action] : [do some other action].

    Thanks

  • awesome, thanks.

  • Maybe use the "compare two values" condition. Something like

    condition: [sprite].AnimationName = "Machine Gun"

    ---> action: set your fire rate to a number

  • There are several expressions that look animations. Use the "AnimationName" expression to return the Name of the current animation your gun object is using.

    ex. "someObject.AnimationName"

  • After downloading an array in JSON format, the "load" action cannot read exactly what was downloaded b/c of several issues w/ the JSON. How do I manipulate the JSON so it may be loaded & read properly?

  • Hello,

    Is there any way to have an object using the platform behavior have additional jumps in midair past 1. Such as 3, 5, or infinite jumps w/o touching "solid" ground

  • Excellent, thank you.

  • Hello,

    When changing the layer angle, actions interacting w/ the X & Y coordinates seem to hold their original position as if the layer angle was still set to default. For example, if i had a bullet shoot an angle towards mouse.x & mouse.y, the bullet will not travel towards the pointer if the layer angle was not set to the default angle. Here's is an quick example; holding the mouse over the target while not on the pole will not cause the bullet to travel to the target:

    drive.google.com/a/bgcsc.org/fi ... sp=sharing

    How do i make it so the bullet always travels toward the mouse point while any layer angle?

  • It seems most gravity based platformers run into a common obstacle: maintaining smooth motion w/ changes to the angle of gravity. If you're not familiar, you have the option to adjust the angle of gravity for your player performing platform based motions. For example, i may want to adjust the gravity angle upwards (-90/270 deg.) if my player fancies walking on the ceiling, whereas the traditional is preset downward (90 deg.), the floor. Simple enough, well here's the catch: however we may choose to turn that angle of gravity, at that point, the gravity is altered, and the relative speed of the player is altered to match the new change in gravity. For example, i program the angle of gravity to flip 180 deg. when a player gets close enough to the ceiling so he may walk on it, but the results are a rebound effect; this is b/c of the jump speed (& direction w/ the angle) being carried over after the new change in gravity has taken effect.

    We have figured out that adjusting the Y vector, along w/ a few other actions, solve this problem. However, the motions are choppy w/ platforms that are approached at an angle adjustment other than 180, or varying gravitational values based on distance.

    This may be difficult to grasp, but if you have ever made a serious attempt at a grav. based platformer, you have most likely encountered this issue. May we introduce a platform behavior option to maintain the same motion when the angle of gravity is adjusted?

  • Try using the "Pick instance by UID" condition, the value being "[sprite].count -1". This should select the newest instance. You could also try comparing the distance to the player & picking the instance w/ the lowest distance.

  • Thanks to all who viewed. Solved by inverting the Y vector.

  • Hello,

    So i was hoping someone could help me w/ some gravity angle issues.

    I have it so that when a platform behavior sprite jumps from one wall to another wall of a different angle of orientation, when the sprite gets close enough to the new wall, the angle of gravity changes so the sprite will land on the wall it was jumping to. (kinda like if i wanted a player to jump from the floor to the ceiling)

    My issue here is when the sprite reaches a close enough distance to the wall to change its angle of gravity, when it does change the gravity angle, the speed of the sprite is retained & immediately changes the direction of the sprite away form the wall.

    Here is an example:

    drive.google.com/a/bgcsc.org/file/d/0B0x-KI1Z396RZ293UWpscG91ZzQ/view

    Thoughts & comments on this are much appreciated, i'm sure many others are having this issues w/ this.