drpool's Forum Posts

  • 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" />

  • Try Construct 3

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

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

  • 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.

  • I guess the account has quite a lot of restrictions, at startup construct2 tries to do (e.g. write) something it is not allowed to do under this conditions.

  • +1 for both from me

  • Hi,

    I have some questions, regarding the use of construct2 that I could not find in the examples, tutorials... I don't want to create separate topics for each as they are small

    Regarding the use of the event page

    1) OR Condition missing

    As far as I understand adding another condition to an existing one is a AND operation. What I often need is a OR operation. I can do it with a workaround, but I feel it should be far easier to do. See the cap here:

    http://dl.dropbox.com/u/40417570/Tests/questions.capx

    2) Else Condition missing

    Similar to 1) Creating an else case for a complex statement is basically duplicating code (and inverting it)

    3) Local Variable appears in wrong scope

    Example: I create a for loop and another for loop inside. I then want to create a local variable in the inner for loop. I highlight the inner for loop and select add local variable. The variable is created in the scope of the first loop. (see the capx above)

    4) No booleans in local/global variables

    Topic says it all. I can't find it. Why?

    Possible bugs (not event page related)

    5)Flash effect doesn't work for text elements

    create a text object. Add a Flash effect. Run-> text not blinking (not visible at all)

    6)How to manually trigger fade effect

    Add fade behavior to sprite. Always gets triggered at object creation. How can you trigger the fading with an event? It's used in the lazer version of ghostshooter, but here objects (death flash) are created on events and then fade out, that's something else.

    7) object time scale doesn't work on all objects

    While it works well on the player (having the 8-direction behavior). It doesn't work on other sprites. See example capx above. Note that I used delta time (dt) as in the tutorial here:

    http://www.scirra.com/tutorials/67/delta-time-and-framerate-independence

    Thanks in advance for helping me out.

    Ps: the preview button in the "create new topic" in this forum doesn't work either...

  • Surprisingly I could not find anything in the forum pointing to this. There is a similar (closed) bug though.

    Easy to reproduce, no capx needed.

    1) Open contruct2

    2) in Event Sheet try add Condition "System->Compare Variable" (there is none)

    3) Press the go back button...

    ---------------------------

    Construct 2 Check failure

    ---------------------------

    Check failure! This is probably a bug:

    Combo requesting item out of bounds

    Condition: false

    File: Projects\Parameters.cpp

    Line: 1073

    Function: class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > __cdecl CComboBox2::GetItemTextAt(int) const

    Build: release 67 (64-bit) checked

    Component: Construct 2 IDE

    (Last Win32 error: 0)

    You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way. Hit Ctrl+C to copy this messagebox - it's useful information for the developers, so please include it with any bug reports! Click 'Abort' to quit (unsaved data will be lost!),'Retry' to turn off messages for this session and continue, or 'Ignore' to continue normally.

    ---------------------------

    Abort   Retry   Ignore   

    ---------------------------

  • Wow, that was quick. Thanks a million. So it was the dummy object that one needs to create outside for using dynamic objects. Good for pointing out the loop overhead, I feel abit stupid now though :-(

    I still don't know the use case of system->trigger once but I'll try to avoid it now...

    Michael

  • After playing around with a single sprite version (having the same problems) I found out that the System->TriggerOnceWhileTrue condition doesn't do what it should (trigger animation only once .. for each sprite)

    I changed it to set a bool on each sprite (flashing) which basically should be the same, however here it works.

    http://dl.dropbox.com/u/40417570/Tests/SingleSpriteWeirdBehavior.capx

    I did the same for the multisprite project with some more astonishing results. All sprites except one (the first created?) work ?!

    http://dl.dropbox.com/u/40417570/Tests/MultiSpriteWeirdBehavior2.capx

    I really like this toolkit, but it gets rather fast frustrating to work with.