Slavq's Recent Forum Activity

  • How to disable collision with EVERY physics object while retaining Physics behavior (i need it for making joints) ? I just need an invisible point to make physics joints to it.

    I've found this: twitter.com/EpicJelly/status/169237803643838466 but i can't find this feature...

  • Yeah, object references, maybe possibility to create local variables of any object's (family?) type (not only boolean, float & string) will be very useful. It's quite hard to get into some Construct 2 areas when coming from object-oriented programming

    As to my issue, i've re-categorized a lot of objects (it's not exactly about building walls) and changed whole gameplay a bit, but basically i'm creating an extra empty sprite (collider) in place where any of placeable items is placed - and every new placed object creates a joint to these colliders (so it's checking for overlapping with these colliders, not with "Placeable" objects)

    Maybe not a perfect solution for building structures, but works in my case.

  • OK, I've just changed my mechanics so i don't need this approach anymore, but thank You

  • I'm afraid that it'll not work in my case - objects of family A are objects for placing in world and are created at runtime. Example with building a wall:

    1. Object "brick" from family "Placeable" is picked by clicking a button and created in layout.

    2. "brick" is placed on ground and it changes it's variable "placed" to true.

    3. Another "brick" is picked (and created at runtime) - now, i want to place it on top of previous "brick" (in my case, when they're overlapping, so it's like welding) System correctly detects when they're overlapping, but it doesn't create revolute joint to this previous brick.

    I've thought about having another family/container with only "placed" objects and checking against it, but it will need possibility to add objects to family/container at runtime - and right now it's impossible, am i right?

    (That was only a exmaple, in my case i need a limited revolute joint)

  • I have condition:

    If object of family "A" is overlapping another object of family "A", then create revolute joint from one to another.

    1 - works

    2 - doesn't work

    It takes all the objects of this family with boolean set to false, so when i have just one object of this family with boolean = false and multiple objects of this family with boolean = true, it correctly picks this one particular object. But how to create joint from it to another object of the same family (these with boolean = true)?

  • Yeah but when the array contains elements with nicknames (like "00750 | BobTheDarkLord", putting it to variable deletes the nickname :(

    Hmm I'll consider leaving it with the leading 0's, but it just fits better to my game's visual style without them.

  • Thanks, good idea! It's working, but now i can't figure out how to 'un-zeropad' these scores just before putting them in textbox (to make it look nice, so "00070" will be "70", etc.)

    I've tried setting text to "tokenat(Array.CurValue, 2, "0") & newline", but the number of left-side-zeros varies + the scores have zeros too = not working...

    (Maybe some loop checking the nth character in the string, starting from the left and IF nth-character == "0" change it to "", ELSE end the loop + trim() it at the end? But i don't know how to check n-th character of the text in C2)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey, I want to save the highscores with corresponding nicknames.

    At the moment I have an array (1d) with 10 elements filled with strings like:

    "520 | Nickname1" ,

    "40 | Nickname2",

    "270 | Nickname3" ,

    "25 | Nickname4",

    "120 | Nickname5", etc.

    The built-in sort function sorts it like this. And it should be like this:

    "520 | Nickname1" ,

    "270 | Nickname3" ,

    "120 | Nickname5",

    "40 | Nickname2",

    "25 | Nickname4", etc.

    To sort it properly, i must convert all the elements to int(), but then i lost the nicknames. I've found something like Natural Sort [argh, i can't post links yet... "array natural sort" in Google -> first link], but is there any way to implement this in Construct 2?

    Or maybe is there a tutorial how to save the highscores WITH nicknames?

    Thanks in advance.

  • Hello! :)

    Construct 2 is a great tool for setting up all the game logic, without wasting our fingers and time to type in all these lines of code :)

    I wish that there will be something like Construct 2 but also for 3D games in the future, it will be great (i'm an 3d artist so i was forced to switch to 2d just to make games in Construct :D )

    I like creating games and game logic, not programming itself. That's why i choose Construct 2.

    Good job Scirra!

Slavq's avatar

Slavq

Member since 1 Jan, 2014

None one is following Slavq yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies