Sir LoLz's Forum Posts

  • Hey.

    I need instances of the same object to be able to attack each other. The game is a 45 degree top down view. To allow instances to walk over walls to show this I have the objects hit box set to there feet. And made a second object called "AttackBox" and pinned it inside a container. Then used this code to see if there was a hit.

    https://www.dropbox.com/s/fgm9dx154vjs2xf/Capture.PNG?dl=0

    This worked only if two objects were overlapping. I figured that was because the parent condition was "overlapping" and not "on collision" However I could not use "on collision" because the AttackBox item only showed the range of attack. not if one was done.

    To fix this I made another object called "fist" (because you punch) and added it to the container as well. then changed the parent condition to "fist" on collision with "AttackBox" and moved the Kill function inside the parent and disabled the rest.

    Thing is... you punch yourself now. because the players fist in the sprite is inside it's own AttackBox. it always lands a hit on itself.

    how do I not only know if an object is punching, but to find what AttackBox object it hit that's not it's own.

    Thanks

  • ah that is what I was looking for mindFaQ. Thanks!

  • ah that worked. thanks.

  • Hello. I feel like this should be easy, but for some reason I can't seem to figure it out.

    I need a way to fail an event if even just one instance of an object's variable matches a certain number.

    Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • awesome. thanks man!

  • Hello.

    I'm working on a multilayer game. were one player can use a keyboard and the others can us Xbox controllers. the order won't matter.

    I"m able to tell the difference in input just fine. My problem is assigning a control device to a player and over multiple layouts.

    what I want is you start at the player start up screen/layout. here each player would press "A" on there controller to say that it's in use. (meaning you could use controllers 1,2 and 4, but not 3)

    then as they went to the next layouts(depending on the level they select) each player would be given control of a random NPC that is on the stage. this would repeat though all the layouts.

    How I had it set up in my test layout when I first started was making a global variable that I would set to the number of players I wanted. it would then create an object called "player" once for how big the variable was. and increment a variable inside that instance to tell it what controller it had.

    Then in the main loop were input would be collected I had a "for loop" that would go though each Player instance. And looking at it's variable would collect input from that device, and apply it to the NPC by means of an ID the NPC has. (each player object holds this id so it knows what NPC this player controls)

    This worked well... when the project was one sheet. however now I'm not sure how to carry the player input data over from the start screen. is there a way to spawn my "player" objects in my start screen. then have them stay throughout the game? or should I store the data in global variables? and if I store them in global variables how would I reference that in a forloop for each player?

    Thanks much

  • I think I know why objects disappear from the pastier now. you said that the pastier object checks collisions before pasting? Well the player objects hit box only surrounds there feet.

  • Hey. sorry to bug you about an issue I'm having.

    a lot of posts ago a user was using this plugin for split screen, But had problems with the tile map not pasting tiles off screen. you suggested a fix but he never replied if it worked (that I noticed)

    I tried your suggestion. But it does not seem to work.

    Also there is something else I'm not sure has been covered. objects whose center is not in the canvas do not get drawn. this works for the most part. but for me my center is at the players feet. Meaning as soon as there feet go to far down the player will disappear.

  • I think I found a bug. I get a crashing error when I try to copy layers that have sprite sheets in them.

  • bump?

  • Hello.

    I'm using an Xbox 360 controller for a short project I'm working on. I want to be able to walk in 360 degrees. So I opted out of using 8 Direction, and am using the Custom movement behavior instead. It works how I like. But there is an issue with collision. it pushes the object out just fine, but the object moves around oddly when in contact with a solid. on the top the player jumps around, and on the sides and bottom the player moves to right at a faster than normal speed. ideas?

    Thanks.

    https://www.dropbox.com/s/o9ilihycb7mekgo/New%20project.caproj?dl=0

  • Hello.

    for my project I'm going to have an area filled with random NPCs that meander. I want them to be randomized in appearance a little bit so everyone is not wearing the same thing. (among five to ten-sh outfits)

    But I'm not sure what would be better on the system. making just one NPC object, putting all the outfit sprites in it, and assign a value that the system will use to dress the NPC. or give each outfit it's own object and put them in an NPC behavior family?

    Thanks much.

  • Hello.

    for the path finding in my project I would like to set roads that NPC's will walk on, But the player can avoid. I Could block off ether side of the path I want them to take. But I think it might be easier if I can somehow invert the cells. to instead of marking a cell impassable if a "Wall" is in it. to mark a passable if a "path object" is in it.

    anyone know a way? or will I just need to do the first thing?

    Thanks

  • Hello.

    I want ai in a scene to look as if they are using the 8derection behavior with no turning smoothness. to look like they mimic classic player movement. I set diagonal movement to false. But they still have a little smoothness when they follow the path. How can I set Ai to absolutely follow a path in 90 or 45 degree intervals with no smoothness?

    I set turn speed to crazy numbers. they do immediately face there detection as they start a path. But once they reach there first node they turn.

    the picture shows what I mean.