bitworks's Recent Forum Activity

  • R0J0hound - thanks, but I'm aware of the syntax for this, as well as the 0/1 values for True/False in this case. The thing is - I've never been able to use it without a crash and critical error in my projects. I'm not complaining about lack of features, rather than stability of them. :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, to be honest I'd LOVE some minor improvements / fixes, not really anything big but still. The things like not every function provided for Python by the System object works (it usually crashes the app). I mean, can't I really change the visibility of a layer by Python (there's a function for it, but it crashes anyway), by I can by using CC editor? Oddities like that. I can deal with the GUI and directx, in a matter of fact directx doesn't really bother me, I like it. And multiplatform? How about one platform (PC) but more stable for the player as well as the creator? Making one group of users really happy vs making various groups of people "eh... I suppose?".

  • No problem, I'm just glad I managed to fix it. And as a results of my experiments: one CAN use other Python libraries than only those provided in CC by compiling them (only 2.6 version, otherwise there will be a Magic Number error... first time seeing that I thought that some computer voodoo has gone bad) and adding into the Data folder. It's weird that somehow this 2.7 StringIO found its way into that folder in the first place...

  • Well, to be honest I solved it somehow, but why exactly it broke down is still a mystery for me. I depend heavily for Python in my projects, so I do most stuff with it.

    First, even a simple script like: Function.Call("my_function",0) didn't work in a new , empty project (aside for the function plugin). Then I reinstalled CC, same problem but NOT with this new, empty project. So I downloaded Python 2.6 and manually copied the StrinIO.pyc into CC Data folder. Well... that didn't help.

    But what did was deleting all other StringIO.pyc from other locations - it seems that in desperation I copied that file into the project folder and it was a 2.7 version. After deleting it, and tweaking the code - so I deleted all the in-developement parts and left only those that I knew would work - I could resume coding again.

    I posted all this for anybody in the future with the same problem. Oh, and Jayjay, I didn't try exporting the game yet. That would test something, out of curiosity?

  • Uuuhh, I messed up. :/ Something happened this afternoon that rendered Python in my CC absolutely useless. Nothing works, it seems, as there's only the "An error occured in python, but construct is unable to obtain any error information without StringUO.pyc".

    I've tried feeding the DATA\Python StringIO.pyc from both Python 2.6 and Python 2.7, tried reinstalling CC but to no avail. Is there another place where StringIO.pyc persists after reinstall? I really don't know how to fix it, and this happened when I finally get going with my project (downloaded Spriter and I'm in heaven right now).

    Any, ANY advice on this would be appreciated!

    Edit: I suppose I should add that this was not a problem before, as Python worked with my CC pretty well. The error seems to be project-specific, but anyway... could somebody point me what version of Python does CCr2 use?

  • F'course we can help you. :) The first thing you must know while working with Construct (or any game building engine) is that to think in multiple ways how to cheat reality and use the tools you're given.

    So, let's say that we have a ball falling.

    1. Create a ball object.

    2. Set ball position to X,Y.

    3. Ball object, apply movement type: physics.

    4. On collision with obstacle - ball object movement: static.

    5. On collision with player - ball object angle = player angle, speed = 100 (or just any other values / change movement that suits your needs)

    There's no need for particle system to do any work here. I didn't provide you with the straight solution, but I hope I did help you to develop a kind of framework for thought. :)

  • But.. what are your methods? :) It would be really great if you would elaborate, I myself aren't a genius, but maybe I could help you improve some of them.

  • Hm... well, it seems that you need to build a simple question / answer database. Some simple array like:

    • Question 1 | Answer A | Answer B | Answer C | Right Answer
    • load question
    • if Player Answer = Right Answer -> +1 point, next question

    Try using an array object. :)

  • Well.. do you mean "slow down to almost zero and stay like that for X time" thing? I can think of a few possibilities to make that happen. A simple counter/value type would do...

  • About the spikes... Koronello, did you try "if player X = spikes X -> spikes fall down" type of actions? I don't know about multiple instances, but in theory, it should work.

  • Sorry for bumping an old thread, just making sure that anybody who wants the solution will find as much info as they can get.

    I recently run into the "no module" ImportError, and figured out this:

    • CC comes with some of the modules preloaded in the ..CC\DATA\Python directory
    • some of it, like my base64 module are missing
    • download Python 2.6, install it, find the modules that you're lacking
    • if you have only *.py files, you have to convert them into *.pyc files (probably)
    • to do that, use Python! [import py_compile / py_compile.compile("base64.py")]
    • copy the *.pyc file (module) that you're missing into ..CC\DATA\Python directory
    • import and enjoy, should work :)

    My original problem and the extended solution: scirra.com/forum/topic67855.html.

    Cheers!

  • I've looked into it. Well, for starters - you made your enemies ALWAYS (event #7) have the speed of 80, so even if they collide with something, they will instantly gain the speed of 80. :)

    Try using something else, for example:

    1. if ENEMY is NOT colliding with obstacle AND ENEMY speed < 80 - set ENEMY speed = 80

    2. if ENEMY collides with obstacle AND ENEMY speed >= 80 - set speed to 5 / bounce / something else

    The problem is that every each second (or tick) the program makes your monsters have the speed of 80, so collisions don't work.

bitworks's avatar

bitworks

Member since 14 May, 2013

None one is following bitworks yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies