lionz's Forum Posts

  • I would definitely use arrays, it's so easy. An array is just a list of items and you can see what's going on very easily with what you've collected. You can use simple conditions like when you pick up an item, check if the array contains the item, and add 1 or stack it.

    In my opinion it's more difficult to make an inventory without an array and if you are new with the software you will likely come across bugs that you don't know how to fix. Checking if a certain item is overlapping another item to be able to pick it up etc. This can all be avoided with a simple array.

    Array items are rows, X=0, X=1, X=2. Pick up an item, check if array contains item, if not then push to the back of array. Second column could be amount collected so you can stack. Easily display the array items in your game : give the inventory slots instance variable IDs that relate to the array rows - for each slot set slot.item to array.at(slot.ID).

  • Yes under the object conditions, pick nearest instance. Did you check?

  • A bug of the engine itself hmmm

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can add a timer behaviour to an object, perhaps the one with the ability. Then on key pressed start the timer for X seconds. Then on the key press event you can add a condition 'timer is not running', which means key press won't work again until the timer finishes.

  • It'll be something to do with your events but we can't see them. Check that the function is not being called constantly.

  • Some of these conditions can be true at the same time. The first two conditions overwhelm any other events. The is blocking event should also specify not moving. The is moving event should also specify not attacking and not blocking etc.

  • Jump button is down : simulate control jump

  • You do not have permission to view this post

  • Yep sounds good :)

  • Yep in the condition you need to pick the instances. Weapon held but if there is only one weapon then fair enough and also the weapondrop object. So I guess you would use player is overlapping weapondrop or something similar.

  • There is only one weapondrop instance in the game? Are you sure? Looks like weapon is being assigned default values from a weapondrop instance instead of one you have selected and then the others update as expected, weapon stats to variable and then variable to weapondrop.

  • Nice :) good luck

  • The bit about it triggering once is also important or you're going to see constantly swapping variables. What does the start of the event look like ?

  • You made the basic_attack variable but didn't use it. If you add a condition basic_attack is false then it locks the player out from pressing up until everything has finished.

  • You are not picking the currently held weapon in the condition, you need to do this to set those values to the temporary variable. Then when you use weapon.id etc it will relate to the currently held weapon. Also make sure it's a trigger once event on a key press or similar and not running constantly.