lionz's Forum Posts

  • Ah okay, you can increment it add 1 to the animation frame, set it to self.animationframe+1. Then have another event if animation frame greater than 3, set to 0, this will loop it.

  • It's continuing what you already have there,

    if sprite.frame=1, set opacity 70 etc

  • Your points is a global variable? You can set it to 0

  • The use of families looks like it is the reason it's not working, you are not specifying which array to grab the data from when you use a family. If you want to do it per layout then you should run that logic through the specific array that has the data.

    The way to do it with one layout is to keep refilling the one array with the data from the correct level file. So what you're doing for level 1, you call it again from level 2. The way to change the data in the array could be to set a global variable for level number then restart the layout, if level=1 then grab from json1 and if level = 2 then from json2 etc.

  • Hiya, if you are using this method then I don't think you need multiple layouts? You should be able to use one layout and load the different files into the one array on request. The problem you encountered, maybe the event sheets are not linked to the layouts correctly? This is a common cause of not running the events as expected. Also I see your event is running an array called Rooms but you load the data into arrays called RG so that's confusing.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I took care of this thing with a variable for left and right. When A is down set leftvar to 1, when D is down set rightvar to 1. On A and D released set those variables to 0. Then under A is down you add a condition that rightvar must be 0 and for D is down that leftvar must be 0, this means you can't press A if D is down and you can't press D if A is down.

  • Then as a guess it sounds like the layouts are only using the first event sheet. You can link each layout to its own event sheet so check this first.

  • Under system actions, set time scale to 0, then back to 1 to continue.

  • There is a pick nearest/furthest instance condition if that will work for you here.

  • Hey, probably the reason noone responded is because this is impossible to give an answer without seeing the project file.

  • Is that the only event you have? Because this says to play the same sound on start of layout.

  • In what sense is it not working? I guess because you are adding 1 every tick it won't be a noticeable delay, you should add an every X seconds to the add event. Also remember to set delay back to 0.

  • You'll have to explain what you did and what is broken because that object is still a tiled background and the event related to it seems to be disabled.

  • Ah right it's because you're using a tiled background which has no collision, you should be using a sprite.

  • The first problem looks resolved as it spawns one only based on the logic. To use a range you can use random(x,y) where x and y would be the left and right co-ords of the box.

    For the second problem you need a parameter sent through the function, they are useful things. When you call a function it doesn't pick instances from the previous actions, to get around this you send the enemy UID through the function as a parameter. Then inside the function event you add a condition to pick enemy where enemy UID = parameter, this will pick the one you clicked on originally.

    For the third problem at its simplest you could use choose(1,2,3,4) which would set an answer from a choice of answers or you can look at Arrays where you can store many answers kind of like a spreadsheet and pick from them.