drpool's Recent Forum Activity

  • Well, I got it working somehow. One thing I don't understand why it's not working is the second check if the cursor is over any card. (I disabled it). I suspect it checks if it is over the same instance as in the check before...maybe someone else can clear this part. Right now it's deleting the selected card everywhere.

    dl.dropbox.com/u/40417570/Tests/test_mod.capx

  • Event subgroup of mouse release: objectToBeDestroyed->PickInstanceByUID(global_var) Action: objectToBeDestroyed->Destroy

    Editing a project (capx) would be clearer.

  • A capx would be helpful to reproduce.

  • Hi,

    my name is Michael (34) and I'm a software engineer (c++) in real life. In my second life (after work and after my son went to bed) I try to make games. Mainly using XNA for game creation, but it's limited to windows, xbox and (win) phone. Writing games takes quite long using a programming language. I found construct2 and like it for being able to quickly try out new things. I'd like to create a rougelike (see wikipedia) web game (using construct2) with better graphics (but random levels etc.).

  • 14 presents with the cluster bomb hack ;-)

  • Thanks Kyatric, funny thing is that I read this tutorial but did not care enough about the badge, but one gets greedy over time...

  • I don't get an early adapter badge even though I bought a license.

    The rewarding system is kinda picky...

    <img src="smileys/smiley19.gif" border="0" align="middle" />

  • Noga, cool and thanks, that's exactly what I need! I'll have a look how to create custom plugins, this seems to be quite powerful.

  • Kyatric, I changed the capx and added comments. I replaced the outer loop with a simple condition, to make it less confusing. The capx represents this (in pseudocode):

    System->onEveryTick{

       int VariableInWrongScope = 0;

       foreach (TestObject in TestObjectList) {

          VariableInWrongScope = TestObject.MyInstanceVariable;

          if (VariableInWrongScope == 0) {

            TestObject.setInvisible();

          }

       }

       // is correct, but I don't want it accessible here

       if(VariableInWrongScope == 0) {}

    }

    What it should look like (but seems not possible) is this:

    System->onEveryTick{   

       foreach (TestObject in TestObjectList) {

          int VariableInCorrectScope = 0;

          VariableInCorrectScope = TestObject.MyInstanceVariable;

          if (VariableInCorrectScope == 0) {

            TestObject.setInvisible();

          }

       }

       // this won't work (this is what I want)

       if(VariableInCorrectScope == 0) {}

    }

    Maybe I misunderstand the structure of events and actions. It's also not critical (I can live with the broader scope)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the answers.

    Guyon: This is exactly how I did it in the posted capx. But at least now I know that there is no easier way. They should add OR and Else to the event page, it's a pain to work like this.

    Kyatric: The question was more subtle, I know what local/global means. However what I meant is that having two loops, the only way to add a local variable "that is accessible only within the inner loop (second loop)" is to add another sub-event, to be able to click on that subevent and create the local variable. If I click on the inner loop condition and select "create local variable", the variable is declared in the outer loop (first loop). It's still accessible in the inner loop, but not only (that was the point). Nevermind, I know how to cope with this, but it's irritating. Thanks anyway.

drpool's avatar

drpool

Member since 5 Nov, 2011

Twitter
drpool has 102 followers

Trophy Case

  • 13-Year Club
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Viral Game One of your games has over 100,000 players
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

18/44
How to earn trophies