Mallets's Forum Posts

  • That would be amazing, oosyrag. I have spent more time than I care to admit trying to get this nailed down. I will continue to take your methods as you described and try to come up with something, but if you do get the chance to throw together a simple example, I would be forever in your favor for it.

    Thanks!

  • Hello,

    So my question is basically this:

    Imagine that you have a paragraph of text. You play as a block that can run and jump. Whenever you collide with the paragraph of text, whatever characters you touch instantly get destroyed, but the rest of the paragraph remains visible and intact.

    I have been attempting to use Rex's Layouter plugin and all its relevant behaviors to display a textbox object (NOT a text object), but I don't believe line breaks are possible even when the textbox type is "typearea."

    The methods I can think of would be extremely tedious, such as using a sprite font and storing the paragraph of text in an array, then creating an instance of the sprite font for each character in the paragraph and placing them by code instead of C2 doing it automatically.

  • Currently I'm collaborating via Dropbox using a shared folder for everyone who's working on the project. But only one person can work on the file at a time or else the copies start to become conflicted. So we always have to check that nobody else is using the dropbox files before we can start working on it.

    On the other hand, I know that Github and BitBucket are more tailored for collaboration, but others posting in these forums have noted that they don't work very well for Construct 2 in some cases (for example: https://www.scirra.com/forum/github-and-c2-a-best-way-to-do-it_t109440

    Is there a resource that will us to work on the same project on our own schedules and then simply merge or combine the finished results into a functional project?

  • Yes! Your capx was beautifully done. I don't know why I had such trouble with it. I had previously played with the physics properties but couldn't quite get it going. Thank you so much for this well-made example!

  • Say that the player controls a box or a hand at the bottom of the screen and there is a very long narrow stick or a stack of plates balanced on the box. The stick begins to lean and the player has to move left or right with the mouse to correct it so that it doesn't fall. If you've ever held a broom upside down and tried to balance it in your palm it would be the same idea.

    I started off trying to use physics but I kept getting out of control bouncing or very unpredictable interactions. I would rather be able to do it with physics rather than coding everything manually (every tick, add 1 to stick speed, adjust angle X pixels, etc, unless player moves Y pixels, then adjust stick by Z pixels, etc), but even knowing the basic idea I have no idea where to start, as all my events so far have no produced anything useful.

  • I assume this is just as easily done with a combination if dictionaries AND arrays inside the master dictionary?

  • That's a very smart way to do it! Thank you!

  • I'm currently using a .json file to save and load my player save data. I want to use a separate dictionary for some other data, but I want to be able to write both dictionaries (and possibly arrays) as a single save file on the player's computer. Is this possible using the single .json file? Or will I have to write multiple .json files and somehow zip them into a new file?

    The "append file" action in NW.js would work to save additional dictionaries, but when I load that data, how would C2 know to separate the data into the correct dictionaries?

  • This applies to the editor only, but I have several different textboxes on a layout, but because the text object is always invisible, the only way to see the actual size of the boxes is to click on one and highlight it. This is slow when you have to precisely position many different text objects relative to each other.

    There's no built-in "solid" or "shade" option so that you can see these in the editor. Does anyone know of a way to make working with the text object easier?

  • The manual actually describes this problem as follows:

    [quote:2njbc6o1]Set volume

    Change the volume of a sound. The volume is given in decibels (dB). A volume of 0 dB is original volume, and below 0 dB attenuates the sound. Note amplification is not supported. For example, entering a value of -10 plays the audio back 10 dB quieter (about half as loud).

    Note it is best to set the initial volume in the Play action instead of setting it with this action immediately after playing, since that can sometimes cause a moment of playback at the wrong volume.

    The problem is that I'm doing exactly what is recommended here, but getting this exactly issue. If the volume for effects is set to -60 after previously being set to 0, then it will play at 0 for a fraction of a second (maybe 1 frame/tick), and THEN play correctly.

    When I want to play a sound effect, I call a function that is responsible for every sound effect, and make Parameter 0 the filename of the sound effect to play. I specify the volume at the same time as the name of the sound effect to play, i.e. all in one line and not sequentially in two actions.

    Pseudo-code (I use a slider to universally control the volume of all sound effects when they play):

    On click sprite:

    --Call function "PlaySFX"

    On function "PlaySFX":

    (sub-events):

    Param0 = Sound1 --> Play sound effect 1 at (sound effects slider volume) dB

    Param0 = Sound2 --> Play sound effect 2 at (sound effects slider volume) dB

    etc

    etc

    etc

    Thank you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Has anyone ever encountered this before? I still can't quite figure out what the issue is. It's even mentioned in the manual that setting the volume even in the next action after playing a sound will cause this, but in my case, it's all happening on a single event line.

  • Hello,

    I'm working with music and SFX sliders and keep running into a problem where audio that shouldn't be audible is, but only for a fraction of a second. When the SFX master volume is changed from 0 to -60, if you play a sound effect, it seems to play at full volume for a tick before correctly playing (at -60 dB).

    The image here shows all the relevant code for adjusting the volume as well as a graph to show you what the problem is versus what I would expect to happen. The image seems to be getting cut off here, but the full image is http://i.imgur.com/QMhiVgk.png

    If anyone has any idea about why this might be happening, I would be thrilled to hear your thoughts. Thank you!

  • Using the same events and layouts, the gamepad (Xbox One controller) only works when the debugger is used. It works perfectly too. When I reload the same layouts and project in the regular run mode, the gamepad fails to respond at all to any inputs.

    I'm not aware of any conditions or actions that affect things only when in debug mode, so I have no idea what in the world is happening. I don't even know where to being bug-testing because there's no single group or event that I can start from.

    Thank you!

  • Hello all,

    I am using Drag and drop with the "rope" in the image below. The idea is that you grab the rope with the mouse, enabling drag and drop, and can pull the brown sprite down. But occasionally Drag and Drop will break -- it no longer functions and instead, the mouse mouse cursor changes to this:

    I have found that this cursor icon also appears in other applications when swapping objects (such as menu items), but I have no idea why it is sometimes triggered in C2, and why it causes D&D to no longer work when it shows up. It usually happens when you get rough with the rope (as in, I was trying to break it to test for bugs), going very fast or having the mouse leave the game window while drag and drop is active.

    I'm running in NW.js. Thank you!

  • Ah-ha! Well, I'm sorry to have taken your time, but it's finally working. I could swear that second " was there the whole time. Anyway, thank you!