R0J0hound's Recent Forum Activity

  • I've found that it causes a crash when too many physics objects are placed overlapping each other. Your cap can be fixed by removing this action from event 3 of "Layout 3 Events":

    -> CloudsPlatform: Set position to Present.X, Present.Y + 25
    [/code:2iua7hjq].
  • [quote:1jkn8tl5]I would like to use NumPy in my project, how would I go about importing it, into construct?

    Scidave has a guide how to do it:

    http://www.scirra.com/forum/viewtopic.php?f=8&t=5920&hilit=python+external+libraries

    Just adapt it to NumPy.

    [quote:1jkn8tl5]EDIT: While I'm here, also is there a direct way to import an array from my pyscript into a Construct array?

    For a one-dimensional array:

    MyArray = [1,2,3,4,5,6]
    
    Array.SetSize(len(MyArray),1,1)
    
    for i in range(Array.SizeX):
    	Array.SetAtX(i+1,MyArray[i])[/code:1jkn8tl5]
  • [quote:hptffapb]with the text manipulator the "For Each Substring" appears to not work. That is kind of holding up progress a bit.

    You can do the same thing with the system text expressions:

    + System: For "" from 1 to NumTokens(Text.Text, " ")
    -> Text2: Set text to GetToken(Text.Text, LoopIndex, " ")[/code:hptffapb]
  • It can be done by including some dlls in the construct directory.

    See this topic:http://www.scirra.com/forum/viewtopic.php?f=3&t=7871&p=60991

  • [quote:wck4e4pj]I wish we could rip out python code from Construct though. Maybe I could ask in the suggestions thread so it can be added in Construct 1?

    There would be nothing to rip as events are not written in python internally. Python is merely an extension that can be added in addition to events. Unless you put python scripts in your game, python isn't utilized at all.

  • [quote:1bd7dz9x]Thanks for the links, do you know any tutorials in downloadable form like .pdf?

    http://docs.python.org/download.html

  • [quote:jccb6cdu]Is it possible to rip the python code from a .cap/.exe made from construct, or will I have to do stuff from scratch?

    If you have the cap you can just copy and paste the python scripts.

    [quote:jccb6cdu]I want to do this because it makes making my game modifiable far easier then rewriting every event in python. That and I don't know python, and I hope that I can learn from reading the events in python.

    Construct doesn't convert events into python, you would have to rewrite your events into python manually.

    For learning python in general I've found these two links to be useful:

    http://docs.python.org/tutorial/index.html

    http://www.tutorialspoint.com/python/index.htm

    If I misunderstood your question please clarify.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello happy constructors,

    [quote:2zzihyss]Whats wrong exactly with save/load?

    Why and how behaviours colides with save/load?

    What are the effects of this collision?

    Each object/behavior has code in it to handle saving and loading of it's state when using the Save\Load action. I'm pretty sure the issues that come up with Save\Load action is because many of the object/behaviors don't save and load all of their state. The question is which plugins/behaviors?

    Irbis you identified two:

      1. Sine behavior: The source code isn't avaliable so I can only speculate that it's not saving the state of it's angle or opacity at all so with repeated Loads the angle and opacity will change.
      2. Bone behavior: I looked at the source and it does no saving/loading so when you use the Load action the bone behavior is reverting to it's original state.

    Also be advised that many 3rd party plugins don't save/load their state, my "Resource Plugin" included. So issues with them going back to their original state when Loading can be a problem.

    [quote:2zzihyss]How to avoid problems with this issue?

    For objects that you don't want to save\load you can give the "No Serialize" attribute in the editor.

    [quote:2zzihyss]and why a broken feature is NOT disabled???

    It works quite well with many objects such as sprites.

    -cheers

  • The only reasons for crashes is if the file has not been extracted yet or there are no Resource instances. In both cases the resource plugin doesn't crash, it is another plugin trying to load a file that crashes.

    The expression Resource ("foo") will return the path of the file if it's been extracted, otherwise if the file isn't extracted it will return an empty string :"".

    The action of loading a file with the path "" is what causes the crash. For example this will crash:

    -> EditBox: Load file ""[/code:3s0tnvwh]
    
    All that should be needed is 1 global resource object.  When a object is global it will exist on the layout it was created on then all other layouts run after that.  If there are no instances of Resource the expression [b]Resource ("foo")[/b] will return 0, which also causes a crash if it's used as a file path to load.  It's a default behavior of construct to return 0 when a expression is used and there are no instance of that object.
  • [quote:2cyb294m]How would I get this "2*wall.Angle - Player.Angle" to work with X/Y Velocity?

    First convert X/Y Velocity into an angle and distance:

    angle_of_motion = angle(0, 0, X_Velocity, Y_Velocity)

    speed_of_motion = distance(0, 0, X_Velocity, Y_Velocity)

    Next Find the bounce angle:

    new_angle_of_motion = 2*wall.Angle - angle_of_motion

    And then convert back to x/y:

    X_Velocity = speed_of_motion * cos(new_angle_of_motion)

    Y_Velocity = speed_of_motion * sin(new_angle_of_motion)

  • Click

    File -> Options -> Keyboard shortcuts: Customize...

    and you can add and change shortcuts for all the ribbon buttons.

  • The problem of sonic powering up left slopes but not going up right slopes is because the wrong angle is being used with slp*sin(angle).

    In the GeneralPlayer event sheet, events 126 and 130 you're using:

    PlayerSprite.Value('SlopeFactor')*sin(PlayerSprite.Angle)[/code:9v70oopf]
    PlayerSprite.Angle is perpendicular to the angle of motion (PlayerSprite.Angle-90), so change to be parallel:
    [code:9v70oopf]PlayerSprite.Value('SlopeFactor')*sin(PlayerSprite.Angle-90)[/code:9v70oopf]
R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound