99Instances2Go's Recent Forum Activity

  • You can edit the title of the first post and add [SOLVED]. Most dont bother.

  • Afraid it is the other way arround. You really need to read (10 times) the link posted by oosyrag, just to understand ANY tutorial. And that is a Golden suggestion.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I dont understand how your 'idle' can play.

    If you do 'as platform is on floor and not moving' set to idle ....

    The two conditions that try to catch that, are always true, unless there is action taken. (an action like moving the player) If you dont use 'once while true', also the idle should not play (unless it is only 1 frame).

  • Then I tried to add an event like if player is flashing set animation to takehit and it does work but it just plays the frame 0 somehow and it wont play the full animation.

    I suppose player is flashing for some time. Meaning 'if playing is flashing' will be true many ticks. Each tick that it is true, the animation gets set to play from the beginning. So each tick the animation starts (and shows) frame zero.

    Add a system > 'once while true' to the event containing 'if player is flashing'. I suppose you set controls to off while flashing. Thats why the 'idle' kept kicking in. And you do need to cage that 'idle' as you do.

    If you dont set the controlls to off (player can keep moving) then you will have indeed to cage all other animation controls same way.

  • Is ok, i see now that i captured that wrong.

  • It happens on collison with 'Piques'.

    And because you have multiple 'Piques' crowed on a dense place, Perso (player) is colliding with more then one spike in a very short time.

    Each collission triggers a call to the 'mort' function.

    In short: for each spike it collides with (almost at the same time) it makes a new player. And it multiplies because you are getting more and more players.

    Lose all the 'trigger once' for now.

    Give Perso an instance boolean 'IamDeadAllreadyDontBother' (something like that, but in your language) .. false

    (In one event, 2 condtions)

    On Perso collission with Piques

    Perso boolean 'IamDeadAllreadyDontBother' is set ? (inverted, so if not set)

    (actions)

    set boolean 'IamDeadAllreadyDontBother' to true

    call mort

    In the the function "SpawnPerso" add the actions

    Wait 0.5

    set boolean 'IamDeadAllreadyDontBother' to false

    I think that should do it .. code wise.

    But, at the same time i think you better make a spike-sprite with animations for the colors, and frames for the amount of spikes (watch the collission polygones). Those spikes you bring in the layout (not even on runtime) only once anyway, so that should not be that much of work. Set default animation and frame in the instance properties in the layout editor.

    Alternative. Those two suggestions are ways to avoid the problem.

    Bur After all, your solution (fixing it after the facts the way you did) is also not that bad. Is does not harm and is not messing up code. So in fact, you solved it allready, and i understand the cause, every one happy.

  • Would really like to scan his capx, its intriguing.

  • On sPlayerBullet colliding with sTree (if sTree = de family)

    .... this is a trigger .. meaning that it can fire several times in 1 tick and it should have the right sTree in the picklist.

    So yes that would work. If you dont trust it (even my mind says that there are 1000 collissions happen at the same time) then do this.

    (2 conditions in 1 event)

    On sPlayerBullet colliding with sTree (if sTree = de family)

    For each sTree

    (action)

    Call the function (with param)

    'For each' loops trough the picked objects.

    Then again. Fuctions are heaven to condens amount of code lines and (especialy) when you need to pick from scratch without destroying the current picklist. None of those 2 'rules' are in play now.

    You condensed the code by using a family. So. Just.

    (2 conditions in 1 event)

    On sPlayerBullet colliding with sTree (if sTree = de family)

    For each sTree

    (actions)

    All the shaking actions.

    That is even less code because you dont need the code to call the function.

  • Just use that last condition. Pick bird with ChronoCount = 1.

    Now the expression bird.pickedcount is the sum that you need.

    I see (think) that is see that you intended to use sub events, but did not.

    Stuff to read: https://www.scirra.com/manual/128/sub-events

  • I did try putting the 3 objects into a family and having the function affect the family, but it turns out this affects every member of that family.

    Assuming that you pick the right object. Call the function with a parameter, in this case send UID of picked object in a parameter to the function call.

    In the function you just pick family number by UID .. UID = function.Parameter(0)

  • Mega is asking for a key.

  • second CapX, fixed as it should be

    https://drive.google.com/open?id=0B1SSu ... nBUMzFPVVk

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