Xombul's Forum Posts

  • Example.... I want to do some python stuff with all the MonsterSprites that overlaps LaserSprite

    I would create a condition, MonsterSprite.overlaps LaserSprite

    and then create a PythonScript that works on the picked objects from the condition.

    From Python I am not able to successfully use Sprite.Overlaps to check for ovelapping Sprites ... Any hints?

  • I am using the right click insert script. And it works...

    What I am asking is to insert a Python Condition or a Python Action... a slight difference.

    Also... it seems that the new version requires python 2.6 and not 2.5. The installer installs 2.5 and the "insert event warning popup says 2.5 as well"

  • Untill now I have been a very unhappy Construct Python script coder. But now

    Apparently some Issues have been fixed. Now code like the following actually works:

    for spr in Sprite:
    	spr.X += 1
    [/code:3ak5k145]
    
    This is enough for me to do most of the stuff I want to.
    
    Now I am missing an option to use python as actions without the System:Run 
    And an option to use Python scripts for picking objects in the event/condition part of the events
    Basicly an option to pick and unpick objects and access the collection of all picked objects.
    
    Will we see some better python integration in the future?
    
    Cheers
    Andrei
  • Python scripting is broke.

    You can do some python scripts in construct but there is no way to itterate over lists of objects. You can't access all "Objects" of a certain kind in Python.

    Missing python features are:

    Iterate over collections of "Objects" like:

    for spr in Sprite:

    do something with sprite

    And if you could use python in the action part of events it would be nice to be able to access picked instances. So something like this:

    for instance in Picked:

    do something with that instance

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

    So python is broke. Unfortunately so are the loops in the event system. So for now I am just waiting and oberving the progress of Construct. I still think it shows much prommise.

  • My problem is that with the advanced overlapping I get an extra "overlap event" with an instance that is already destroyed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Another overlap difference example:

    This is for a detector flood fill.

  • Example cap http://www.scirra.com/phpBB3/download/file.php?id=412

    I have another example with a flood fill of detector objects

    http://www.scirra.com/phpBB3/download/file.php?id=413

    This example only works with one of the two types of overlapping. And when it works it for some reason inserts two detectors at the first block posisition. That is also a bit weird (bug?)

  • if i have two Sprites A and B and want A to move to the right while overlapping with B:

    If I use the A overlaps with B the loop only iterates once per frame.

    If I change it to use the System is Overlapping A and B it works perfectly.

    Why aren't these two behaving in the same way?

  • I actually also had problems doing recursion with ordinary call function actions. I threw the example away so I will see if i can recreate it again.

  • I tried to test recursive function objects and implemented a n'th factorial example.

    http://www.scirra.com/phpBB3/download/file.php?id=409

    but it fails

    Is it possible to implement recursive functions with the function objects?

  • I think maybe combining the resources bar and project bar in to one might help...and things could be sorted in to sub-folders within that. Then there'd be a single place to organise the entire application. Sound good?

    YES!

  • I made one with "+" object and it works pretty well but you have to limit things and disable selecting when blocks are falling.

    I have tried this several a few times before... here is my current go at the "clustor detector pattern"

    [attachment=0:22r4u5fn][/attachment:22r4u5fn]

    I just wish I could somehow do it instantly instead of delaying stuff a few frames.

  • Well... I dont have any framerate problems. It just takes several frames to compute.

    And for the idea of using recursion. The function object fails to do any propper recursion.

    I tried to implement a simple recursive calculation of the n'th factorial. n * (n-1) * ... * 1

    [attachment=0:39icf8w2][/attachment:39icf8w2]

    it fails...

    Any ideas on how to fix this?

  • Before posting this one I did a funny flood fill experiment.

    The idea was to create a detector object that is shaped like a " + " and that is slightly bigger than the bricks... the idea of this is to trigger collisions in the directions n, s, e, w

    If the detector objects detects a collision it replaces the colliding brick with a detector. This gennerates a flood fill and a nice effect... but this approach will take several frames for the flood fill to be complete. But I really like that way of generating the flood fill and in general the idea of adding "detectors" dynamicly to the stage.