zatyka's Forum Posts

  • Every time the text changes, run a loop to check to see if each text character is a number. If not, remove the non-number:

    Capx

    Edit: I didn't see Ramones's post when I replied. His method is very similar, but only stops the user from adding a non-number to the right-most character in the textbox. My capx will check every character (so the player can't add text in the middle of a bunch of numbers already entered).

  • On exported projects, after resizing the canvas, the canvas aligns with the left side of the screen. Resizing the canvas works fine when testing the capx. The problem only occurs for exported projects (I've only tried it when exporting for an HTML5 website).

    Link to .capx file (required!):

    Example

    Capx

    Steps to reproduce:

    1. Create an event that resizes the canvas

    2. Export to HTML5 website

    3. Run the exported index.html

    Observed result:

    The canvas aligns to the left side of the screen.

    Expected result:

    The canvas remains centered

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Internet Explorer: yes

    Operating system & service pack:

    Windows 7 64bit

    Windows 8 64bit

    iOS

    Construct 2 version: 126

  • Made as a warmup game for Ludum Dare 26. If you don't know what Ludum Dare is, check it out, and if you're feeling brave, participate in the next event.

    Anyway, I wanted to test the waters with online features, and challenge myself to create a program in a genre I was unfamiliar with. 48 hours, and 9 colors later, I ended up with Paint Share.

    <center>     </center>

    Paint Share is a simple paint application for creating 20x20 images. What's special about Paint Share is that you're constantly shown a stream of images that other users have created and shared. You can also share an image of your own. Features:

    • Account Creation and log in system. Access your shared image from anywhere.
    • Save images to local webstorage
    • Save a single image to the web. (Requires creating an account) This will share the image with other Paint Share users.
    • A constant stream of other users' shared images

    As of writing this, there are 18 shared images floating around, but I'm hoping a lot more are added. The more images added, the more entertaining the image stream becomes. Controls are relatively simple. The left mouse button does just about everything. The eraser is treated like a color, so you can use it with any of the tools.

    The app is far from perfect (the circle tool is crap), and you may run into some harmless bugs once in a while. Regardless, I'm very happy with how it turned out. I hope you enjoy it. Feedback is welcome:

    <center>Play Paint Share</center><center>Paint Share's Ludum Dare Page</center>

  • I'm glad you got the touch controls figured out. I enjoyed the game. Here are my comments.

    • It took about 4 minutes to download on an Iphone 5 over LTE
    • 30+ FPS (usually more)
    • The controls took a few rounds to get used to. It's probably because I've never really played a game using this control scheme. The first few times I played, it made the difficulty level seem higher than it was.
    • It was hard for me to get a look at the high score list since a new game would almost immediately start as soon as I died. I'm not sure if this happens because my finger was still on the screen, or I accidentally tap the screen one too many times. It might be worth waiting a second before accepting touch input on the high score layout

    Good luck with the game!

  • I'm definitely in. This will be my 3rd time participating, and I'm pumped. In preparation, I've been working on a few general functions in C2. Nothing fancy or genre specific, just things that I tend to have in all my games that I don't want to spend time making during the 48 hours. There are things like like fade in/out, showing/progressing dialog boxes, text encoding (for data to be sent to my server) etc. The files will be attached in a post on LD's site prior to the competition, but I may post them here as well.

  • Excal

    Good debugging skills can go a long way.

    First I wanted to make sure the stick and pad instances actually existed, so I set the debug text to show me the counts of both the "fanaPad" and "fanaStick" object. I saw that there were no instances of either object being created, even when the player touches the screen, so I added create actions upon touching the "Lefthalf" object.

    Now I could see the objects created when I touched them, but the stick wasn't moving with my touch. You calculate the stick's position when player is in touch, and the LeftTouchID variable is greater than or equal to zero. So then I set the debug text to LeftTouchID, and saw that it never changed from -1. I looked at the code and saw that you have LeftTouchID as a local variable set to -1. Since the local variable wasn't set to static, it was being reset to -1 every tick, and the stick's movement calculations weren't firing. I changed the LeftTouchID local variable to static, and things seemed to work fine.

    <img src="http://i.imgur.com/hoEnCtr.png" border="0" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In C2, a 0 degree angle is to the right, and rotates clockwise. Your cannon sprite points up at 0 degrees, and that's causing the confusing. Try rotating it 90 degrees to the right:

    <img src="http://i.imgur.com/lvRQ4eL.png" border="0" />

  • It's more like the object is a circle, with the radius of the circle being half the sprite's width. I can see this possibly being a problem if there is a huge differences between the sprite's width is the sprite's height. If that's the case, you might want to consider adding a few image points around the sprite, and setting the sound volume based on the distance between the player and the sprite's closest image point. However, if your sprite's width is remotely close to its height, this shouldn't be necessary.

  • In this scenario, I'd probably drop the scroll to behavior all together, and implement my own with events. Something like this:

    Demo

    Capx

    The demo is really just for 2 sprites. If you're looking to switch between more than 2, I'd use families as TELLES0808 suggested.

  • If you are using this expression to determine the volume:

    System every tick -> Set volume(-distance(player.X, Player.Y, Sound.X, Sound.Y)/10 dB)

    and you want the volume to be affected by the size of the sprites, why don't you subtract half the width of the sprite from the distance. Something like this:

    System every tick -> Set volume((-distance(player.X, Player.Y, Sound.X, Sound.Y)-(sound.width/2))/10 dB)

  • I guess ... it's going to appear in the near future ...

    An automated option yes, but it sounds like an upgrade path is available currently.

  • 01. If I buy Personal Editing and after some time if I want to upgrade it will I have to pay full 399 dollars or 119 dollars will get reduced.

    1- yes , 400$ ...

    From this page:

    Will there be an option to upgrade from a Standard license to a Business license?

    We're working on this and hope to have an upgrade path in the near future. In the mean time send us a mail to licensehelpblv@scirra.com and we'll sort you out!

  • Sorry about that. The link to the Capx is fixed.

    Ancor

    Using the method in my example, you would create another instance variable in the gameitems sprite and name it something like "Destructability", and set it for each gameitem instance. Then, when picking up the item, add the "destructablility" instance variable to the Inventory array along with the the Item's other info (i.e. name and description). Now that the data is stored in the inventory array, you can do whatever you want with it.

    Look at how I'm storing the description of each item... the same principles apply to any item data you want saved.

  • First problem: When I'm facing left, my sword attacks to the right anyway.I already tried to use the mirror effect but nothing happen.

    This is because you're moving the sword by changing it's angle. If you set a sprite's angle to 45 degrees, it won't change angles by mirroring the sprite. If you want to swing the swrong to the left by changing the sprite's angle, you'll need to move the sprite in the opposite direction as a right facing swing.

    I think you'd be much better of creating an animation of the sword swinging rather than manipulate its angles. That way, mirroring the sprite would work, and you wouldn't have to fool around with wait commands (see 2nd issue). However, I've never messed around with sword mechanics in C2, so perhaps someone with experience can comment on which method is appropriate.

    Second problem: As you can see, it's taking too long to my sword spawn another object to collide with the enemy and kill it. And if I jump and attack at the same time, my player create spawn object at wrong positions and times. I know I have to destroy the spawn object, but I didn't yet because this problem.

    This is due to all the wait commands. You have the sword finish swining, and then a wait command of 0.5 seconds, and then the hitbox is created. Those 0.5 seconds are what is causing the delay. Spawning the hit box before the wait command is a quick fix.

    I made a few changes to your capx that that fix the issues you discussed, but it's probably worth exploring other more efficient sword mechanics.

    Capx

  • Each X cell in the array represents an item. If you want to remove (destroy) one of the items in your inventory, Delete the cell with the item you want to destroy. In my example, each X cell contains an item name. If you want to destroy the item named "cheese" from the inventory, use the action:

    Delete index (Inventory.IndexOf("Cheese")) from X Axis

    This finds the X index of the cell containing "Cheese", and deletes it. Here's a modification of my previous example:

    Demo

    Capx

    Learning how to manipulate arrays is an extremely useful skill that is definitely worth learning.

    Edit: Fixed the Capx link