Shady's Forum Posts

  • No one checked out the *.cap to confirm the bug? Ah well, I submitted it to the bug tracker last night anyway...

  • I just downloaded the latest version of Python (0.99.84) since global variables couldn't be accessed directly in Python with 0.99.82. Pumped and all, I ran a little test to see if it works fine with a 'Number' global variable and it worked perfectly. Delighted, I assign a python variable to a 'Text' global variable and tested it out, expecting fireworks. All I got was a crappy runtime error...

    Before I decide to post it on the bug tracker, I've replicated the bug and posted the *.cap file below to make sure it's not a problem with my laptop or anything.

    Also, try changing the global variable to 'Number' and assign it a number; should run fine with the number being displayed at runtime.

    http://www.box.net/shared/trqk3ydqrz

  • For my dialogue system I do as Mr Wolf mentioned above. I deactivate the platforming and also set the platform behaviour to 'Ignore Input'. Works like a charm.

  • This is also doable with events:

    http://dl.dropbox.com/u/5426011/examples/append2.cap

    req 0.99.84

    + Button: On Button clicked
      + File: File "dialog.txt" exists
      -> EditBox: Load file "dialog.txt"
      + System: Always (every tick)
      -> EditBox: Append text NewLine
      -> EditBox: Append text Name.Text & " :"&NewLine&NewLine
      -> EditBox: Append text """"&Dial.Text&""""&NewLine
      -> EditBox: Save file "dialog.txt"[/code:1ez2el68]
    

    That's good to know

    Though I think I'll stick with the Python solution since it's very simple! I should really try to use more of Python in construct, since i did recently start learning it in University. Will be a good way to put my skills to the test.

    Thanks R0J0hound!

  • As far as I know, there's no way to link Construct python scripts together. Like, if a python variable is defined in one script, you won't be able to access it in another.

    EDIT: Damn I'm stupid. You can do this. This is like the dozenth time this has happened to me in the passed day or two...

  • Wow, found a Python solution which is so damn simple. I was hoping for an event sheet solution because I thought it'd be too complicated in Python but all you need is...

    x = open('dialogue.txt', 'a')
    x.write("\n")
    x.write(Name.Text + " :\n\n" )
    x.write('"' + Dial.Text + '"' + "\n")
    x.close()[/code:wifmxk2a]
    
    A bit of testing, this is the result:
    
    [code:wifmxk2a]
    Shady :
    
    "I love Python!"
    
    Homer :
    
    "Don't you hate pants?"
    
    Joe :
    
    "I'm a plumber!"
    
    Supports.... :
    
    "Multiline!
    Right? 
    ...
    
    Guess so :)"
    
    [/code:wifmxk2a]
    
    Was going to delete the thread, but I guess it's better to have this as reference for anyone in the future wanting to do something similar.
    
    Python, my new found love
  • I just finished creating a GUI dialogue creator for my game which exports the text I input into edit boxes into the appropriate format readable by my game (e.g "NPC"=['dialogue1','dialogue2'] ).

    Right now I can simply copy and paste it into the text file, but I was wondering if there was any way to paste the output of an 'edit box' to the end of a *.txt document. I've tried INI and TextManipulator, and it worked with INI. But the problem is, it does not work with multiline edit boxes.

    A small example of what I want.

    Output generated:

    NPC =

    "Hello I'm awesome"

    "And so are you!"

    Click 'Save'

    Updated Text File:

    Player = 
    "Bla"
    "Blabla bla... bla"
    
    Char =
    "Melbourne >> Sydney"
    
    NPC = 
    "Hello I'm awesome"
    "And so are you!"
    [/code:3jwp20ya]
    
    Something that does that! I'm thinking it's possible with Python and I'm currently researching into it, but I want to know if it's possible without.
    
    Thanks in advance!
  • Gotta agree with this suggestion. Will be helpful as I'm in the same boat as you.

  • Solution found. Found out I was deleting an effect object which I stupidly forgot to place off-layout where all the other objects are in case I need them. Stupid mistake, but I guess that tedious deleting paid off!

    I still don't know why it broke the attack system, since it's not a crucial object, but all is well.

  • Another issue. Since I can't do much progress in my game as of now, I tried testing it on my crappy laptop to see if what I have so far works. It runs at around 15 FPS and the camera goes completely wonky, where it shifts back and forth (in a jittery manner from 0 to ~6000 on the X axis). I then replicated it on my PC where I capped the frames to 25 FPS and the same thing happened... it's kind of like a reverse dampening effect, where the jitter starts off slowly but increases rapidly.

    Once in this immense jitter mode, if I move the window with the mouse cursor the camera freezes at a location (eg. x=6000). If I resize the debug window and leave the mouse clicked for a few seconds it resets the scroll location to that $ thing, but I think that's unrelated to this.

    Same thing happens with 30 frames but at 35 frames, it just shifted like a pixel or two back and forth. I think it's safe to say it's dependent on the frame rate. At 37, the jitter isn't evident anymore.

    I'm think you may have your hands full at the moment with that $ bug, but since this bug is dependent on framerate it may (or may not) help you with solving that bug too...

    Additional info: this happens during a cutscene where the camera is zooming and scrolling to another object at the beginning of the layout. I'll be happy to provide anymore if need be.

  • (EDIT: SOLVED)

    This error has caused a major halt in a game which I was so adamant in completing. It's been a week now and I still have not the faintest of clues why this is happening.

    When my character is attacking on a layout called 'Level One' his attacks are fine and smooth, as it should be. When he attacks on a layout called 'prologue' or 'courtyard', the beginning of the jump attack is jumpy.

    Example:

    <img src="http://i42.tinypic.com/9jztyb.jpg">

    (graphics are incomplete)

    Here's the issue:

    • Both 'prologue' and 'courtyard' are clones of 'Level One' and use the same event sheet ('main'), which includes all other event sheets such as 'Attack', 'Level' and 'Damage'. So event sheet is not the problem from what I know.
    • All I've added in the new layout is an additional tileset, but this error happens when the user is on the original tileset too.
    • All three layouts have the same character sprites as it is a clone afterall.

    I just cloned 'Level One' and ran it, it worked fine. I then deleted half of the level, leaving only the first half and the issue sprung up... I am stumped.

    I've been trying to think of a solution for a while or a possible cause but I'm close to a dead end. The only thing remaining to do is delete my level section by section and see if I can find a solution through that... it's pretty big, so it's going to be a tedious task.

    Has anyone else had a similar encounter? I'm kind of reluctant posting the .cap file in public, but if anyone wants to help I'll send it via PM. Any help would be greatly appreciated!

    ... I was supposed to have posted a demo by the end of next week too

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There's already a shortcut key? Mind Blown.

  • Okay, so far I've been able to use the layout function successfully. I have been able to integrate it into my game, where you talk to some random blokes and have the opportunity to play a minigame like 'guess the number' or 'target shooting' (to raise money to enter a tournament).

    No errors and all works well so far. The only thing that's a letdown is the Layouts Object is too bare and unfortunately seems to be ignored. It's lacking some very simple features, such as changing the layout it displays in real-time through the events sheet. I tried doing so through Python, but failed... what I'm doing now is creating a new object for each layout I want to display, which isn't very efficient at all.

    A really great tool which has so much potential. Now that I've experienced its capabilities, I may have to use it for my in-game menu.

    I'm just wondering, do the creators make the code available for such objects? I doubt I can do much anyway since it'd probably be coded in C++...

  • Well, it ain't gonna get better without anyone using it! Thanks for the information guys. I'll try to implement it into the upcoming demo of my game which should be released in a month. I'll post any errors here (and on the tracker).

    EDIT: Issue one: Cannot change the Layout being displayed via events, meaning each minigame must need its own layout object. That complicates things... (well, time to put my shallow Python knowledge to the test!)

  • I was wondering, just how reliable is the Layout object? It seems that it hasn't been touched in a while and it also doesn't have an event where one can set it to activate/deactivate, so is it safe to assume it hasn't been completed yet?

    I want to use it to incorporate simple mini games into my game, which will be the simplest approach I can think of. I tested it, it ran fine, but is there anything I should know about before creating half a dozen minigames utilizing the Layout Object?