SpectifyyDev1's Forum Posts

  • 11 posts
  • I have been trying to figure this out, and to be quite frank, I am stumped.

    So Im working on a game, and in said game you can drag and drop objects around. I decided not to use the default drag and drop, and to make my own so I can tweak it around. One of the things I did with this is making my own gravity. Its a constant force that is applied every tick, and I can turn it off and on per object at will pretty much.

    Recently I decided to add some sorry of conveyor. A basic rectangle that, when one of the objects is placed on it, it would move constantly in either right or left (depending on the type of conveyor)

    the first thing I did was simple, on collision - move at angle. But that didn't work, that's fine.

    I tried combinations of collision and stuff like that, but nothing worked. I tried adjusting the gravity settings, and even messing with overlap instead, nothing was working.

    So after a while, since I had not added the conveyors to the solid family, I could phase the physics object through it. For some reason the physics object then was stuck inside of it and.... it worked.

    WHAT!? so far after a few hours of messing around, the only thing that makes it work is when it has the overlap condition, and the physics object is phased and stuck into the conveyor. This is not a solution, as I need the physics object to be on top of the conveyor and to be intractable, because most of the game has physics.

    so, what do I do? here is my capx:

    mediafire.com/file/uy5ae2hccdbbmgq/The_Rocky_Machine_Full_Game.c3p/file

    thank you!

  • NEVERMIND I actually figured it out

    so even if you are not using touch as a means of detecting and stuff with objects, it's still working, basiclly doing the same thing as the mouse

    all I had to do was add an on touch end action and write this:

    apply physics impulse at angle

    impulse: min(100,Touch.SpeedAt(0))

    angle: Touch.AngleAt(0)

    it was surprisingly simple

  • Title may say a bit, but I'll elaborate

    basically a big part of my game are these physics objects, you can pick them up using a system similar to the drag and drop feature (I was having some weird problems with it so I built a system myself, nothing fancy. It just detects weather or not a play has clocked and held on a object, and if true it sets the object's position to the mouse position until the player releases the object)you do this by holding down the mouse button while over an object

    Now I want to add the small quality of life improvement that is throwing objects, but I can't figure it out. All I need to do is when you let go while the mouse is moving, the object to "throw" and continue moving in that direction while also abiding to the world gravity settings

    For a good example, something like the physics on people playground, MAD2, stuff like that.

    everything I can find on it either is many years old and outdated, or uses some form of the touch function, which doesn't work like I would like it too.

    does anyone know how to do this?

  • OMG I just figured it out, I'm ashamed to call myself a developer after this lol

    it wasn't an instance variable

    I was using a global variable

    what is wrong with me

  • so, currently I have a small system in place where if you are in "build mode" have your mouse cursor over one of the machines in the game, and press "F" it'll turn off the machine and it will stop producing whatever it makes until its turned back on again.

    I do this by way of simple detection, but with that comes a problem.

    Lets say I have mutable of one machine, it ends up triggering all of them to turn off, which in some cases can be counterintuitive.

    How would I make it so it can detect the one certain object, and only trigger it for that one object.

    thanks!

  • thanks! One more question to add on I guess, how would I go about adding to the scale or subtracting from the scale?

    for example, on mouse wheel up, add lets say 0.2 to the scale, and then on mouse down, subtract that from the layout scale?

    thanks!

  • hello! currently working on a tycoon like game. I have it set where you can pan around the scene using the middle mouse button down, and all that stuff. I was trying to figure out how to use the wheel to zoom in and out in game, but I have not clue, anyone know how?

    thanks!

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you so much! the example helped a lot!

  • Hey y'all!

    I'm decently new to construct 3, I have only been working with it since around December of this year.

    I'm working on a game right now, and I need to make a mask for it to work. The basic setup is this

    I have 3 layers, the top layer is my light, I can turn it on and off with ctrl, all it does is show a white circle and it follows my mouse

    layer 2, the middle layer, has a completely black screen, this is going yo show only when the light is off

    layer 3, the bottom layer, is where everything will be taking place. I have a version of my scene that is a bit lit it,i want to create the illusion that the light is lighting up the scene, but making a mask that shows what it in my layer 3, through the light on layer 1, (the light is set to 25% opacity, but i want layer 3 to show up as 100% through that)

    does anybody know how to do this? iv tried a bit but i have no clue, and i don't want the entire thing to change when i turn on the light, it just looks tacky

    thanks!

    Tagged:

  • thank you so much, that makes a lot more sense!

  • Hello! First time on the forums, and still a bit new at construct!

    I have a simple 8 directions, (rotation locked) to make a simple top down controller, and I have animations implanted. I want to make a rouge like game where the player can equip a ton of different swords, and use em in epic fights.

    I have most things roughly working, but one. My player's default animation is facing right, when you hit any variation of the left arrow, it switches it animation group to one I set up for left, simple enough. I have a weapon hold area that follows the player, that I am planning on being in charge of equipping and de equipping my sword, it follow the player correctly, but when I switch to my left animations, It is still on the right side.

    After a lot of searching, I figured I needed to use the "Pin" behavior, and "Image Point". I tried for a while but cant seem to figure out image point.

    I can pin it to image point using an event, but what do I put it in the box. Its current position in the editor is fine, I just want it to flip to the other side, but I can't seem to do that, anyone know what I should do

    Thanks!

  • 11 posts