lionz's Forum Posts

  • Move To is a separate behaviour. To make use of the obstacles, which I think you can just add once by the way like on start of layout, you should move with Pathfinding behaviour and find a path to the player.

  • Yes if that plugin is available it does look suitable as a kind of 'create object by name' of the Construct 2 era. With this you may be able to chop it down a lot as you would with create by object, where you send the monster.var through as a parameter and spawn object type 'nickname'.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Shouldn't it be set player score to level 2 starting score? Depends on your game design but from what you described I assume the start of level 2 is the score from level 1. There are many ways to do it. You can store the score at the end of level 1 as a total level 1 score and set your score to this if you die in level 2.

  • What a blast from the past with these functions. I had a look and I think based on how the spawner is set up and because it's Construct 2 there isn't much you can do. You don't need a function for each monster, you could pass through the spawner.monster variable each time into a single function that has conditions if param(0)="bug" then spawn bug etc and also a second param(1) for the trigger type if collide etc, but without create object by name there isn't a lot you can do to minimize the code beyond this, you would still need a condition for each monster. Construct 2 is really old though, maybe time to upgrade? :)

  • Love it, good luck! I added it to Steam wishlist.

  • You do not have permission to view this post

  • Repeat conditions within one spawn function seems fine, based on a monster name parameter sent through. Really it depends on the gameplay design for spawning. What are some examples of variables on a spawner and expectation of what it will spawn?

  • Spawner var can be a string for the name of the monster object then use system 'Create object by name' with value spawner.var

  • Oops! on my file change to WhichItem=type

  • here I edited for you into one function. much easier when you've bought Construct and can try it dropbox.com/scl/fi/3g58l4bcubx66vecegvyf/Inventory_edited.c3p

  • You mean it is adding 1 to all items? That's down to the ordering in the loop block should be for each at the top then the conditions. I just realised though you don't need the for each loop either you can just say whichitem=item.itemtype and then on the bit below just use an Else. You could try this temporarily just to see if it works i think it should. The Else should trigger when it cannot find a slot that matches the type.

  • You could set a variable to floor(random(64)), this generates a number from 0-63. Then you can say if=0 then action the event.

  • Bring the set found and add 1 actions to the top block that has the loop along with the 'whichitem=' condition and also add a system action 'stop loop', and delete the second block below.

    On the third block remove type=item.itemtype condition.

    There could still be a bug but let's see. I need Construct purchase to assist properly but I'm buying it soon.

  • You could have a family bool like isPlayer and then apply all logic to those with isPlayer=true to group player logic.

  • On the item check you can just say for each slot if whichitem=type then set found to true, stop loop(system action), so that stops at the correct item slot so then you can just use action add 1 also which would be the correct slot, this gets rid of the other following events.

    For the following bit where you are about to call add to inventory you don't need all the duplicate events, just one of them blocks and it sends through the type anyway, so that would be basically on 'not found' condition - > create slot, add to inventory with type etc

    And for add to inventory function again you just need single block for those actions not the duplicated ones, the only difference is the frame, instead you could use different animations on 'Item' object for each item and use set animation to 'type', alternatively create separate objects for each item and then create object by name 'type'