wretchedshark's Forum Posts

  • r4dicaldreamer - i believe it is due to the way the range is set up, if you're past the range when you switch over to the other side is just mirrors that angle.

  • r4dicaldreamer - when does this occur? right when you look left or right, or when the mouse is near the center point of the player or?

  • Ashley - just wanted to mention this is in r117 (which i know is a beta <img src="smileys/smiley1.gif" border="0" align="middle" />). it only seems to happen at higher ground speeds in my project (player's x is set every tick to remain stationary while the platforms travel at the player)

    edit: it seems that it happens when the corner of the player connects with the corner of the platform, almost like a falling through the map glitch/bug.

  • Alcemon - ah i see, then i think it is simply a case of how the function in the program handle things

    system - create - each sprite can be set and individual instance variable while the spawning is happening

    sprite - spawn object - setting variables while spawning keeps the original sprites values (in my experience)

    you can do a workaround to get the desired behaviour (using system) or you can use a workaround inside of using sprite - spawn another object.

    this seems handy in that say you have an enemy you could have it spawn direct clones (using sprite spawn another object) or have it spawn weaker clones (using system and setting its health variable or defense etc).

    i will have a look again later and look for more ways to accomplish what you are hoping to achieve within sprite spawning another object <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Rhindon - the easiest way to figure this kind of stuff out is to make a quick prototype to test only the function you want to add <img src="smileys/smiley1.gif" border="0" align="middle">

    animation and picking instances (r117)

  • r4dicaldreamer - here you go, i left some notes in the capx. tag me with wretchedshark if you need any more help <img src="smileys/smiley1.gif" border="0" align="middle">

    aiming platformer capx (r117)

  • Rhindon - (i think) you can just pick them based on their UID and then set their animations that way. it may be easier (less events possibly) to just clone your animation set and crop it so one is the torso up and the other is the legs.

    pseudo sample code:

    -> platform - is moving-

    • sprite pick by ID - [instance UID]

          > set animation "running"

    -> (new event) key is pressed "punchkey"

    • sprite pick by ID - [other instance UID]

         > set animation "punching"

    --

    -> platform is moving

          - key is pressed

              > legs sprite - set animation

              > torso sprite - set animation

    another option is making a "running punch" animation where the player does a little jump while punch (like how people lunge forward when they punch) so it looks like they're leaping forward and then you maybe don't need to animate the legs while running and punching

  • Alcemon - i am curious as to why is it important to spawn them FROM the "default" sprite. why not just spawn them using the system event and then position them according to where the default sprite is spawned?

    it seems a lot less finicky using "system - create object" rather than "sprite - spawn another object", is there a particular reason you want the sprite to spawn the clones?

  • jmay1982 - i thought about loops after i made it haha, cause that is a lot of sheet space used for making bullets! glad i could help <img src="smileys/smiley1.gif" border="0" align="middle" />

  • srcarr1515 - i would suggest just making it select the character they are touching so if they try to move it on top on another character it won't, it will just select the character under the touch.

    • selects player 1 - touches player two tring to move player 1 - player 2 is selected instead

    would something like that work?

  • Alcemon - i think i get it now, you want a sprite to "clone" itself and be the one spawning the other sprites instead of a system event?

    the difference i'm seeing here is, correct me if i misunderstood is, the system - create object > correctly picks and sets the instance variable

    whereas - sprite - spawn another object - sets the instance variable to 0?

    it also seems to multiply the pieces variable - which is really odd - making the spawn loop function incorrectly.

    i have made a new example on how to fix this, add an "on created" condition and move the set spriteID action to this condition, seems to work correctly.

    updated instance chain (r117)

  • if that doesn't work try adding a condition to the monster

    monster - on created > set position Random (X), Random (Y)

    is on screen

    the idea is to check if it's on screen when it is created and if so set it's position elsewhere.

  • pin the right arm to the player instead of the herobody (from original capx), appears to fix the problem

  • here is an example for you demonstrating chain spawning and UID/instance variable picking

    the capx

    you can manipulate them as you spawn them, i used something similar to make a spread shot example (though i didn't use a loop there)

    edit: if you need more help or explanation just tag me with wretchedshark

  • hi again,

    i am wondering if there is a way to calculate a platform player's maximum jump length given jump strength, gravity, max fall speed and ground speed. from the manual:

    ump strength

    The initial vertical speed of a jump in pixels per second when the jump key is pressed.

    Gravity

    The acceleration caused by gravity, in pixels per second per second.

    Max fall speed

    The maximum speed in pixels per second the object can accelerate to when in free-fall.

    ground speed in pixels per second moving toward (left) the stationary player.

    does anyone know how gravity is applied in a jump, is it incrementally to the top of the jump? does fall speed effect it?

    i'm kind of looking for an equation where i can plug in the numbers for the various variables and end up with a maximum jump length at each given ground speed.