TMAJA's Forum Posts

  • LittleStain

    deathangel1479

    Thanks for your input you are right there is never a good reason to run so much redundant code - the problem I couldn't get my head around is not all objects run the same actions.

    In the end I have gone with an array, which I search for the name of each object and then extract data based on the names location in the array.

    Unfortunately this system isn't perfect and only partially works. I was hoping you could answer a couple more questions:

    My array looks like this

    Object A | 1 | 2 | 3 | 4 | 5 |

    Object B | 1 | 2 | 3 | 4 | 5 |

    Object C | 1 | 2 | 3 | 4 | 5 |

    I have a set of global variables which store the names of the objects in each slot. For example Global Variable SlotA = "Object A"

    My code is then

    Array|Contains value = SlotA - SlotAText | set text to Array.At(Array.IndexOf(SlotA)+1)

    I was hoping this would look in the array for the value matching the value in the global variable Slot A, then set the text object SlotAText to the value in the cell 1 further along on the X axis.

    I had expected this to set the text to "1" but this isn't the result.

    Can anyone suggest why on earth this would cause the text to be set to "Object B"?

    Am I adding one onto the wrong axis? Is there a way to specify which axis to add one onto?

    Thanks in advance.

  • Hi Lucky Star,

    Have you tired adding an event for the laser beam hitting the block? (Actually it does sound like you have). You could then either set the laser beams opacity to zero, set it as invisible, or just destroy it!

    Hope that helps

  • Hi Ikke,

    thanks for your input - I have been considering going down the array route and it is on my list of things to do. My major concern though is the huge number of actions getting called all the time in my current system - there are over 20 potential objects and 6 slots, which equates to a huge amount of redundant/repeated code. As the 'fuel' system for each object is also tied to the slot it is in (where the fuel is displayed) I find I am running repeat actions over and over.

    Does anyone have any further suggestions?

    Thanks

  • Hello everyone,

    I'm looking for some suggestions for simplifying this section of code.

    I have a series of objects which can be assigned to whatever slots the player wants. Those objects then have various states which need to be reflected to the player.

    At the moment I have a global variable for each slot, which I then write the objects name into.

    In the level, I have to manually check which object is in which slot, which is a really ugly and unwieldy way of doing things.

    At the moment it looks like this:

    System|Slot A = Object A - Do This

    System|Slot A = Object B - Do This

    System|Slot A = Object C - Do This

    System|Slot A = Object D - Do This

    System|Slot B = Object A - Do This

    System|Slot B = Object B - Do This

    System|Slot B = Object C - Do This

    System|Slot B = Object D - Do This

    System|Slot C = Object A - Do This

    System|Slot C = Object B - Do This

    System|Slot C = Object C - Do This

    System|Slot C = Object D - Do This

    ect. You get the picture.

    This feels like a really awful and unwieldy way of doing things; can anyone point me in the direction of the better implementation? I'm clearly missing something simple here.

    Thank you very much

  • I hadn't added the nickname behaviour to the family, only the individual sprites! Oh dear . Time for more coffee I think!

    Thank you so much Coin-coin Le Canapin! You saved the day .

  • scirra.com/forum/search.php

    :]

    Hi Coin-coin le Canapin,

    I must be having a really really dumb day as I cant figure out how to use the nickname plugin to get what I want. I've named my sprites using the behaviour.

    How do I now tell which sprite has been touched within the family?

    Thanks!

  • scirra.com/forum/search.php

    :]

    Gah, I cant believe I didn't search the forum first (I did Google in my defence)!

    Thank you Coin-coin le Canapin :]!

  • Hi Everyone,

    I am trying to spawn a specific sprite from a family.

    Specifically, when the user clicks on a sprite, I want that sprite to spawn in a box below.

    All the sprites are in the same family.

    This feels like it should be so simple, yet I'm struggling, I'm obviously having a dumb day!

    Suggestions are appreciated

  • I am experimenting with an infinite runner style game.

    I currently have the character sprite with platform behaviour and the 'hazards' flying forwards it from the left with bullet behaviour.

    The hazards are set to solid.

    The problem is I want my character to be able to jump on top of the hazards. Every time it does though, it is dragged off the left of the screen.

    Does anyone have any suggestions?

  • Hey all,

    I have run into problems with one small feature of Construct 2 on a number of occasions now: When you are resizing a sprite and you accidentally right click on another, it makes the sprite you are resizing the same size as the clicked sprite.

    Now I may be the only person in the world with lazy middle finger syndrome, but the number of times I have drastically resized sprites I only wanted to change a little is getting ridiculous. To compound matters the action cant be undone!

    Is there a way of disabling/rebinding this feature?

    If not developers, please PLEASE consider adding one.

    ArgH!

  • Hey,

    Does anyone have any advice on the best way to create a complex infinite runner?

    I ideally would like to spawn 'stages' of a set width with various sprites in each stage.

    As with other infinite runners I would then spawn the next stage as the player reaches the half way point of the previous stage.

    I do currently have a system in place but it is pretty long winded.

    What is the best way of going about creating a system like this?

    Thanks.

  • Not that stable, not compatible with c2 memory management, not fully compatible wit some of c2 basic features, conflicts between scirra and ludei that finally lead to have the community itself take care of the plugin since ludei did not enough work from their side, better exporter for android, phonegap that will take the lead at the end for both iOS and Android, the surprising popularity of cocoonjs despite the fact it is kind of unstable, that updates of cocoonjs tended to be plain broken, and that scirra had to endure the support to their user since they were proposing it.

    Now scirra will not have to take responsability if it is broken once again for a long time period.

    I think that sums up it partially.

    Ahh I understand. I've heard of phonegap before but never really looked into it. I just had a quick glance now and a) it seems to be a paid service, and b) appears to not come with advert integration build in.

    Is it really that much better than Cocoon?

  • Ahh brilliant thank you. Do you know why it was depreciated?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So in the latest update, the CocoonJS exporter has been depreciated.

    What do I do if I still want to use CocoonJS?

  • I can confirm that after testing banner AND full screen ads do not show as often in the new compilers as 1.4.7. So annoying!