R0J0hound's Recent Forum Activity

  • There are three instances of the "MouseKeyboad" object. Use the expression "Python("len(MouseKeyboard)")" to see that it's true (it returns 3). The solution is to create a new "MouseKeyboard" object, change all the "MouseKeyboard" events to use the new object and then delete the old object.

    Solution in steps:

    1

      In the Layout editor insert a new Mouse and keyboard object. It's name will default to "MouseKeyboard2".

    2

      Go ahead and make it global, (not really necessary, but it's a good idea).

    3

      Go to the events and for every mouse and keyboard event: double click, hit back twice, select "MouseKeyboard2", click next twice and click finish.

    4

      Now go back to the layout editor, select the old mouse & keyboard object "MouseKeyboard" and hit the delete key.

    5

      Problem solved.
  • It seems to be an issue with setting the position of an object with the physics behavior. But it also seems to affect only the first object that has physics.

    The solution is to create a dummy object with the physics behavior and make it the first object at edittime by sending it to the back.

    Do this:

      Create another sprite to be a dummy object. Give it the physics behavior. Set the physics collision mask to none, so legitimate physics objects won't collide with it. Right click on the object and send it to back.
  • Here's an example that downloads an image.

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

  • Ah-ha! Uncheck "enable scripting" under the runtime properties, and that will fix it.

  • Intriguing problem. Here's an example:

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

    Req. 0.99.84

  • OR doesn't play well with triggers it would seem. As it is, the actions are run only if the conditions before the first OR are true. Put "on step" into a event by itself and put the rest of the conditions as a sub-event and it will work. Alternatively you could make all those objects part of a family and eliminate the need for OR. Your conditions would then look something like this:

    + On Step
    + Bullet overlaps stopfamily
    [/code:3pl7bj2u]
    
    PS: no need to give me credit, just glad to help.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound