99Instances2Go's Recent Forum Activity

  • I just had the same problem. I wanted to make members of a family to do a 'push out of solid kind of thing" in a wave outwards. Easyst way to do this is pick the nearest to each one. But that did't work. A bit dissapointed in the capx i just gave someone who asked a question on the forum.

  • Using good old physics.

    https://

    drive.google.com/open?id=0B1SSuCVV8v74SzNzVFZIRjZveWM

    Using custom movement.

    https://

    drive.google.com/open?id=0B1SSuCVV8v74MDB5bFR1MU1uVm8

  • Post a capx of you trying the bullet ?

  • It (1258) is moving. With a speed of 100 as set in its Bullet properties.

    Its bullets angle of motion gets changed when its instance variable 'direction' is set to some action in a str.

    Instance variable 'direction' is a random choice when instance variable 'direction2' is some action in a str.

    So far i am with you. Besides that it is a complex system and it is impossible to know if you made a typo in there. Bet lets assume you did't.

    Instance variable 'direction2' gets its value based on the relation between 1258 and sprite43. Sprite43 seems to be the player and has the platform behaviour.

    There are 2 events covering this. But i was stuck allready on the first one.

    That first event starts with a pick by comparing: abs(Sprite1258.X-Sprite43.X) = 0

    Meaning, when they almost are exact on the same place (on the X axes).

    But 1258 moves to the right, as a bullet. Can i move 43 and have it on practical the exact X as the always moving 1258 ? Hmm, is that even possible ? I made cap and tried this. It is like impossible. You could have done this for yourself.

    So that event can only be true if the player is played by a supercomputer. In my opinion.

    Then the sub events. 2 Groups. But i only need to look a the first group.

    That first subevent: A compare 1258's X when its X > Sprite43.x then ...

    Since this also had to meet the previous topcondition abs(Sprite1258.X-Sprite43.X) = 0, that gives maximum a difference of 1/2 pixel between 43 and 1258 to compare for. Wich is, i have to admid possible. But the subevent on that ....

    Again a comparing of the 1258's, this time if its X = Sprite43.X+600. I had to read it 5 times. Really ? Its X = Sprite43.X+600 ? Not ">" or "<" but '=' !

    So if 1258's X (wich is a moving bullet) is exacty Sprite43.X+600 (wich is a platformcontrolled object) then set direction 2 to some action ?

    So lets do the math. Lets say i am able to catchup the bullet 1258 with a platform based 43. In way that abs(Sprite1258.X-Sprite43.X) = 0. Meaning. In a way that their X's differend less then a pixel. Lets assume that it is possible. So Sprite1258.X = 10.2 and Sprite43.X = 10.1

    Then the sub event: Is Sprite1258.X > Sprite43.X ? ah yes it is. Its is 0.1 PIXEL bigger.

    Next sub-subevent: Is Sprite1258.X = Sprite43.X+600 ? Uh. No. not in a lifetime. They should be practical at the same place to meet the top condition.

    Well i feel dumb for looking at this. And in a last resort i renamed 1258 to "CockyOne". But that did't work either.

    Greetings.

  • Same thing as in this recent question.

  • I'd like to put the contents of a layout into another layout with an event. Pretty sure I can't do this. < Yes you can.

    You can have more layouts. You can switch to another layout with an action. If the objects in that other layout have the The Persist behavior, they will jump with you when you return to the previous layout.

    Just put them in a container to easy destroy them on level change.

    You can even randomly change to layouts. Like system > goto layout choose("trap","spikes","bomb","etc"). And then jump back ofcours.

    For positiong the traps, and for events that go with them, mayby you can use rexrainbow 's scenario.

    I never used that myself, just a tip.

    But there are other ways to position them, with functions by instance. A function for each kind of trap that you feed a position.

  • I see things got solved allready when i was looking in to your cap. I post my cap anywayz.

    https://

    drive.google.com/open?id=0B1SSuCVV8v74ZTdZZmQ1QTNTS00

    Still, when i see the arrays, there a lot of dots created. In fact, to much. Many on the same place. That will have an impact on the save/load times.

    Mayby you should do two things in your code.

    1/ When the touch speed is very low, dont make new dots, just grow the last one made in size.

    2/ Dont make a new dot when the touch is overlapping an old dot.

  • Why would Bullet not work ?

    You know the 'X,Y' of the starting Touch. You know the 'X,Y' when Touch ends.

    There is a system expresssion 'angle'.

    And the Bullets angle of movement can be set.

    What are you missing ?

  • At this moment there are lots of things that i dont understand.

    Most basecaly: why not use two 2D arrays ? But that is besides the question. It works with 4 arrays too.

    More to the point: You seem to try to use the AJAX plugin to retreive data from the LocalStorage plugin. I am afraid you have to make a choise. Or AJAX or LocalStorage.

    If you choose for AJAX, then i can not help you. Because then you have to deal with security related issue's that go with browsers. Something i know zip about. Its is quite normal that you do not want a browser to download and store whatever file without the user knowing.

    If you choose for LocalStorage, then i will look in to it. Meaning: clear your system, wich i dont understand. And set up a logical system.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The Persist behavior ?

  • Well, am not 100% sure, but. I think that a newly created instance actualy gets created in the next tick.

    You can apply actions to a newly created instance, right after a "Create" action, but you can't do picking of that instance before the next event.

    But the 'on start of layout' does not execute in the next tick. This makes the pick events beeing skipped.

    There is a simple trick to know if your 'on start of layout' has a problem with picking. And that happens a lot if you are not carefull. Change the 'on start of layout' to 'on mouse clicked'. If it works now, you need to bring the events out of the 'on start of layout'.

99Instances2Go's avatar

99Instances2Go

Member since 12 Feb, 2016

Twitter
99Instances2Go has 2 followers

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies