About remembering the coordinate of respawn

0 favourites
From the Asset Store
Try to remember the sequence of moving pumpkins. Reproduce it according to your memory.
  • Sorry for the late answer.

    For some reason, The first CAPX you sent to me (KickEm) doesnt do the respawn at all. (But the script is all make sense)

    When the spheres kicked to wall, it seems like it will spawn another object, before the wall coordinate (presumably because the spawning position is the same with the ball movement, or the "thisX" or "thisY" coordinates counted not when the sphere being kicked, but AFTER it).

    Then I tried to modified the separated layout in many different manners, but it always doesnt do the respawn thing. (this is very strange ,and make me sratch my head many times because the script is almost the same with my first attempt ) . Next time I come back I will include the "working" CAPX.

    This maybe embarrassing, but the second CAPX you sent me (the compressed one) dont work at all. I've download the rex behavior MoveTo plugins, but no matter what I do, it always show error in plugins/ javasript.

    I've consult with my friend about this matter, and he suggested me to use the System : Wait.

    Basically it means that when a sphere is kicked, it will do the Wait (such as 5 secs) and then reposition the kicked sphere to starting position, WITHOUT DESTROYING it ( this actually make possible by turning off all of the collision trigger and turning off the visibility of the sphere, which is hypothetically effective because it uses the same UID and IID / not change the ID at all). But I guess it is not possible to do in my game , because the sphere can collides with other spheres and have to be destroyed when hitting certain objects).

    I did some research a while ago about UID and IID. I strongly believe that the most correct way of doing this respawning problem is to use IID.

    Given if IID will sort the multiple instances of an object (Ball) and always has consistent value even when any instances is being manipulated (destroyed/ changed) , I have an idea (but i dont know how to put it on code)

    Basically, it will do these things :

    1. Store an instance variable of IID in an instance (such as ,in any Sphere , put an "thisIID" instance variable)

    ,which have 2 alternative possibilities :

    a. Putting a value of -1 in "thisIID" of every instances onscreen , and fill the value at the Start of Layout with Self.IID

    (maybe using "For each")

    b. Putting value of "thisIID" with Self.IID

    2. Always compare / pick the IID of the Sphere that currently being kicked or starting respawn counter, with Self.IID

    (also, maybe using For Each), basically, it will perform the spawning if the IID of kicked sphere is the same as the IID in instance variable.

    Or maybe uses expressions like, Pick Nth instance....

    I might be gravely wrong about this, but I cant think of other possibilities. (the more I dwelve into IID explanations, I getting even more confused )

    I really need to overcome this matter, as it seems to be my last hurdle in completing my game.

    About your opinion that 100 event limitations is a blessing, somewhat I have to agree with you. I keep telling myself that in the older days , gaming peoples were struggling with cartridge sizes,RAM or stuffs like that . But I found that it is those things that make the classics great. Limitations drives people forward. Thats what I think.

    Thanks for your replies. If the game is finished, I'll let you know.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You are right, better listen to a friend, especially when they suggest a 'Wait'.

    Never listen to a stranger who is strongly against the use of 'Wait'.

    I apologise for taking this comment literally :

    I think It doesnt seem right to place the timer in the Player. As each instances / objects of Sphere has their own timer, which if any Sphere getting kicked, the corresponding Sphere will start the timer and respawn after 50 secs/ counts.

    I should have known that there is no 50 seconds patience.

    Thank you sincerely for your time.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)