R0J0hound's Forum Posts

  • On event 49 change "Else" to "'pistol ammo' greater than 0". It seems that while ELSE works in most cases it doesn't work in that case.

    Only one "playercone" is needed so instead of spawning a "playercone" set it's position to "player1box".

    Change "player1box pick closest to zombiebox.X, .Y" to "zombiebox pick closest to player1box.X, .Y" as we want the closest zombie not the closest player.

    The condition "zombiebox overlaps playercone" needs to be changed to "zombiebox overlaps at offset (0,0) playercone" because otherwise a bullet will be shot at each zombiebox in the playercone.

    Here is a modification of your cap with those fixes and a few more: download

    +Muzzle animation unchecked Loop so it can be destroyed when it's animation is finished.

    +added else event (event 52) so if there are no zombieboxes to shoot, a bullet will just be shot in the same direction as the player.

    +cleaned up events 10-17 so they just set the angle of Player1 and set a global variable "DirectionPressed" to 1 which is previously set to 0 in event 3. "DirectionPressed" is then used in the weapon handling (event 48) so you don't have to handle all 8 directions all over again.

    + Finally Event 18 is changed to:

    + Player1box: is moving
    -> Player1: Set animation to "Walk" & Player1 ('Weaponout')
    + System: Else
    -> Player1: Set animation to "Stand" & Player1 ('Weaponout')[/code:3a1mu8cq]
    
    I hope all that makes sense, let me know if anything doesn't.  Cool project, has that gta feel to it.
    -cheers
  • Use the "get temp Dir" expression to see what directory is being used. When the files are extracted they use the extracted name you choose. The only protection the plug-in currently provides is the files are deleted when your program closes.

  • Just make an event like you described it.

    <img src="http://img257.imageshack.us/img257/7521/event2.gif">

  • <font size="4">Resource Plug-in</font>

    NEW version 1.1

    What's New:

    An action to load fonts. So now you can include and use fonts in your cap regardless if those fonts are installed on your system.

    Download: http://dl.dropbox.com/u/5426011/res%20plug/ResourcePlugin1.1.zip

    Examples:http://dl.dropbox.com/u/5426011/res%20plug/ResExamples.zip

    old:http://dl.dropbox.com/u/5426011/res%20plug/Resource%20Plugin%201.0.zip

    The Problem:

    Construct already has the feature to add files to include when building an executable, But only the Xauido2 plug-in has the ability to access those files.

    The solution:

    This plug-in provides access to those files to any plug-in that can load files.

    Here's an example that plays a "mod" file that's in the "EXE":download

    Actions:

    • Extract Resource
    • Load Font (new in 1.1)

    Expressions:

    • Get Resource
    • Get Temp Dir

    Note:

    The plugin works by copying the files from the program's resources to a temp directory. The temp files are removed when the object is destroyed.

  • I haven't really used XAudio2 yet but this is what I found.

    After I added a ogg file to the files directory i was able to get it to play doing this:

    + Button: On Button clicked
    -> XAudio2: Play music "bgm012.ogg"[/code:iknmdomk]
    But not this:
    [code:iknmdomk]+ Button: On Button clicked
    -> XAudio2: Autoplay resource "bgm012.ogg" (No loop)[/code:iknmdomk]
    
    Does that help?
  • It's really quite easy. Just put any objects that you want to be dynamically loaded into vram onto another layout and make the objects global.

    Run the "Layout 1" layout and watch the vram usage.

    keys:

    1,q to create and destroy the oval bg.

    2,w to create and destroy the rectangle bg.

    In contrast run the "Textures" layout and see how even though both bgs are destroyed the vram usage remains 4 MB.

    cap req. 0.99.84

  • I updated the wiki with some more info and links about python.

    To learn the python language itself, here are two great tutorials:

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

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

    And for a quick look on using python in construct check this out:

    http://www.scirra.com/forum/viewtopic.php?f=8&t=5397

  • Please add "rojohound", I'd like to see what I can do with this.

  • It appears that 'CopyToSprite' actually copies from the sprite. What's probably happening is the two functions 'CopyToSprite' and 'CopyFromSprite' both have the name 'CopyToSprite' in python. So the last one defined is the only one accessible. Easily fixable if the source were available.

    Edit:

    Also ImageManipulator.CopyToSprite(spritename) is incorrect.

    With functions (or methods) in construct, only two types work in python: numbers or strings. So the correct way would be: ImageManipulator.CopyToSprite('spritename'). If you use a number instead of a string, the objecttype with an OID (object id) equal to that number would be referenced. If the referenced objecttype has no image data it will cause a crash.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can't you just drag the condition to be a subevent?

    <img src="http://img96.imageshack.us/img96/3114/draging.gif">

  • MouseKeyboard.AbsMouseX-Window.X will give you the X position of the mouse relative to the window.

  • 4ror

    Here is an example of a way to do mirroring:

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

    vbmdsm

    This will make a path relative to the player:

    http://dl.dropbox.com/u/5426011/examples/pathrelative.cap/url]

    In doing that example I found a bug with the plugin: if the path starts off screen the object will not be drawn.

    Arima

    I plan on fixing some issues with the curved interpolation (which uses catmull-rom), And while i'm at it i'll see if I can get bezeir curves to work. I was using bezeir to begin with but was having an issue with the speed on the path not staying constant.

  • To avoid the sprite being tilted in between the animation angles. Change the Sprite's property "Rotation" from "Normal" to "N angles", and be sure the property "Rotations Count" is 8.

  • 1146Ullman

    That is a known problem. The solution is not to use the binary object when using python. It's no loss because python can do everything the binary object can do and more.

  • Do you have an object named "360"? If so you need to rename it so it doesn't start with a digit and it should work. Construct generates it's own python script on startup that builds an interface for each object, thus the 1027 lines.