Vavacav's Forum Posts

  • I need to be pointed in the right direction on a feature I want to make. I am in between beginner and intermediate in my C2 skill.

    In my game, when you press ENTER, a full screen map appears. It's made on it's own layer and pressing ENTER just makes it visible.

    Now, I'm wondering if I can have a minimap on my main screen. It will mimic fully the big map, except only show a small area of the map, centered on your current location.

    I'm wondering if I should try to build this map completely separate from the big one? Or use the same map, and toggle between the two views of it? Or use the Canvas Snapshot feature?

    I guess I'm looking to be pushed in the right direction, as I don't have a lot of experience to know which road to go down.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For Each Key

    Current Value = 1

    Trigger Once While True

    Will this trigger once when the first key becomes 1, or will it trigger once each time each key becomes 1?

    And how should I build those conditions to produce the latter?

  • So, I fixed it, but I'm not quite sure why. When I clicked on the object in the Projects Window, it selected all of the different instances of the object in the layout window. One of them had white boxes around it, the ones for resizing an object. I figured this meant that it was at the top of some list, maybe z order. So, I swapped them. I made that primary one the correct default animation, and I made what used to be the default one, into the incorrect animation.

    I still had to save and reload the program for the change to take effect, but there is something more to this than just being the default animation. Thanks for your help anyway! It spurred me to try to figure it out for the nth time!

  • Yeah. Maybe it's a bug. It did originate as a cloned object. But I just tried to duplicate the animation and changing the original one to the correct one. But that still hasn't changed it. I think it's changed by some other trigger.

  • How do I change the icon of an object in the Projects Window and thus, the event sheets? I want the icon to be the first frame of the Default Animation of an object, but it is represented by one of the other animations.

  • There's other work arounds to do this, but I'm trying to learn how to use functions efficiently. (and to learn the limits of Construct 2)

    I want to create an object at (X,Y) where X = a variable named "POSITIONa" It's within a function that has a parameter of "a1"

    So, I want to write this: Create object at ("POSITION" & left(Function.Param(0)), Y), which would return (POSITIONa, Y).

    Is there a syntax to recognize the string "POSITIONa" as a variable once it's combined?

  • Okay, I got it to work.

    I didn't make it swap between active/inactive. It's active all the time. When you are not stuck to the ceiling, period and mag is at 0. When you are stuck to the ceiling, period and mag is at 2.

  • I want my character to stick to the ceiling and then bob up and down as if dangling from a rubber band.

    I got this to work by making a sine movement active after sticking to the ceiling, and then making it inactive after unsticking.

    But I want the character to start the sin movement at the same point on the wave each time he sticks to a ceiling, so I can control the animation. Now, if you begin by moving up and unstick while in the middle of moving down, you will start the second stick by moving down first.

  • Sorry, example below.

  • If you check out the Zorder in Layout 1, it's Blue Red Yellow, front to back. But regardless of the Zorder in the layout 1, it always shows up in layout 2 as Yellow Red Blue, front to back. You shouldn't see yellow at all. Even if I reorder my code on the general Event Sheet, it still doesn't effect the Zorder on Layout 2.

  • My main character is composed of parts, all on the same layer, with correct Zorder. I load him on one layout, with a HUD, and an event sheet brings me to a new layout. The Zorder is not preserved in the new layout.

    All initial objects are Global. All layers are named the same between both layouts. Is there a quick fix, or do I have to manually reset the layout on the start of new layout?

  • Yeah, it makes sense. I kinda looked into functions, but didn't quite understand it, at least in terms of what I'm looking for.

    Just now I did a bid of a mockup using functions and it worked, on the surface...but I still think it's going to get messy when I get into sub events, checking whether Up is also being pressed at the same time as B is released, and such. It's because functions are a one time trigger, which makes me wary. Even now, I can't check for other functions being called, while in a subevent of a On Call Function. So, that's that.

    Something tells me the best thing to do is focus on one control scheme, and then add the others when I'm done with the game.

    Has anyone tried using a Global variables as a control scheme?

    Global text variable as LEFT, RIGHT, UP, DOWN, NOTHING

    Meh, that won't work. What happens with both LEFT and UP are DOWN...Global variables for each button and direction? That's not right.

  • What's the best practice for organizing your code when you want multiple ways to control the game? For me, I want to be able to use Keyboard(WASD and Arrow Keys), Analog stick on Xbox controller, and Dpad on Xbox Controller.

    I don't want to put all four "LEFT" inputs into each line of code for what should happen when pressing Left. Do I just use one input to make my game, and then later, copy the code three times, into four groups, replacing the relevant inputs, and enabling the group that the user chooses?

    Ideally, I'd like to say, when you press A, LEFT, Dpad Left, or Analog Xaxis -75, simulate a global thing called LEFT. Then, I can write code from there: When global thing LEFT, action action action etc. Obviously, I thought of using a global, but this doesn't seem like a great practice(though I'm very new). Am I wrong?

    So, what's the best/better approach in organizing code for multiple ways to input LEFT?

  • Hmm...Thank you.

  • dropbox.com/s/jcx9a3djlcm1p0i/Fit%20Into.capx

    Newbie...

    Why doesn't a 16x16 sprite fit into a 16x16 hole? I know there are some issues with the program dealing with very small objects, but it doesn't work for 250x250 sprites either.

    All of the bounding boxes are the default squares. I'm using 8Direction Movement(set to only 4 directions) and the Solid behavior.

    Is there a feature I'm overlooking to get this to work?