TMAJA's Recent Forum Activity

  • Hi everyone,

    could someone suggest why I have started getting this JavaScript error when exporting with CocoonJS?

    Or any suggestions on trying to locate the source of the problem myself?

    JavaScript Exception (Line: 9177 File: 'C2runtime.js' Tag: Script'): TypeError: Attempted to assign to readonly property.

    Thanks!

  • briggybros

    Thanks for your reply, I ended up doing something very similar - simple- no idea why I was stumped by this at the time!

  • Hello all,

    Could anyone suggest a way of using the array expression IndexOf to return the value below (on the Y) a known value?

    Or forgetting IndexOf completely, if my array looks like the one below, and I know what the X value is (the object names in this case) - how can I return the Y value below it.

    Object A | Object B | Object C

    1 | 1 | 1

    Thanks,

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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?

TMAJA's avatar

TMAJA

Member since 13 Feb, 2014

None one is following TMAJA yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies