lionz's Forum Posts

  • Sure <edited>

  • Common issue that's posted here a lot. Other animations are still true such as the 'walk' anims so it tries to play them at the same time. You have to add more conditions so animations are not true at the same time, for example under the 'walk' anim events you could add conditions 'wake' is not playing and 'sleep' is not playing. Anything really so that the wake/sleep and walk events are not true together. You could also set a variable for when it goes into wake/sleep and add under the walk anim events 'variable is not set'.

  • I know what you're saying and this is mentioned in the manual. Maybe I've been using Construct for too long but it does make sense to me. The condition was not met so the picked instances have been narrowed to 0 even though it didn't run that part of the OR. When I look at the event sheet it makes total sense that if I now add a sub event there are no instances to pick from. Maybe you can try not to use different object types in an OR.

  • When you walk over any loot bag make slots visible and when you walk away hide them. You can store what items to show as variables on the bag so var1=slot1, var2=slot2. If you take an item you set the var for that slot to empty so when you return to the bag it is not going to show anyway because var=empty.

  • Just need a simple system condition to compare the global like if variable = 0, set text to "Sunday", if variable =1, set text to "Monday" etc. To reset the variable the logic is with the button, so when button pressed add 1 to variable. Then a separate check if variable = 7, set variable to 0.

  • here I made a very quick inventory to show you dropbox.com/s/54ze0xrjq2i83ro/lootdrop.c3p

  • You wouldn't need to use arrays if you already have the inventory working without as it would be the same logic. For item rarity you could generate a number from 1-100 and if it is 1-10 then you spawn legendary, something like that. For the item selection and spawning, do you have that already with an inventory? You would spawn the items in the same way, create object by name on top of the slot if you are not using arrays.

  • I edited the response above, try this. The problem is that you don't know what object will be created so you can't apply actions. If you use Family in the actions then it'll change the one that was created, not the new one. If the above doesn't work then you might have to do logic for individual Shadow objects rather than Family, which isn't that bad.

  • That looks ok, is that not working? What has gone wrong?

    edit: I see, you can't choose the object in the actions.

    Try this, if you store the animation and frame in a global variable. Then use 'family on last created' and set the animation and frame to the variables. Maybe...

  • Nice, that should be easy then. So if you say 'Create object Shadow', you can then set animation to Family.animation and frame to Family.animationframe, as the Family was picked in the condition. If you picked the actual object in the condition i.e. pick Shadow A then created Shadow A then it will be a bit more diffiult. Should work though with Family object 'Shadows' in condition and then 'create object Shadow'.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If it's that kind of design then for a start you create several of the same slots for the loot bag and spawn a random item to them which I imagine would be setting a random slot.itemname or creating an object on the slot itself, however you have done it earlier. You can copy all logic from the inventory, then you should be able to move items from those slots to your inventory in the same way that you move items around the inventory.

    For the loot you can have all items in an array and pick a random row for example and then create this object or set itemname on the slot, or in a more simple form you can set slot.itemname to choose('sword','armour','potion') for example which picks one at random. Then you expand the logic as you go based on what loot can spawn, if enemy that died=goblin then set loot to choose(A,B,C)).

    To run it for each slot you could give the lootbag slots a variable to differentiate them from the inventory ones and say for each slot, where variable=loot, run the spawn item logic.

  • You didn't pick a signpost so your events mean text will be spawned at every sign post in the level (unless tutorialsign and signpost are in a container) then when you step away destroy them all, this could be any number of objects. Then I notice your number of objects increasing just from walking to and from the sign post which raises another potential problem.

  • I should've asked if you used array for the inventory. Because the loot bag would just be another mini inventory that you generate. You can push random items to the array and they appear in slots the same way they would in an inventory. Deciding if the enemy will drop loot is just a variable like for example set to choose(0,1) if it was a 50% chance.

  • Ok I chopped it down and made something that works. Probably you are overthinking arrays, you've been here a while asking for help. Just relax and think about what you are doing, arrays are easy and all the logic is there for you to use. Trial and error will not help you with getting a working crafting system, you need to have control and understand the arrays. dropbox.com/s/u27mn3dovc9b5ya/addtoinv.c3p

  • It's possible, there just might be problems with picking. Did you first manage to create the copy because if you are using a family this wouldn't normally work as it would create a random object from the family, or are you using create object by name?