R0J0hound's Forum Posts

  • This can be used instead of atan2:

    angle(0, 0, x, y)[/code:53evcedq]
  • First let me say that these examples are barely python, mostly winapi calls. They were mainly an exercise to see how it can be done.

    The first example is pretty much like the AVI object but without the controls. It's always drawn on top and it can be destroyed, but it has to be done manually.

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

    Made in 0.99.96

    Needs the ctypes python library.

    The second example is Media Player embedded in the window, so it supports any file format that Media Player can play.

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

    Made in 0.99.96

    Needs the ctypes and win32com python libraries.

    Python is cool, but I think a plug-in would be better.

    -cheers

    EDIT:

    Also if it's of any interest here's an example of embedding flash in your app:

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

    Made in 0.99.96

    Needs the ctypes and win32com python libraries.

  • Uncheck "Enable Scripting" in the application properties. If you have it enabled and you don't use any python scripts the game will crash after ~700 objects are created or destroyed. The crash won't occur when you have scripting enabled if some python scripts are run periodically.

  • You need to add an event to plot your objects on the minimap.

    Something like this should work:

    + System: Always (every tick)
    -> Minimap: Clear terrain
    -> Minimap: Draw terrain Sprite with scale 2
    [/code:3trlf03s]
  • You need to use a plugin to be able to change keys in game, either of these plugins should work.

    Input System Plugin

    Custom Controls Plugin

  • It will affect only the player colliding.

  • Just add a private variable to the enemy sprite. That way each enemy will have their own hp.

    The Ghost Shooter Tutorial covers how to do this.

  • [quote:3mypuo6u]Why did the state of the global variable change the number of records though?

    It seems to be a bug with the SpriteFont object since it only happens when they are global.

  • Uncheck 'global' for the spritefont objects and the objects won't disappear.

  • Z Elevation just changes the visual distance the object is from the camera. Collisions aren't scaled when the Z Elevation is changed. You can change the camera distance with the application property "Eye Distance (3d)". Z Elevation can effect the draw order of objects if the layer property "3d layering" is enabled. An object will appear to be double size if it's Z Elevation is half the eye distance.

  • A blinking cursor is pretty easy. Here's an older example that I had kicking around:

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here's a example with all the required python files:

    http://dl.dropbox.com/u/5426011/examples3/cursor.zip

    made in 0.99.96

  • If you don't mind using python and have ctypes installed you can change the windows cursor for your app with this:

    First add the window plugin to your cap. Then add this script:

    from ctypes import *
    cur=windll.user32.LoadCursorFromFileA(r'C:\WINDOWS\Cursors\banana.ani')
    windll.user32.SetClassLongA(Window.AppWindow, -12, cur)[/code:3rgqnlqv]
    
    Put the script as a subevent of "Start of Layout" or some other event so that it is not run every frame.  It only needs to be run once.
  • As an alternate to the editbox you can input numbers with the mouse&keyboard plugin.

    Here an example to give you some ideas. It shows two methods that do the same thing.

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

    made in 0.99.96

  • DWing and Beerman,

    That error is mainly caused by insufficient VRAM. I was able to measure the vram usage on my system with my Intel graphics card driver, and I got these numbers:

    VRAM Usage:

    8 Mb for normal system use.

    43 Mb after opening construct and selecting "New"->"Direct X app".

    --"Run Layout" 48 Mb, the runtime reports 0.00 mb vram usage.

    45 Mb after adding a 512x512 Sprite.

    --"Run Layout" 51 Mb, the runtime reports 1.00 mb vram usage.

    63 Mb after adding one or more layer effects.

    --"Run Layout" 71 Mb, the runtime reports 6.69 mb vram usage.

    So in general if you add 5 Mb to what the runtime says you are using you should get approximately how much vram your game is currently using.

    With 64 Mb of vram you can still edit and run your game at the same time if you avoid Effects and Transitions, but you still might run out of vram if you use a lot of graphics. In that case you would have to export your cap, close construct, and run the exported program to test it.

    -cheers