zeno's Forum Posts

  • Thanks for the plugins :D

  • Well posting on the construct forum will result in a all around win for Construct but it all depends on what you are doing. In my opinion for the following tasks these are the results -

    Exe Games = Construct Wins

    HTML5 Games/Web Apps = Construct 2 Wins

    Flash, Java, iOS Games = MMF2 Wins

    App/Program Dev = MMF2 Wins

    If Coding:

    Python Coding = Construct Wins

    General Coding (Python, Lua, .net, C#, OpenGL, Others) = MMF2 Wins

    Apparently Constructs developers used to make extensions for MMF before making construct. Also Construct uses the same events method (Click programming) and a similar program layout which is why they might have problems with Scirra. Both company's probably have issues with the other however i am guessing.

    As for the reason they would have edited/deleted your post is because they are a business and want to make sales. If people are discussing other software it might loose them sales so it is understandable, some other company's will do exactly the same thing also.

    I don't get this whole go to a official forum to make a Vs thread really though. If you are posting on a programs forum it will always be the winner because most if not all the people posting reply's will be using that program.

  • Thanks i have it working well now, the main thing was using a extra start of layout event as it makes things a lot simpler than having a single code in a always event. I then just use what tulamide suggests with a extra y position also if i ever need that.

    Btw a offtopic question i have is if anyone else find getting a python errors/debugging annoying? when i get them it seems to keep triggering popups and crashes. Hopefully this could be fixed somehow so there is only 1 error instead or a list/debug view rather than popups to make it a nicer process.

    Usually i fix any errors without a problem but they can show with a bad indent so sometimes they make things frustrating. I usually have to click close about 6 times each error i found but you can keep clicking for much longer if you are not closing them.

  • Yes this is in python code. Basically what i am trying to do is store a variable once like you would with a start of layout event however the python code i need it for is running using a always event in the editor.

    I did this because i basically need it for a movement code i made which works fine other than this variable i need. The reason i want the variable is so i can work out the traveled distance from a start point and then run things in the code depending on the value.

    So say a sprite was at X 80 rather than storing the value as 80 i need it to be dynamic for example if i randomize the start position which is why i was trying to get it via Sprite.X instead.

    So basically once set the starting value would never be updated like it is currently. I need something like get original X position rather than the current x position which updates but i can't find the option for that.

    Any ideas?

  • This method doesn't seem to work for me, i do this (with indents, for some reason it doesn't like to copy/paste well)

    tempa = 0

    if tempa == 0:

    tempb = Sprite.X

    tempa = 1

    Text.SetText(tempb)

    but the tempb value always increases still. I know you said do it by variables but i need this to be dynamic without the need to setup a global in the main Project editor beforehand (do it all in a single bit of code directly basically).

    I do this -

    System.SetGlobalVar(tempb) = Sprite.X

    but i see no Get global variable available in the System list. I tried just tempb and also System.global(tempb) etc but get errors like can't assign to function call etc.

    Do you have a simple python code example to set then get globals if possible?

  • Good idea, i agree it would be much nicer to have it built directly into the program.

  • Ok thanks

  • Thanks i will try this

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Since the whole thing is open source, you just find the code used during compiling of a cap to exe, and stitch it together manually

    Even though construct is labeled open source i have found there is actually quite a few official plugins and behaviors that have code which is not available.

    That is just official things and there is then 3rd party plugins which are closed source so you would also have to make your own versions of those plugins or avoid the use of any plugins other than the ones available the SVN.

    Technically it is possible though but as lucid says it would probably just be better to write new code. I am guessing some people making games will use programs like construct to make quick prototypes for games before coding them.

  • Hi, i am just wondering how can you store a value once that is always changing with python?

    I can do it easily enough if i put separate code in a start of layout event then send it in but i am running the needed script using a always event but want to store a temp value for comparisons/math and keep it in the same code. I need temp to be the original location -

    def Move(speed):

    temp = Sprite.X

    I can't find the needed option in System so i am not sure how to do this. Right now it always updates as expected but i can't find how to do it how i need. I am quite new to python so i don't know if there is a non construct based way to do this. Does anyone know?

  • Thanks tulamide

  • Thanks these plugins will be very useful

  • This is really great, thanks R0J0hound

  • Hi, i have been testing the python examples to load videos using python by R0J0hound and these work great. There is a problem however which is if i try to change it to use the app path i get errors.

    This works -

    flash.LoadMovie(0, r'C:\Tooltip.swf')

    These won't -

    flash.LoadMovie(0, r'.\Tooltip.swf')

    flash.LoadMovie(0, r'System.AppPath + Tooltip.swf')

    I tried various other things but nothing works but the fixed path so i am wondering what is the correct way to make it load a file from the same folder as the app instead?