nimos100's Recent Forum Activity

  • The easiest way is simply to put both Speople in a family, and then just spawn the family object, as it will automatically choose a random one. However if you need them to spawn with different time intervals it wont work.

  • I haven't done any platform games, so might not be 100% correct :D

    But I think you can make custom shaped solids, under the one where you say that it should collide against solids, you can change it to custom. Exactly how to use it, I cant remember but you can probably find it in the manual and see how it works.

  • You just need to check the distance between the tile and spaceship.

    So if distance(Spaceship.X,Spaceship.Y,Tile.X,Tile.Y) <= 100

    Spaceship.stop (The pathfinding one)

    Spaceship.set angle towards position tile.x,tile.y

    The spaceship wont collide with the tiles as they are solid. However you can turn off solid for the selected tile if you want, but you have to regenerate the obstacle map then. And in its current state if you have to many objects, your program might pause for a short time while calculating, which makes the function rather useless, as no one cares to play a game that pauses all the time :D

    Also you don't have to use a "dummy" object (The red square) for you player craft. You just have to make sure that the spaceship is flying the correct way in the image. that being to the right, Like this:

    Back of spaceship >----O> Front of spaceship

    Furthermore I can see you have scaled your spaceship, its better to make it the correct size from start, as it will otherwise use more memory than needed. It might not be a problem now, but later on you might run into some performance problems. It can be done quite easily if you use the image editor in C2.

    To do it correctly, you have to do the following.

    1. Rotate all the animations 90 degree CW, so they point right.

    2. For each animation scale them to the desired size and exit the editor.

    3. Select you spaceship Then you can see the "angle indicator" in the middle of the sprite points in the direction of the front of your spaceship.

    4. On the spaceship, you have to set the "size" to what you made it in the editor as well, as it still scales it, with the same amount as before you scaled them in the editor.

  • "I attempted to implement both of the solutions you've suggested but they both seemed to fail for the same reason that mine does."

    The last solution should work, you might have to change some code etc, as I use a solution like that in my own program. But you might have to move it above the other event, so it doesn't trigger before next tick.

    However its to difficult to figure out, whether it suits your solution or not. As mine is designed to work with such, so its probably better that you use your own if it works for you. :)

    "did you mean that I am using a plugin which prevents you from running it, or that you are using a plugin which prevents you from running it? I only ask because as far as I know I have no plugins in my C2 and it would be a potential issue if I did."

    I got the information from your program, that I couldn't start it. I don't use, and have never used any plugins. Even though I think a lot of them could be useful, I don't want the troubles with an update to C2 suddenly not working with a plugin I used and then my program doesn't work etc etc. :D

    (But ill try running it again and post what it says, just to be sure :))

    EDIT: Hmm weird I started it now without any problems. So it must have been a glitch of some sort.

  • I cant actually run your program due to some third party addon.

    But have you tried instead of making a function called "RemoveSpawnedMatches" just to make it as a On create block and then do the tests there?

    Also a workaround, if it suits you program, is to add an Boolean to the blocks, and if its true, that block need to be tested.

    So you can just add an event:

    "

    Block.need_tested = true

    For each block

    Function call "RemoveSpawnedMatches"

    "

    And then just turn off/on the Boolean if you need to test a block or not.

  • If you want to know why, it can be explained pretty simple. As an image is build up by pixel.

    So if you imagine having an image 500x500 pixel and you resize it, all the information in the image that it used 500x500 pixel to store before, now need to be stored in lets say 64x64 pixel, so you will loose a lot of details.

    And the same is the other way around, if you use 64x64 pixel to store lets say a picture of a human face, and you resize it to 500x500 pixel, a lot of blur will occur, as it trying to fit very few information into a lot of information. So as a general rule in my opinion, its always best to create your graphic as close to what you need, and in case you cant, or need to resize it, its always best to shrink over enlarge.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do you mean that the graphic looks blurred when you preview it on the browser? if so just use chrome or firefox. Chrome is best in my opinion as it doesn't have sound issues.

  • I think what ramones refer to is that if you create objects like that, they are actually not available until next top level as far as I understand, so when you manipulate the object, in the same event, it doesn't actually exist, even though it sometimes work anyway. I personally find it pretty confusing as well, and sometimes things that seems very simple, takes a long time, because you spend so much time trying to make workarounds to it.

    There should be a built in functionality of some sort, that created a temporary object that you could actually manipulate, and then at first possible opportunity it should copy the temporary object to the correct one or something, so even though it doesn't exist at that time, you could still work with it, without even knowing it weren't the correct object. But anyway think that its something like that ramones refer to.

  • What ever works <img src="smileys/smiley4.gif" border="0" align="middle" />

  • Each object have a collision mesh or mask, whatever you want to call it, and if they are overlapping the condition will be true. Its a bit easier to explain if you take 2 sprites, and open them in the C2 paint editor. In the left side at the bottom, there is a collision button, if you press that, you can see the collision mesh for the sprite.

    You can manipulate the collision mask here, or you can right click the sprite, and choose set as box I think its called and it will make the whole sprite a collision mask, or you can choose guess collision (Cant remember the name) and C2 will base the collision mask on what is in the image. Guess collision is only really useful if your sprite have transparency.

    When you use the overlapping condition, its not the actual sprite or whats painted in it, that it uses. but the collision mask. So if two of these mask overlap the overlapping condition will be true and whatever action you have specified for that condition will be triggered.

  • Hmm then I think you might be better off just using an "every tick" with a Set sprite.x = sprite.x + 2 or whatever will hit the exact conditions you need.

    Or you can add a check that will set the sprite to the correct position you need after it reach it.

    So if "Bullet distance travelled >= 100" -> Set sprite.x = 100. And if you need to make it more dynamic, just store the sprite.x start position, and calculate what the new condition should be, based on that. So if its every 100 pixel.

    You can compare the starting condition to the sprite current position and divide it by 100 and multiply that with 100.

    So instead of sprite.x = 100, you make it:

    sprite.x = Round((Starting_position + sprite.X)/100) * 100

    However depending on which way the sprite is travelling you need to change the + to - I think, to make it work.

    So if its travelling left it needs to be:

    starting_position - sprite.x

    And if its travelling right it needs to be:

    starting_position + sprite.x

    At least I think it will work. But math aint exactly my strongest point to be honest, so it might be wrong as I haven't tested it. :D But you can probably see if it works if you do it that way.

  • X is a variable

    X = 0 or whatever value you need it to start at.

    Try this:

    "For X to 100"

    ---"For 0 to 10"

    ---"Do whatever in the inner loop"

    Add 1 to X

    (You can just add a blank event underneath the inner loop, and it will run when the inner loop is done.

nimos100's avatar

nimos100

Member since 23 Sep, 2012

None one is following nimos100 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies