Alcemon's Forum Posts

  • I wanted to use the brightness effect to create a black outline of my sprite (that I use for a specific game mechanic).

    More graphically speaking I have this

    Original Pic

    and I want to get this (through a smooth darkening animation (so using animations is out the question).

    Darkened silhouette

    However, after applying the brightness effect I actually got this:

    Non-alpha brightness

    The problem is that the effect does not preserve the alpha of the original sprite.

    Is there currently a way to get a brightness effect that does preserve alpha?

    Thanks in advance

    PS: I apologize if this is not the correct place to post but I wasn't sure if this was a bug (as most of the other effect do seem to preserve alpha) or a "how do I do?" (because there are well-known ways to do this) or a feature request (because that it is something that is known to be missing)

  • Funny that I missed that thread because making a CC to C2 converter (even if it's a bit of a lossy process) was exactly one of my secondary objectives.

    Thanks again, my progress is probably not going to be jet fast but I will do my best with the time I have.

  • Maybe it's an OS thing, my Python 2.7.3 was in Linux and I deliberately installed Python 2.6 on my Windows boot to test whether it worked on the old version.

    Maybe it was because of a case of '\' vs '/' or something OS-dependent.

    In any case, thanks for everything (including the last example), I will report on any useful tool that emerges from this work.

  • Works like a charm with Python 2.6.

    Apparently the problem was that I was using Python 2.7+

    Thanks for everything!

  • Ok, I tried the code on the cap without resaving it in the new Construct and predictably I got a version error (posted at the end of this post for completeness).

    With resaving in the new CC I get the message that I originally posted.

    I will try debugging (and actually trying to understand the code) and post the results here.

    Thanks

    --result when running the cap without resaving in a new CC--

    test=capreader.capfile('spaceshipo.cap')

    Traceback (most recent call last):

    File "<stdin>", line 1, in <module>

    File "capreader.py", line 130, in __init__

        this.rw(cap) #<---

    File "capreader.py", line 145, in rw

        rwHeader(cap,'CApplication',18)

    File "capreader.py", line 51, in rwHeader

        assert version==newver, 'invalid version %d!=%d'%(version,newver)

    AssertionError: invalid version 18!=8

  • Im using python 2.7.3 and the Construct that is currently up for download (R1.2).

    I will try resaving the cap, without resaving and finally debugging and repost here the findings.

    Thanks again for all the help

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello again, running the script you posted on spaceship.cap from the demo page, gives me the following result:

    test=capreader.capfile('spaceship.cap')

    Traceback (most recent call last):

    File "<stdin>", line 1, in <module>

    File "capreader.py", line 130, in __init__

        this.rw(cap)

    File "capreader.py", line 199, in rw

        rwArray(cap,this,'layouts','C',CLayout)

    File "capreader.py", line 67, in rwArray

        new.rw(cap)

    File "capreader.py", line 236, in rw

        rwArray(cap,this,'objects','iC0','uid',CObj,'obj')

    File "capreader.py", line 80, in rwArray

        new.rw(cap)

    File "capreader.py", line 268, in rw

        rwHeader(cap,'CObj', 3)

    File "capreader.py", line 50, in rwHeader

        assert name==newname, 'invalid header %s!=%s'%(name,newname)

    AssertionError: invalid header CObj!=?C?C?BdB???~?>????Sprite??Sprite6

    I will try to debug it over the next week (as Python is not my forte) but if the problem is trivial to anyone please feel free to enlighten me.

    Thanks again for all the help.

  • Wow, you have saved me a world of pain.

    Thanks a lot.

  • Thanks for the quick reply. This answers my first question handsomely.

    Are you sure it's not possible at all? Maybe it would just be very bothersome to do so. I am currently looking at the cpps used for creating cap file, just dumping the event sheet structure into a txt file looks like a feasible first step.

    PS: I would really like to make it work with CC if possible as I would like to keep the ability to hack away/workaround any issues I may find.

  • Hello everybody,

    I am a programmer wanting to use Construct Classic as event and sprite behavior editor. To integrate CC to my current project's pipeline I would need to be able to export event sheets, properties and other info into an open and readable format (similarly to what Construct 2 does with XML).

    Now, I searched the forums for quite a while and I could not find anything related so I assumed that it is either trivial (and I am making a stupid question) or it hasn't been done yet.

    I would appreciate if anyone can help find out which one is it and, in case it's the 2nd, the advisable way to go (e.g., Plugins, compiling the CC GUI and implementing a new saving procedure etc.).

    Many thanks in advance

    PS: I prefer to use CC as opposed to Construct 2 because it's open source.

  • Hello all,

    I am from South America and I am looking forward to work with Construct Classic :)