lionz's Forum Posts

  • If you destroy the sprite and create it again then it will be created with the default values. That's a way of refreshing it if it's an applicable method to your game.

  • Here : https://www.dropbox.com/s/u5nzb1s2wbqlt ... .capx?dl=0

    Not sure what you're trying to do with the count_instance variable though.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Pretty much impossible to tell from a screenshot. I would suggest putting some debug logging in, in the form of pushing text to an array. It is useful for working out where things are going wrong. Also look at the array in debug view to see what the value is at 0,y. What is actually wrong, is the animation not as expected? Is it spawning the item? It's not even clear if RemoveFromInv function runs at all and it picks up IDREMOVED value correctly.

  • I think that link is broken, but sure I can take a look.

  • You do not have permission to view this post

  • It's because when you press the text box on the game over screen to restart, you are 'in touch' and when you navigate to the game layout you release the button that becomes 'a touch end' and sets Aiming to 0 for a brief moment. When Aiming is set to 0, it doesn't set the position of the ball to the sprite like it does when Aiming is set to 1. You'll have to rework that logic around the any touch end event and setting Aiming to 0, come up with a foolproof way of forcing that ball position to the sprite or find a way of forcing Aiming=1 at the start of the layout. To clarify, the issue is to do with Aiming being set to 0 on start of layout because you are in a touch from the game over screen, which doesn't set that ball position correctly, whereas when you start the game initially you are not in touch and Aiming=1 so it looks correct.

  • You can do this in one event.

    Have an instance variable or boolean i.e. isUsed on the plate.

    Have 2 variables on the burger which is its current position (for cancelling). curPosX and curPosY.

    Then the event is Burger on drop, if overlapping plate and plate.isUsed is set to false, set burger position to plate and set plate.isUsed to true, Else set burger position to burger.curPosX, burger.curPosY (its position before it was picked up).

  • Hmm well there's the second way I mentioned where you collide with the outside of the track. You could also possibly do something like set image points on each corner of the vehicle and say if any one of these is not overlapping the sprite then the vehicle is outside of the track.

  • Right click on the overlap event and select 'Invert', this then becomes 'when not overlapping the sprite' i.e. when you are outside of the sprite area or track. This would be more for if the entire car has to be off the track though. You could also consider just having a sprite that borders the outside of the track and using an overlap event with this if it is to be that the car is slightly off track that triggers the lose event.

  • To SEE what are you are doing wrong we would have to see the events but I think I can guess this one anyway, you probably have the variables toggling on/off in the sub events so if 0 go to 1, if 1 go to 0. With C2's top down structure it will change the variable to 1 then back to 0, if that's how you've set the sub events up. So the variable is changing, just to 1 and back to 0 in the same tick. To fix it add an Else to the conditions.

  • Ah right, your events 3 and 4 need to be sub events inside the touch event, at the moment you have them outside.

  • Take out set animation frame to 1 in the second event. In the first event, on start of layout, set the animation frame to 0 (or set toggle_music to 0)

  • That looks reasonable, what's the problem?

  • It displays the value at 0 because that's the co-ords I gave in the example, nothing specific was asked for. If you want to display a random quote you would probably create a function, before which you set the review parameter to a random number and pass it through as array.at(param(0), 0). You can pass through another param for the name as array.at(param(1),1). You don't have to use a function, you can just set two variables to a random number and assign the co-ordinates to array.at(var1,0) and array.at(var2,1) but I prefer to use functions for things like this.

  • ReviewQuote set text to ""&array.at(0,0) would display "Blah blah blah"

    ReviewName set text to ""&array.at(0,1) would display "Mr Grumpy"