aruche's Recent Forum Activity

  • Maybe you could do:

    Dictionary -> Destroy

    System -> Create object [Dictionary]

    for a quick but dirty way to 'reset' the values.

  • Try something like:

    "https://twitter.com/intent/tweet?text=Here+is+my+Score:+" & SCORE

    The '&' operator joins 2 variables or text together.

    if SCORE is 1337, the concatenated text will be: "https://twitter.com/intent/tweet?text=Here+is+my+Score:+1337"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    have you tried using "On collision with Exit" instead of "Is overlapping Exit? "Is overlapping" condition triggers like every tick thus the "game over" sound is repeated many times.

    Regards,

    Aruche

  • Okay I'll forget about the idea then.

    Thanks for clarifying! :)

  • Hi all,

    I'm developing a Behavior that has an Action which will narrow down the selected instances (of the object with that behavior) by comparing some parameters and properties. The problem I have is that the SOL does not reset to select_all after an Event block.

    e.g.

    -> Every Tick

    --> [Action] Sprite | Pick instances where Property value is "Parameter value" #Selects 1 sprite.

    -> Every Tick

    --> [Action] Sprite | Set X to Sprite.X + 50 * dt

    Expected result:

    • All sprite objects to move.

    Actual result:

    • Only the selected sprite object moves. (It stays that way until another condition picks all of the object type)

    However, it works as intended if I simply add an object parameter to the action (even without modifying the runtime code to use the object type).

    Any ideas? (Is it actually OK to change the SOL of an object type through an action?)

    Thanks!

  • I don't have a solution for this.. would like to give it a try at explaining the issue.

    The "return" statement of usual programming / scripting languages allows the program to exit from a function call at any point in the function.

    A simple application of the return statement is in a search function, we would want to exit the function once we found the object that we are searching for. Since there's no "return" statement in Construct2's function object, a working but bulky solution would be to keep a variable for e.g. "done" to keep track of the completion of a task. The code becomes bulky, looks more complex the more points of exit there are. Forgetting one check for the "done" variable can mean a lot of time spent debugging.

    A pseudo code (in a script language like Javascript) of a function to illustrate the issue:

    var globalVar1 = 0;
    function foo(){
       ...
       while(someCondition ){
         ...
         if( someCondition ) 
            return something;
         while(someCondition ){
            ...
            if( someCondtion ){
                return something;
            }
            globalVar1++;
         }
       }
    }
    

    Pseudo code for the same function in Construct 2:

    global var globalVar1  = 0;
    function fooC2(){
      ...
       <font color=orange>local variable done = 0;</font>
       while(someCondition <font color=orange>AND done = 0</font>){
         ...
         if( someCondtion ){
             function -> set return value = something;
             <font color=orange>done = 1;</font>
         } 
         while( someCondition <font color=orange>AND done = 0</font>){
            ...
            if( someCondition ){
               function -> set return value = something;
               <font color=orange>done = 1;</font>
            }
            if(<font color=orange>done = 0</font>){
               globalVar1 = globalVar1 +1;
            }
         }
      }
    }
    

    Sorry that I couldn't think of a better example, but I remember having this issue too. It doesn't make it impossible to get the same output, but it makes the code bulky.

  • Hi, hope this will help :)

    • [Cond.] On I pressed, PauseSelect is overlapping BowIcon

    -> [Action] IButtonIcon | Set animation frame to 1

    -> ...

    --> [Cond.] IButtonIcon Animation frame = 1

    ---> [Action] IButtonIcon | Set AssignedItemSwitch to 1

    --> [Cond.] IButtonIcon Animation frame = 2

    ---> ...

    ...

    IButtonIcon Animation frame is changed to 1 before the value is stored as AssignedItemSwitch.

  • Hi,

    Not sure if this helps..

    https://www.dropbox.com/s/40ef2gwjkmgokmb/HexRGB.capx

  • Awesome stuff, thanks! I needed the "accessToken" value, I'm puzzled why it still isn't in the official plugin yet...

aruche's avatar

aruche

Member since 7 Nov, 2012

Twitter
aruche has 1 followers

Trophy Case

  • 12-Year Club
  • Entrepreneur Sold something in the asset store
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies