R0J0hound's Recent Forum Activity

  • 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]
  • Set angle to "2*wall.Angle - Player.Angle" does reflect the objects angle. Another way is using overlapping at offset to see if there's a wall horizontal or vertical from the object and just reversing the sign for either the x velocity or y velocity.

    Here's an example with both methods:

    http://dl.dropbox.com/u/5426011/examples3/reflect.cap made in 0.99.96

  • You just need the angle of the wall to reflect off of, thin sprites work well for that.

    + Player: On collision between Player and wall
    -> Player: Set angle to 2*wall.Angle - Player.Angle[/code:357lq604]
  • It's that enable scripting bug, uncheck it and the crash will be eliminated.

  • [quote:35agt5vk]Well all the files downloaded correctly, then when its installing it gets up to a certain point, but eventually just crashes, windows says the program has stopped working, and the installer shows a failure on all the installation because .net messed up (after it had said it worked)

    Does it give you the option to not install .NET? If you can do that and try again.

    Or you can try installing .net separately first.

    http://msdn.microsoft.com/en-us/netframework/cc378097

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I used visual studio express 2008 for all my plugins.

    This thread tells how to get it to work:

    http://www.scirra.com/forum/viewtopic.php?f=7&t=5600

    Or if you're still a student you can get visual studio 2008 pro here:

    https://www.dreamspark.com/default.aspx

  • The problem becomes much simpler if you use only the change in MouseX to rotate the dial:

    http://dl.dropbox.com/u/5426011/examples3/dial2.cap made in 0.99.96

    Here's an example of a dial the way you've been doing it with the angle to the mouse. The range of motion is from 135 degrees clockwise to 45 degrees, which is about the range of motion that real volume dials have.

    http://dl.dropbox.com/u/5426011/examples3/Dial3.cap made in 0.99.96

    cheers

  • This is what I use for grid snapping:

    x=int(x/16)*16

    y=int(y/16)*16

    You can change 16 to whatever grid size you want.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound