Elyzius's Recent Forum Activity

  • Try this.

    I added a number of events, by the way, so the event numbers referenced in your comments won't match with the intended events anymore. Sorry about that.

  • This:

    <img src="http://i.imgur.com/SHgvC.jpg" border="0" />

    Into this:

    <img src="http://i.imgur.com/1Svo8.jpg" border="0" />

    You think that it exactly this result can be archived with different layers effects?

    Why not? With a bit of Photoshopping to remove as much of the gray background as possible, some interesting effects can be achieved with shaders.

    <img src="http://i396.photobucket.com/albums/pp45/Elyzius/lighteffect.jpg" border="0" />

    And... you guys noticed moving candles flames (top of stage) and little "fire effect" from those candles fire? I'm planning add some falling wax from those candles via particles, but... you noticed it? I love small details!

    Yep, I noticed them. Very cool.

  • But every time mr. blue box touch "scream1" canvas the sound was playing, even with "once" condition.

    <img src="http://i.imgur.com/V25YY.jpg" border="0" />

    so I created something that works, but it's stupid, don't you think so?

    <img src="http://i.imgur.com/bf0mG.jpg" border="0" />

    It's working good, but I don't think is good to use solution like that, because there is probably other, better solution with events.

    Nothing wrong with your solution, but if you want a different one, here's what I suggest: Create a global numeric variable with an initial value of zero. Let's call it "screamed." In your event, you'll need to check for On Collision AND whether global variable 'screamed' is zero. Your actions will then be to play the sound file and to set global variable 'screamed' to 1. This will guarantee that the sound file won't be played again even if the sprites collide.

    2. Now quite complex one. I create game for 1024x768 resolution, but many people have other monitor proportions like 16:9, 16:10. I send preview exe to two guys with 16:9 monitor and everyhing is working, but graphic was streched horizontaly, and I really don't know what to do with this. Help.

    I don't really see that as being a big problem. Many professional casual games are set at 1024x768 resolution. There is some minor horizontal stretching when the games play at full screen, but that never bothered me. If you're making your game for the general public, this resolution will be playable on all but the most ancient PCs.

    3. In one place there is huge fps drop:

    <img src="http://i.imgur.com/XGsB7.jpg" border="0" />

    censored due to brutall stuff

    I know the project is very graphic "heavy" (an will be only more), but fps drop only in one place, when mr. blue box jump (1) to another place (2)?

    I'm not seeing any huge FPS drop, although I do have a pretty good rig.

    If I were you, I'd optimize the use of graphics to save on VRAM. Many people who play 2D games don't have the computing power to play 3D games. Replacing your background Sprites with Tiled Backgrounds is good advice. Even better, you can break up the repeating parts of your backgrounds and stretch them across your layout. Stretching a tiled background will not deform it the way it does to a Sprite. Instead, it will cause the image to repeat across the stretched area.

    Your graphics and sounds are excellent, by the way. I wish you the best of luck with your project.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm not sure what you mean by "when the mousex becomes greater than the object," but I'll assume that you are comparing it to the object's X value. If you want the global('x') to be added just once, you might want to make another global numerical variable first. Let's call it 'Added' and let its initial value be zero. In your event, you have to check for 2 conditions: that mouse.x > object.x AND global('Added') = 0. You will then add 2 actions for that event. First, add 10 to global('x'). Next, set global('Added') to 1. This will guarantee that adding 10 to global('x') will occur once and only once if at all.

  • I see. So the Object ID points to the template from which all other instances of that object or template are created. The Unique ID points to an instance of the template and is unique across all instances of any template. Instances of the same object will all have the same Object ID, but everything in the game has its own Unique ID.

    Also, it seems that you can reliably "Create Object By Name" and pass an Object ID instead of an object's name. Passing a Unique ID to "Create Object By Name" will not always work.

    I'm aware that OIDs and UIDs are only reliable at runtime and may not have the same values across different runs.

    Thanks, newt.

  • What is the difference between an Object ID and a Unique ID? When should you use one instead of the other? I've been trying to search the forums for this, but if the answer is here, it's probably buried deep.

  • I just wanted to say thanks for this. I'd been searching the manual for this kind of functionality, only to find that it isn't implemented in Construct. Good thing we can extend its functionality with plugins.

  • The chicken idea is the best, IMO. It's the opposite of what one would expect from a chicken, yet it makes sense somehow because anybody can be a tough guy when they have a gun. I can see it now:

    hey slaughtered his family and left him to die. Now vengeance is his.

    CHICKEN WITH A SHOTGUN

    Coming soon to IMAXedited><editID>Elyzius</editID><editDate>2012-08-03 06:58:17</editDate></edited>

  • I'm not TL22, but I wanted to check out your file. I can't load it in CC, though. The error message says that your CAP was created in a newer version of Construct. I clicked the Update button in CC, and I was told that my version of CC is already the latest. Just giving you a heads up.

  • Tulamide, I might be able to help, but I need more info. Under what conditions may a card's strength change?

    For example, I've seen some games where a character card's strength is boosted by having equipment cards stacked with it. In other games, putting counters on a card in play indicates that its strength is boosted. Another instance of strength change is when a particular spell card is played, which changes the strength of certain units in play.

    For your game, are your rules similar to the above examples?

  • My sample CAP file demonstrating the use of card sprites with my Custom Deck plugin can be downloaded here.

  • The demo file that I uploaded doesn't really have much in the way of bells and whistles. All the outputs are in numeric text, which isn't the way one would represent cards in a video game.

    Just now, I figured out how to output the cards as images. (What can I say? I've only been playing with Construct Classic for less than a week.) For those who may be interested, here's a brief explanation on how to do it:

    1. Add sprites for each of your cards. Ideally, they should all be the same size and have unique names. Make sure your sprites are not on the visible area of your layout. Hence, to represent a full deck of 52 playing cards, you will need 52 sprites, one for each card.
    2. Optional step: Create an object folder and put all your card sprites in it. This is just to keep from cluttering the Object panel.
    3. Click any of your card sprites to select it. In the Properties panel (the one on the far left of the screen), expand Groups/Families then click the word "Add" beside "New Family." This will cause a small window named "Construct: New family" to appear. Choose an appropriate family that you're sure you won't use for any other purpose then click the OK button. (For my project, I chose the Blue family.)
    4. In the Project panel (the one on the far right of the screen), right-click the name of your application then click "Manage families" on the context-sensitive menu. A dialog box named "Construct: Family Manager" will appear. Click the name of the family that you assigned to your card sprite then click the Add button. Add all the remaining card sprites to this family. Click the Close button when done.
    5. Insert the following objects in your layout: a custom deck (from my plugin), an array, and a button. The button will be for dealing cards from the deck, so set an appropriate text for it. Change the "Width (X)" property of the array to be equal to the number of unique cards that your custom deck will have.
    6. Create a System::Start of layout event in which you set the size of your custom deck. Within the same event, add the array's "set value at X" action for each of your card sprites' object ID. For example, the first of these actions may be written as "array: Set index 1 to Card01.OID," where Card01 is the name of your first card sprite. Each sprite should be assigned a unique index. If you have 52 unique cards in your custom deck, you will have to add 52 actions of this type.
    7. Add a second event for when the button gets clicked. For this event, add a "Reset Deck" action for the custom deck.
    8. To the second event, add a "System::For each object" sub-event, where the object is the family of sprite cards that you assigned earlier. Set a destroy action for this family. This will clear any cards that may have already been placed on the layout.
    9. Add a "System::For" sub-event to the second event. The loop should go a number of times equal to the number of cards you want to draw. Add a "System::Create object by name" action to this event, where the parameters are the object ID returned by the array at the index returned by a call to "Get random card" from the custom deck, as well as the X and Y coordinates of the card sprite's position. (Quite a mouthful, I know.) In other words, you can add something like this: System: Create object array(Custom Deck.RandomCard) on layer 1 at (50+LoopIndex*93,82)
    10. Run your layout to see how it goes.

    Would anyone be interested if I were to upload a sample CAP file?

Elyzius's avatar

Elyzius

Member since 28 Jul, 2012

None one is following Elyzius yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies