lionz's Forum Posts

  • Yeah I can't see C2 right now to test it but it'll be combining 'key is down' with the system action every X seconds. So while space is down > add condition every 0.5 seconds spawn the bullet. Whatever time interval you need for the game.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Cannot send an example for several hours as in work but what I am saying is you don't need to use while here, the keyboard action 'key is down' basically means 'while the key is pressed down then do this'. That's what you want to happen, shoot while the key is pressed down? 'On key pressed' is just a one time trigger on initial key press.

  • Keyboard "Space" key is down, is probably what you're looking for.

  • Try Sine behavior with horizontal movement.

  • There's a MoveTo plugin that I used to have objects move in a grid so you can say move x+32 and it'll move right 32 pixels and stop, move y+32, it'll move down 32 pixels and stop etc.

  • Wherever the ball goes to award the win, add 1 to a global variable for player score. When GV is 5 then end the game.

  • It's not possible and I'm not sure why you would need to.

  • Ooo interesting, make it into a full open world GTA style game

  • What do you mean when you say 'appears', are you creating it? Check that the instance of the sprite with the lowest UID has these settings as it will use them when created.

  • Haha nice game, well put together.

  • Haha nice game and nice post ^^

  • On the bullet behaviour set 'Set Angle' to No then the angle of the enemy won't change with the bullet direction.

  • You could have the item name in x,0, the amount in x,1 and the weight in x,2, and the combined weight in x,3. Drop in the for loop so it comes out as set value at loopindex,3 to loopindex,1*loopindex,2.

    Now all the total weight you're carrying is in y=4 for every item. You would now just total everything in y=4 as the total weight and compare it to the allowed weight limit.

    Made an example here: https://www.dropbox.com/s/dm0rs5ryi8rtb ... .capx?dl=0

  • You can assign the items from the array to instance variables on the chest, it's up to you how you want to do it. You could fill an array with random items and assign 1,0 to item1 and 2,0 to item 2 on the chest and generate the items again for each chest, or you could do it another way which is to have an array which contains every item in the game and set item1, item2 etc on the chest to a random item from the array. In the end it just depends how your game works and how the items in the chest are determined, but pretty much you are assigning a random item to a variable on the chest.

  • Oh right if it's the same object type in both of those families then it probably won't work correctly, depending on how the game is, but I imagine it won't. You use families to apply the same logic to multiple objects, not for creating 'for a family'. I would return to the isFriendly variable and ignore families altogether for this game and just be careful with the picking.