linkman2004's Forum Posts

  • One way to do the piece snapping would be to have each piece store its correct position in two private variables - something like 'correctX' and 'correctY' would do.

    Then, when you release the piece with the mouse, check the distance between the piece's actual position and correct position using the distance() expression in the system object. If the distance is within some set tolerance - say, 10 to 20 pixels - set the piece's position to the correct position.

    Be sure to let me know if I need to clarify any further. I hope this helps. :)

  • You need to be enclosing your arguments in quotation marks when they contain spaces. In that case, your command line expression in event 12 should look like this:

    """" & global('CurrentSteamPath') &""" """ & global('CurrentLinkPath') & """"

    And this is what your batch file should look like:

    echo off

    mklink /J %1 %2

    pause

    As a note, to display a quotation mark in a string, you need to use two of them so that Construct knows you just want to display one, rather than end the string(this is an escape character). This is why there are, like, a billion quotation marks in the above expression.

    I hope this helps. :)

  • It's been a long time since I made this, so I'm not quite sure, but if you have spaces in an argument, I'm pretty sure you have to enclose it with double quotation marks.

    If that doesn't work, send a CAP my way and I'll help you work it out from there.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I listen obsessively to a small number of anime openings/closers.

    I don't really drink anything until My throat feels dry - then I'll chug a glass of water.

  • Alright, I've found myself with some free time after finishing up a project I've been working on, so I'm going to see if I can hammer out some of the MagiCam bugs/suggestions people have been throwing out there.

    I'm also wondering if anybody would be interested in a MagiCam plugin for Construct2. That would likely be a little farther out in the future - I'd have to learn JavaScript - but I'm looking to gauge interest in the mean time.

  • You do not have permission to view this post

  • Try this -

    random(2) * 4 + 1

    Random(2) gives you either 0 or 1.

    Granted, this only works for the given example. A fancier method would use the conditional operator as such -

    (random(2) = 0 ? numA : numB)

    This acts like an if statement. numA is returned if the condition -- random(2) = 0 -- is true, and numB returns if false.

  • If I can find some time, I'll look into the crash issue and see if I can fix it. I've got some other things to look at as well, so hopefully it will be sooner rather than later.

    In the meantime, it might be wise to work out your own scrolling system just in case.

    EDIT: I just thought of something. Do you have the MagiCam marked as global? I don't have support for that - for various reasons - and I believe others have had issues with it.

  • Whoa, this is a great plugin. Exactly what I was looking for.

    I've been having some trouble understanding everything tho, is there any documentation on it? Like, I can't read a single event sheet line and fully understand what's written haha.. like the sprite "weight", I have no idea what that is supposed to be.

    Thanks! The only real documentation is the included example, so for any questions you have, feel free to ask away.

    As for the matter of "weight", this is used to determine how much influence an object has on the camera. This is only used when a camera is following more than one object. For example, if your camera is following ObjectA with a weight of 2, and ObjectB with a weight of 1, the camera will follow at a point closer to ObjectA than ObjectB.

    I hope that explained it well enough. Just ask if you're not sure on anything!

  • I've been having this exact problem with IE9 on the WP7 Mango Beta. Here's to hoping it gets sorted out quickly.

  • You might want to take a look at my MagiCam plugin; it features pretty much exactly what you're wanting, and it comes with examples demonstrating a similar effect.

    MagiCam Plugin

    I hope you find this of use!

  • You do not have permission to view this post

  • It's from Nichijou. The world would be a better place if everybody watched it.

  • That's correct.

    As for what's high, 1024MB is definitely a sizable amount. It would probably be wise to keep VRAM usage under 256MB if you're targeting a large amount of computers.

    Many lower end graphics chips, especially those by Intel, don't have dedicated VRAM, and instead share the main system RAM. This generally reduce the amount you have available for graphics, and even if there is a large amount available, it's still much slower than dedicated VRAM.

    Just a heads up.

  • To figure out how much VRAM an image will use, you multiply the width and height together, multiply that by 4 to get bytes, then divide that by 1024 to get kilobytes. So a 32 x 32 image would be:

    (32 * 32 * 4) / 1024 = 4KB

    Transparency doesn't matter when considering VRAM, as the images are stored uncompressed.

    Also keep in mind that most video cards will store the image in a texture that is rounded up to the nearest power of 2 size, so for example, a sprite that is 280 x 280 pixels would be stored in a texture that is 512 x 512, taking up a much larger amount of VRAM.