dsminor's Forum Posts

  • or because you just want one condition triggered not both after each other.

    it is like

    main

    sub

    sub

    but it should be like:

    main

    sub1 sub2

    Anyway the variable works just fine.

    (I just call it or i dont mean the construct 2 or function)

    Maybe your right its more like an else chain:

    if a is true than "do something" else check if b is true than "do something" else check if c is true and so on...

    however its a bit offtopic here

  • There it is thats why you need triggers in construct 2 or an "or" function!

  • Sounds like a bug in the code not like a logical problem.

  • Hi,

    you need an 1d array (a list) for this.

    Just fill it with colors and on every shoot take the first color for your shoot and then "pop" the first value.

    You could also use the 1,2,3 value to show whats coming next.

    Also do you want to set the list manualy for each level or make it random?

  • Maybe but it doesent matter.

    Thats why you trigger the scoring by the on destroy event.

  • Ok then the hardcore way.

    on collision--->destroy the finishing line!

    finishing line on destroy---> get score and end level

    It can only be destroyed ones so it can just trigger ones.

    The levels ends anyway so you dont need it anymore.

  • I used this because construct has no real or function. (at least not as i understand)

    So if you have an event with X subevents and you just want one of them to trigger and then skipping the other

    ones thats what i did.

    Or to make on/off switches with global variables (global variables cant be booleons so cant use toggle)

  • You could make something like a trigger.

    Create a local variable called "trigger" (needs to be static and needs to be reset to 0 at start of level)

    For the collision event to run the trigger needs to be 0.

    And if the collision event triggers set the trigger to 1.

    So it should just run ones.

  • Hi i also had this issue.

    It was because of an imagename that could not be loaded because it used not international letters like äüöß or something like that.

    In general it means something is not loading properly.

  • Hi,

    the icon needs a variable "belong to"

    On create set "belong to" to the enemys UID.

    The Enemy on destroyed:-> poison icon with" belong to" =enemy.uid ---> poison icon destroy.

    Its kinda like what Gumball said.

  • Hi,

    just make an variable (in the cannon instant) called "shoots" and a booleon called "reload"

    On every shoot check if "shoots is >0.

    Than subtract 1 from shoots.

    If shoots =0 set reload to true.

    if reload is true (and a trigger ones) wait 2 seconds then set "shoots =5" and reload to "false"

    thats ist.

    maybe you should also make a timer for you can only shoot every 1 second or something like that.

  • Man thats tough.

    It sounds like the enemys never trigger your first event, if they have no collision activated.

    Do you add them to the layout before testing or do you spawn them in by debug command?

    Also is the "trigger once" in the first event necessary?

    It should trigger just ones for each enemy even without this.

  • Global variables are useable for all layouts.

    Only local or instant variables arent.

    For this score1-3 dont even need to be global.

    A array or a global instant would work too, as you said, but a global variable is much easier.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could just make an additional variable "totalscore".

    Every time you add something to score1(2,3) you also add the same amount to totalscore, so in the end you

    have the total and the level specific scores.

    Or at the end: totalscore=score1+score2+score3

    You will need a variable to store this number anyway if you want to use it for something else.