lionz's Forum Posts

  • Add a trigger once condition.

    You can set the animation to loop=yes

  • Ok great :)

  • every x seconds, progress bar set progress to progressbar.progress-1

  • I'm not really getting it, you mean like this?

  • Hello! Image point 0 does refer to the origin which defaults to the centre of an object, however the image point can move if you add new graphics. Open the image editor and look at the imagepoint 0 location, it may have moved below the image (where the fireballs are spawning). You can right-click the origin image point and quick assign it back to the middle.

    The fireballs moving up I believe is an optical illusion because the platformer template comes with layers that have a different parallax. This means that the fireballs are probably spawning on layer 0 which is the background layer and this layer has a slower scroll rate to layer 1 that the player is on. To fix you can set the background layer parallax in the options from 50x50, to 100x100.

    Having the different scroll rates on layers is not helpful for beginners I guess, you can read more about parallax here but in general you can just keep it at 100% : construct.net/en/make-games/manuals/construct-3/project-primitives/layers

  • You must be resetting global variables or setting it to 0 on start of layout.

  • There are probably many ways to do it. If i was to do it my approach would be to have 5 variables on the space called ID,left,right,up,down and these are numbers. If the 4 directional variables are 0 it means you cannot move in that direction but if they are populated with a number greater than 0 it means you can move to the space that has that ID.

    On the movements events it would be left key pressed checks the left variable of the space you are on, right key pressed checks the right variable of the space you are on etc. So as an example if you are on that starting space which has a variable space.down=2 and the space below it in the picture has an ID of 2, it means on down pressed you can move to 2. If it was space.down=0 then you wouldn't be able to move. And if the starting space has an ID of 1, then the space below it which has an ID of 2 would have a variable space.up=1.

  • These long discussions is what PMs used to be for I suppose. At least you understand the logic enough to see the bugs and kind of know where to fix them so that should be enough to get you going. If you get blocked you will simply have to share the project at that point )

  • Those 3 values were an example, in the game they are unknown so you have to set ballcolor to rgb(of a sprite). Maybe someone knows how to extract those values, but I fixed it the other way :P

  • You wouldnt need instance variables to track that but rather some logic around powerup dropped onto a powerup, set the powerup in the slot back to its original position and leave the new one in the slot.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Because I don't know how to extract rgb and not sure if possible, the best I can do to minimize the code is this, where you go into the layout and set 3 instance variables on the ball to its rgb. Maybe that helps, it does avoid typing them all out in the event sheet. :)

    dropbox.com/s/dbyrzpar6agrp6r/ColorTests.c3p

  • You can make an inst var = another inst var but you already have too many. How does your game work? Do you need to see the dropping of powerups onto slots? Where are you dragging them from and do they swap? So the text is displaying the instance variable on the slot that seems fair. The redundant bit is the ability having instance variables called slot1 active etc. I don't know if it will work for your game but the best thing is to have the actual slot with the powerup images as frames and set these. It sounds like you are moving the powerup objects from place to place when there may be no need to do that but I don't know how your game works.

  • I think the slot should be using an instance variable, not an assigned text object. The variables for slot active are not required from what I'm reading. You don't need to say powerup A is active on slot1 by the way of an instance variable on the powerup, you would just have it equipped on slot1. If you can drag a powerup over a slot and replace one then I'm not sure if a check to see if something is in the slot is required either? You could resolve this by getting rid of the slot active instance variables. The slot active boolean could remain if the slot can be disabled so you can't drop powerups into it.

  • If you know in advance what you want to set it to like you are describing here then you could set the global variable to a string i.e. "140,176,136" then on object clicked set colour to rgbEx(int(tokenat(variable1,0,",")),int(tokenat(variable1,1,",")),int(tokenat(variable1,2,",")))

    It may look scary but this is just splitting out the 3 numbers in the string and setting the rgb parameters to each number, where 'variable1' is the global variable. But yeah, this may be the reverse of what you want.