Sir LoLz's Recent Forum Activity

  • LittleStain

    oh that second one is a good idea. I might try that. thanks!

  • mmm. that worked. Guess I will just have to know what sprite it's referencing. and use separate events for the pinning. Thanks.

  • the player will use the same sprites as NPCs. So I make the NPC family do it's own thing, except for the one that the player will control. one at random will become the player object though variables that state such to the game.

    I have one of each on the layout and destroy them at the start, then spawn them in a "repeat nth times" event. then when the hitbox (being in the same container as each sprite) is created I pin it in it's creation event.

    Due to my project using plugin's covered under ULAs, I can't share the Capax. But I hope this photo showing the "at start of layout" event will show whats needed.

    https://www.dropbox.com/s/zzzefbehffmu8kc/construct.png?dl=0

  • Hey. I know a lot of people ask for this. I'm not asking for it to be feature as I know Ash said it would be complex and impact performance. I just want to know what to do.

    When I started my project I had one sprite for the player. I added a new sprite to it's container that I use for it's hitbox. When it is created I pined it to the player. and it worked fine. But then I changed the player sprite to a family because I would want to use different sprites for the player at different times, but would not want to copy the code. But now the hitbox object won't pin.

    Ideas?

    Thanks.

  • ah both are fine answers. thank you!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello. I want to add a way for players to add a name to there character. thing is my game supports Controllers, and I want to let them inter there name at the same time(not using a keyboard). I'm thinking the classic style we all know from arcades were you scroll up and down until you have your letter, then hit "A" to select, then move to the next letter.

    Sound simple right? Thing is I don't know how to pull letters like that. how it worked in my head was to hold a letter in an array. And if they press up or down to then replace the letter with the one above or below it. I figured to do that i would need the letters numerical value (a=1,b=2.ect) and to then increase or decrease it and reset it to one if it surpasses 26. But I can't think of a way to do this

    So I guess my question is how do I convert a number to a letter?

    Thanks

  • 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.

  • 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

Sir LoLz's avatar

Sir LoLz

Member since 1 Oct, 2014

Twitter
Sir LoLz has 58 followers

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Viral Game One of your games has over 100,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies