Magistross's Recent Forum Activity

  • C2 use Javascript syntax for its Regex. Delimiters are "^" to match the beginning of a string (or line for multiline) and "$" for the end.

    Be aware though that "^www\.(.*)\.com$" won't find a match in "http://www.google.com", since the string doesn't begin with "www".

    Regex works great with C2, but it lacks one important thing, there is no capture group support, so "www\.(.*\.com)" will actually match "www.google.com" and not only "google.com" in the string "http://www.google.com". It would be great to be able to do something like RegexMatchAt(0).Groups(0) or something...

  • Using a container there is no need to associate UIDs whatsoever. Picking any object in a container also picks all other objects in the same one.

  • Since there's actually one condition that doesn't have any issue in picking newly created objects, I suggest that we all abuse the hell of it. You'll find attached a simple "hack", that use an array to remember newly created objects of a specific type. I suppose it could be modified to handle multiple object types, but I only wanted to show the simplicity of this method. I personnaly prefer that to using "Wait 0" since the order of the events is then easier to follow.

  • The turret behavior has the TargetUID expression that can be used in conjunction with "Pick by unique ID".

    As for the remaining time until the next shot, I guess you could always use a timer behavior for that.

  • It might be a bug, in the meantime I'd suggest you use a tile size of 16*16 if possible. It should alleviate the problem.

  • Here's some custom bubble sorting made through events. You can sort any column in ascending or descending order.

  • You'd be best to work with families, or use a single instance of "Laser" for all upgrades. I would also create a function to spawn lasers according to some parameters like position offsets, angle and power. With that, multiple spawns for different "Lasercount" values are easily created. I modified your capx to illustrate what I'm talking about. (I removed the backgrounds to reduce the filesize)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Which section are you having trouble understanding ?

  • You can keep your current multiple layouts design no problem. You'll just have to setup your map accordingly. Using offsets tied to layouts combined with the actual X / Y position of the players sprites, you'll be able to draw the players positions in the global map.

  • Here's a rather complete example where I tried to replicate your screenshot as much as I could. No interaction with items can be done, but that wouldn't be hard to implement.

  • I once did the same thing for SpriteFont, you only have to adapt the "textWidth" function so it returns the width based on the characters in the sprite instead of using that javascript function (which indeed use 12pt Arial for its calculation; the font used by the DestText object).

    2 ways to do that, depending on your need.

    If your spritefont is monospaced, it's much easier. The "textWidth" function should return len(Function.Param(0)) * (characterWidth + characterSpacing).

    However, if some characters have different width, you'll have to use the SpriteFont.TextWidth expression. You can either use a dedicated SpriteFont to "measure" text, or create a temporary one to do it.

    Here's an edited version using a SpriteFont.

  • Here's an edited version with some added magic to remove the "partial word not wrapping" problem.

Magistross's avatar

Magistross

Member since 4 Jul, 2011

Twitter
Magistross has 14 followers

Trophy Case

  • 13-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies