R0J0hound's Forum Posts

  • 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

  • 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.

  • I found this site with a pretty good explanation on how to do it:

    http://www.bytearray.org/?p=91

    Here's my attempt at it:

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

    My implementation isn't complete since it only accepts exact mouse gestures. Ideally a gesture should be detected if it's close enough.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No need to calculate the angle. Just give the bullets the physics behavior and the kickback from the bullets hitting the player will be handled automatically.

    Here's an example of what I'm suggesting:

    http://dl.dropbox.com/u/5426011/examples3/space.cap

  • I unchecked enable scripting and it worked.

  • Put the object to be created in quotes:

    System.Create("Sprite","top",n,30)[/code:3ml3sjfg]