quackgyver's Recent Forum Activity

  • Check the layer opacity and the tilemap opacity in the Properties Bar.

    The issue isn't opacity, because otherwise I wouldn't have been able to see the cursor changing into the selected tile.

  • I've never had this issue with Construct before, but for some reason I can't place tiles using the Tilemap object.

    The tiles show up just fine in the sidebar, and I can select them so that the cursor changes into the chosen tile. However when I click on the tile area in order to place the tile, nothing happens. The tile simply doesn't show up.

    Does anyone know what's causing this?

  • I've deployed my game to a web server, and I'm using mod_rewrite to rewrite paths under the game's folder into a query param - which is in turn then read by the Construct game.

    For the sake of discussion, we can assume that the game is deployed to /foo and that /foo/bar is rewritten into /foo?hello=bar.

    The problem is that Browser.QueryString returns completely empty when this mod_rewrite rule is applied (i.e. while /foo/bar is being rewritten into /foo?hello=bar), whereas if I navigate directly to the param then it works (i.e. if I write /foo?hello=bar directly).

    For troubleshooting purposes I've placed an index.php file in the same folder as the game where I've run var_dump($_GET) to ensure that the param outputs correctly while the mod_rewrite rule is active, and it works as expected.

    So my question is, what could possibly cause Browser.QueryString to return an empty string while mod_rewrite is used, despite the fact that the $_GET variable works just fine outside of the Construct game?

  • You say it should be one or the other, so which would your actions apply to?

    It would apply to the instances that were picked as part of the condition that returned true. In other words, any instance that returns true for an OR condition would be picked.

    If picking was reset between or conditions, that is what would happen. Which isn't what currently happens, but that was the provided example of what would happen if picking was reset.

    I don't understand, if OR-conditions un-pick instances that don't return true as part of an OR-condition, why would it not un-pick instances in the provided example?

  • + Sprite X < 500

    + OR: Sprite Y < 500

    You'd expect this to run actions with all Sprite instances picked that are left of X=500 or above Y=500. If it resets picking for every condition, it becomes essentially just "Y < 500" by itself, which will look broken again.

    I would expect this OR-condition to either pick all of the instances that are to the left of X=500, or pick all of the instances that are above Y=500. Even as we're talking about this, I struggle to think of what else it could logically do.

    Based on this thread, it sounds like what would happen is that it would pick all of the sprite instances that are to the left of X=500, while un-picking all of the sprite instances that are above Y=500. Is that what is supposed to happen?

    You could file a suggestion, but based on the problems I've shown, I don't see a better way it could work unfortunately! Then there's also backwards compatibility: we can't just change how thousands of existing projects work...

    Would it be possible to add a true OR condition? Or would that require fundamentally changing the way things work.

  • In my project I'm referencing music files by name.

    For some reason, if I move music files into subfolders in an attempt to organize them, they stop playing in-game.

    To make things stranger, this only happens for most- rather than all music files.

    My understanding is that folders are for organizing in the editor rather than for referencing, but despite that I'm able to reproduce the effect by moving music files in and out of subfolders.

    Why does putting audio files in subfolders have this effect?

  • That's a nice solution, though wouldn't it be more straight-forward to do something along the lines of:

     var OriginalMessage = "foo foo foo foo foo foo foo foo" 
     var MaxWidth = 10 
     var Index = 0 
     
     // For each word 
     foreach tokencount( OriginalMessage, " " ) 
     	Index = Index + 1 
     	CurrentWord = tokenat( OriginalMessage, Index, " ") 
     	var Line = "" 
     	var Message "" 
     
     	// The Line can fit more words
     	if ( len( Phrase ) + len( CurrentWord ) ) < MaxWidth 
     		Line = Line + CurrentWord 
     
     		// Add the last line in loop 
     		if Index == tokencount( OriginalMessage, " " ) 
     			Phrase = Phrase + newline + Line 
     
     	// Line is full, clear it 
     	else 
     		Phrase = Phrase + newline + Line 
     		Line = CurrentWord 
    

    I still think that this could somehow be expressed through a formula though. I wonder if anyone here has figured it out without looping.

  • Only idea that comes to mind is to use a tiledbackground object and use the "set face object" from the 3dshape with that.

    Yeah that's what I'm talking about. When you map an image to the face of a 3D shape, it's anchored to the same corner on every side.

  • Does anyone know of a good formula for word-wrapping based on an variable length limit?

    I.e. if I have String and the length limit is Foo, is there a good formula for splitting String in the right places so that it inserts line breaks where the lines would otherwise have exceeded the length limit?

    Thanks in advance.

  • When resizing a 3D shape that uses images for its faces, the face images are always anchored to the same corner on every side of the shape.

    Because of this it's impossible to tile 3D shapes seamlessly unless they're the exact size of their textures, because as soon as you reduce the size of a 3d shape it also shifts the position of its face images in ways that will often cause texture tiling issues.

    Is there any way to control the anchor/origin point for the images that are used as face images for 3D shapes?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is there reason why Local_Loop_Done doesn't reset on each loop in this context?

    I thought that local variables are supposed to reset on every loop unless they're set to "Static", but in this case the local variable never seems to reset?

    In the documentation it says:

    By default, local variables reset to their initial value whenever entering their scope (usually every tick)

    Which to me sounds like it's supposed to reset the variable whenever whenever the root condition that evaluates "Script_Block_Is_Busy" and "Script_Keep_Looping" returns true.

    However instead, the variable never seems to reset as long as these root-level bools return true.

    Why is that?

    EDIT:

    I figured it out. I was expecting the variable to reset on every "For each"-loop, thinking that every such loop would count as "entering the scope" of the root event outside of the "For each"-loop.

    However, local variables won't reset inside a "For each"-loop if it was defined outside of the loop. This means that it'll only reset during ticks that take place outside of the "For each"-loop.

  • But the implication is that you want to change the animation on the ones that are carrying a torch, so since it couldn't find any then it's correct to apply to 0 instances. If you want to apply to PlayerObjects because Firefly is lit, you have to ask yourself, which PlayerObjects? Because none of them are carrying a torch.

    I don't think the implication is that I only want to affect PlayerObjects that are carrying torches, because carrying torches is only one of the two conditions for changing the PlayerObject's animation.

    If I didn't want to change the PlayerObject's animation in both cases, then I wouldn't have put it in an event with an "OR"-condition.

quackgyver's avatar

quackgyver

Member since 18 Sep, 2014

None one is following quackgyver yet!

Connect with quackgyver

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies