Mr427's Forum Posts

  • Hello Constructers

    I am back, no one commented on my last post <img src="smileys/smiley19.gif" border="0" align="middle" /> so I figured I would try it again but I will keep my description short

    .capx download:

    dropbox.com/s/mhtkk2nu9hf6nf7/LadderTrial1.capx

    So pretty much I have the player moving with platform behavior normally but when climbing a ladder I have the behavior switch to 8-directional. It seems that when this switch in movement type initially happens the player sometimes jumps around a little bit in random directions on the ladder. For example moving upward when pushing the down arrow, or being pushed off to the side. Is there a way to prevent this? Is this even the problem?

    I have been working on this all day and I have gotten no where. It would be great if someone could take a look and give feedback, or a solution.

    Thank you as always for taking the time to take a look.

    (Original Post: scirra.com/forum/ladder-issues_topic75127.html)

  • Hello Everyone

    I am having some issues with getting ladders to work. I have checked out the .capx that are available in the FAQ post and there are a few issues with them so I decided to try a slightly different approach. I have a good portion of the mechanics working but there are a few issues that I am hoping a fresh set of eyes could help me figure out.

    Here is the .capx:

    dropbox.com/s/mhtkk2nu9hf6nf7/LadderTrial1.capx

    I am having the player switch between platform and 8-directional movement when starting to climb the ladder. The player seems to keep some of the momentum when switching between the two movement, I think, and it causes the player to move side to side while climbing even though I'm not pushing the left or right arrow. If that is the problem, that it is keeping momentum, is there a way to get rid of that. If not I don't know what to do at all.

    The next issue I am having is when the player reaches the top of the ladder sometimes the floor piece they are crossing (LadderPlatform) becomes solid before the player sprite has completely passed so the player ends up getting pushed off to the side, not to far or anything, but it would be enough to shove the player into an enemy.

    The last issue I am having is that if the player is at the top of the ladder and they want to go down, the floor loses its solid behavior just fine, but rather than the player moving down they instead move upward just a little bit first before moving downward. Is this an issue with the player standing on a solid object that is no longer solid?

    Any help with this would be appreciated. Thank you for taking the time to take a look.

  • Oh wow, thank you so much! This is working great!

    Just for curiosity sake do you think you could explain the actions you added, more specifically:

    Sprite 2: set anim to ceil(4*(1 + Sprite2.a/360)-0.5)%4

    I guess mostly I'm interested in what that %4 is doing at the end?

    Thanks again this is exactly what I was looking for.

  • Hey guys so I have been messing with this one for a little while now and I can't figure out what is happening

    So my problem is that 3 out of 4 walking animations will not loop. They are all set to loop in the animation editor and they are all set to 2 frames per second. There doesn't seem to be an issue with setting the correct animation because they all start just fine, but won't loop. WalkR is the one that works WalkL/D/U do not work.

    This is using the path finding demo so it works the same, just mouse click and the little zombie will walk to the clicked spot, after his first arrival he will start to path find all on his own so you can let him walk around.

    Also I have included a clone of the animation sprite in the upper right hand corner and if you hit W,A,S,D that will get the other animation sprite to preform his walking animations, they work just fine, but I was using it as a way to test for possible errors in my animation set up.

    Any help with this is greatly appreciated, thanks!

    Download:

    dl.dropboxusercontent.com/u/64691866/PathFindingAnimationIssue.capx

  • Oh....my.....GOD!

    Thank you so much. I thought that this was the command I was looking for, but when I tried using it some strange things happened so I figured I better just ask. I guess there must be and issue somewhere else that is causing the conflict.

    Thank you again for the quick response!

  • Thank you for taking the time to read my question

    I am new to arrays so forgive me for my ignorance. I would like to set an objects angle based on the value taken from a specific index in my array.

    When looking at the choices for using the array these are the options that stick out to me as recalling values from and index but I don't know which one to use:

    .At()

    .CurValue()

    .IndexOf()

    Is one of these options the one to use? And if so whats the proper way to have the system retrieve the value from the specific index of (1, 1) and apply that to the Set Object Angle?

    Thank you again and any help is greatly appreciated

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I tried this and unfortunately it seems that while the conditions of the event are met the actions are sent every tick, so instead of it waiting 1 second to shot 1 bullet it waits 1 second then begins to fire a constant stream of bullets because of how many times the action was sent while waiting for the first bullet.

    **EDIT**

    So to fix this problem of the actions being sent to much I just added another variable called ShotCooldown that does not have a Wait action infront so that the conditions are not met right away.

    Thank you so much for the help this was exactly what I needed.

  • I have a boss moving around in a Sin Movement fashion, I want it so that he stops his movement pauses for a second then fires a shot, pauses again for a second then fires a second shot and finally continues on with his movement.

    I have tried using the Every X second event while activating and deactivating groups, this actually seems to cause the event to run immediately on activation no matter what the X seconds is set to. I have tried the Repeat event with a Wait X seconds action. I have also tried using a While Loop. Nothing seems to give me a consistent timed loop.

    I get the feeling that the "For loop" is exactly what I'm looking for but I guess I don't fully understand how to use it. I have read the Loop/Arrays help page but I'm still a little confused on what the start index and end index mean, and how I would control the system to prevent it from going through the index every tick.

    I'm sorry but I don't have a good CAPX to upload because I have tried so many combinations, and haven't been saving them individually, that at this point I don't a completed event sheet.

    Thank you for taking the time to read this and any help is greatly appreciated

  • Hey Guys

       

    I was working on a particular part of a game that has to deal with a phase transition during a boss fight, the boss is going from easy mode to hard mode.

    Obviously while the game is actually being played the process will be highly controlled and only happen once. But for now while I'm working with it I'm adding a bunch of temporary actions that allow this phase transition to happen on command to make it easy to test. However, I will need to remove them later.

    I started to think that if I decided to take a break for a while I would have to go through and remember all the code and find all the temporary actions again. So my suggestion is what if I was able to highlight those actions so they stand out. That way when I'm ready to edit them out I can easy find them again.

    I would imagine this would be easiest as a right click menu option just select the action/event you want to highlight, right click --> select "highlight", and the action will have a yellow (or whatever color) background.

    I have no idea how easy this would be to accomplish, it was just something I really wanted to share. Thanks for taking the time to read my idea.

  • Wow thank you both so much

    The linking event sheets together is such an awesome feature, now I can close the event sheets, which saves on load up times, but I am still able to move between them easily.

    Putting the global variables all on one event sheet is pure genius! Now with both of your guys solution I have a way to put all my global variables on one event sheet PLUS an easy way to get access to them.

    Again Thank you guys so much!

  • Hey guys I just have a quick question, nothing too serious

    I was just wondering if there was a way to move global variables between event sheets?

    I know that "global" variables are used on all layouts, I just want to be able to edit the variable without having to move between the different event sheets.

    Thank you for the help

    *edit for grammar*

  • I apologize for the confusion. I have uploaded a CAPX that will hopefully shine some light on what I'm trying to accomplish

    In the file I have uploaded the blue square start at the origin of Orange squared labeled OrangeUR. It then flies at an angle of 180, that I have set in the Event Sheet.

    After this when it overlaps its target it just changes it angle of motion to point itself towards the next Orange square. The issue that I'm talking about with this method I'm using is that the blue square never actually comes near the origin of the next square. This means its never on the actual path that I was looking for.

    The big issue with this, and you can see what I'm talking about if you let the blue square fly around for a while, is that its path is not consistent. Eventually the blue square starts hitting the orange squares in different spots and this changes its overall path.

    I know that this example represents repeated movement and using the Sin movement function has helped me get around this issue with some stuff. My issue comes up because sometimes I don't want movement to be a cycle. Also my angles of motion aren't always nice 90 degree angles sometimes it 60 or 30 and this makes the movement even farther off.

    Thank you very much for taking the time to take a look and help me.

    Game File

    dl.dropbox.com/u/64691866/BulletMovement.capx

  • Hey guys I just have a few questions that involves messing with the angle and angle of motion for bullet behavior thank you for taking the time to read them.

    1) Is there a way to set an objects angle/angle of motion outside of using the event sheet? In other words every time I create the bullet I don't want to have to keep setting angle of motion, because several bullet objects are created at once.

    I have tried setting it on Start of layout but it seems that if there is no instance present or the last instance of the sprite is destroyed it goes back to the default 0

    2) Is there a consistent way to have bullet fly to a specific spot on the map without having to using the command Set Angle to Position?

    The reason this doesn't work for me is because it causes the bullet object to rotate and I have an animation pinned to the bullet and this also causes the animation to rotate.

    So far I have been using the Set Angle of Motion command and putting in a numeric angle by hand. Then just using another object to deflect the bullet at a different angle that is again set by hand. The major issue with this is its not consistent and eventually the bullet sprite goes off course and misses its mark.

    Sorry if this was confusing, if I need to clear anything up just let me know. Thank you for taking the time to help.

  • Hey

    So I think this is what you are looking for. I imagine this is not how the enemies will behave in your game.

    Just for testing purposes if an item is not spawned the System will wait 2 seconds and Spawn a new guy. If an Item is spawned the system will wait for you to collect it before it spawns a new guy.

    I hope this helps and good luck.

    Game File

    dl.dropbox.com/u/64691866/RandomSpawns.capx

  • Thanks for the help. I ended up not saving it as a global variable only because I couldn't figure out a way to get the properties of the ball to save to a global variable.

    Instead I added an instance variable to the ball called Pushed to prevent the bullet from hitting the ball more than once and moving to fast.

    Once the ball comes in contact with one square it is destroyed and the opposite square will respawn a new ball and reapply the torque/velocity. This is the reason that I added instance variable, and limit the speed, because the spawning torque/velocity are set by hand and I wanted the speed of the ball going in the portal to match the speed coming out, or at least look close.

    Thanks again for the help and here is the updated CAPX incase anyone is interested!

    Updated Game File

    dl.dropbox.com/u/64691866/PortalsandPhysics2.capx