larrynachos's Recent Forum Activity

  • Hello, I've been chipping away at a mobile game for a while. I had been previewing on my phone just fine until I added audio to it. Now when I try to preview it does one of three things

    Freezes as a black screen

    Freezes as the loading screen (sometimes blue bar, sometimes red)

    Gave a javascript error (I haven't been able to get a screenshot but it says something like javascript error preview prelude)

    Preview works fine in pc browser. I can preview other mobile projects with sound with no problem, I'm really not sure what's going on. I'll post again if I can replicate that javascript error, but in the meantime, any ideas?

    Using r265

  • Phoenixbowman

    This is one of my thumbsticks, and the easiest to follow:

    Again, it seems like a lot, but it does move pretty fluidly. And if you'd like, you can set the thumbstick (the small inner circle) at 0% opacity so it won't be seen.

    There is a way to do this just with a touch input and without a thumbstick, but imo users tend to slide their thumb around the screen, which makes them have to stop, lift their thumb and bring it back down to the corner. This way it gives them a point of reference for their thumb.

    Sorry to bump such an old post, but I've been using your method for a mobile game I'm working on, but the movement is a bit janky. There are brief moments when it seems to move properly, but usually the direction doesn't change if I am sliding the stick in different directions.

  • Don't use a family,

    when "on collision NPC with NPC" will pick both of those.

    Add an event to pick the smallest of the two. then it will destroy the right one.

    I'm getting warmer, I can feel it. I got it to where the npc with the highest mass will absorb the other one, but I can't get it to see if the mass is 1.25x the smaller one, so a difference of 1 mass will result in absorption. Also, I'm not certain that the number being added to the mass is half the mass of the lower mass object, but instead adding half of the mass of the bigger being itself.

    This is the event I'm using. I had to disable the mass check or else it wouldn't work.

    =============

    BONUS QUESTION, because I don't want to spam with threads lol. I'm trying to redo my npc ai events so that they move more efficiently and realistically. Initially, I just had them picking a random instance of the food object and pathfinding to it, but I want them to chase food that is closer to them, and I want them to recalculate if the food they were chasing is eaten by someone else. I keep having a problem where they all chase the same food in a synchronous movement. I want them to move at different times from each other, to chase food more intelligently and to recognize when the food they're pathfinding to is eaten.

    Here is the event I'm using. I also tried using a state system and an identification system for the food objects, but both options didn't function. Pls halp ;-;

  • If the npcs aren´t in a family yet, drop them in a family (maybe the player too, but that depends) and do

    NPCfamily on collision with NPC

    Okay, that gets me a little further :) but how do I call to the unique instance variables for the big npc and the smaller npc that is being eaten. The family doesn't have an instance variable.

    Also, I'm a goon and put this in the Construct 3 section instead of Construct 2, but the same principles should apply to my issue :L

  • I've run into an issue with an agar.io clone minigame I'm implementing into my game. I have it working where if the player is 1.25x the size of an ai, the player absorbs it. However, I hit a snag when trying to make the ai be able to eat each other as well.

    The event for the player eating Ai is as follows:

    player on collision with npc | Player add npc.mass to mass

    player.mass > npc.mass*1.25 | Npc set mass to 0 (there's another event that destroys an npc when mass = 0)

    However, when I make this event affect npcs vs npcs:

    npc on collision with npc | npc add npc.mass to mass

    npc.mass > npc.mass*1.25 | Npc set mass to 0

    whenever the npcs touch each other, they both are destroyed, regardless of size. I'm assuming it's because cs doesn't know which npc I'm referring to in either instance. Is there a way to fix this? I've done a little research, to no avail. Thank you!

    Bonus question: How do I make the ai run away from the player, as well as each other npcs if they're bigger than 1.25x their own mass? They're using pathfinding and LOS. Right now I have them pathfind to a random point in the layout, but more often than not they just run right into the player, getting absorbed.

    I'd also like a little help on keeping the npcs from bunching up or chasing the same food, as well as something to detect when the food they're chasing has already been eaten by someone else.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm a bit surprised that this stopped working for me, I'm not sure what's wrong. I'm running Construct 2 as Administrator, I've opened the port and everything, but it's still giving me the error "Unable to start HTTP server on ip port 50000 (1214).

    Pls halp, I'm working on a mobile port of my minecraft ctf game ;-;

  • Hi! I'm trying to make a physics ball game where the ball's gravity depends on the orientation of your phone screen. I've gotten it to partially work, with tilting the screen left or right will move the ball. However, it will not work if I go off a ledge and turn my phone around to slow my descent. Here is the code I'm using:

    Every Tick | Sprite apply physics force Sprite.Physics.Mass*0.2 at angle -Touch.Gamma + 90 at image point 0

    Is there something I'm not seeing? I can't find a workaround to this problem. Thanks!

  • Lmao, the solution was literally just to remove the if zombie is outside layout condition, and have them move purely based on position

  • Getting closer, I've found that

    if zombie is outside layout

    if zombie.Y < 0 simulate pressing down

    This gets the zombie to move down, but it stops before it actually gets onto the layout. So I'm assuming the trigger ends as soon as the first pixel touches the layout; is there a way for me to set a delay or to force the whole zombie onto it?

  • I'm working on a zombie game that has zombies spawning off screen (all 4 directions). However, I can't figure out how to make them move onto the layout before they begin wandering/attacking the enemy.

    I found the if enemy is outside layout statement, but I don't know how to go about making the zombies move in the respective direction onto the layout. Pls Help!

  • TileMap object has a number of expressions to convert tile coordinates to screen coordinates and vice-versa.

    PositionToTileX(x)

    PositionToTileY(y)

    SnapX(x)

    SnapY(y)

    TileToPositionX(x)

    TileToPositionY(y)

    Use TileAt(x,y) to get tile ID.

    As for your second question, it depends on your game. If this is just for storing customizable properties for individual tiles, I would probably use an array or dictionary. If you need to add animations, behaviors etc. to your tiles, you will need to replace them with sprites. (or put sprites on top of them)

    > I have an event set up so when I click the tilemap in an editor window (separate layer, paralax 0,0), but it selects tile id -1 instead of the tile I clicked on. I'm assuming it's not translating the mouse coordinates to the editor tilemap because of the parallax (the tilemap technically isn't moving)..

    >

    Not sure I understand.. You may need to add scrollx, scrolly to your mouse coordinates. And probably subtract WindowWidth/2, WindowHeight/2. It's hard to tell without seeing your capx.

    Sorry I'm late, it's been a long week. Anyhow, here is what I'm using to select tiles and place them.

    tile selector is the tileset the user clicks to choose which block they are placing down. world 1 is the tileset where the user draws the level. the tile selector is on layer 5, which has a parallax of 0,0 (so it remains on screen while the user scrolls around the layout).

  • Are you assigning any value to that instance variable after you spawn a new instance of the sprite?

    You need to specifically assign the proper value, unless you want it to be default. I'm guessing your default value is 'slime'.

    Same applies to the animation.

    I had it set as a number, 0 for slime, 1 for snail. The problem was that the newly spawned enemy wasn't setting it's variable to 1 and changing its skin. I ended up doing separate sprites. anyways. I reckon it'll be better in the long run.

larrynachos's avatar

larrynachos

Member since 6 Jan, 2013

Twitter
larrynachos has 1 followers

Connect with larrynachos

Trophy Case

  • 11-Year Club
  • Entrepreneur Sold something in the asset store
  • 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

16/44
How to earn trophies