Cameron9990's Forum Posts

  • 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.

    Since the inventory is on screen at all times, I currently have it as just... well... items on screen. They are currently sprites with a handful of variables that you can equip and move around to different inventory slots.

  • Did you already make the main inventory? Which bit are you having trouble with in particular? If you mean that you have none of the above then there's a lot to do here.

    I mean, like the game I listed I have the inventory stay on screen the whole time, it's fairly small and only contains a couple items. I just needed help with the actual loot and loot bag generation.

  • I'm making an RPG right now inspired by Realm of the Mad God (and some other things) anyways, I'm doing loot much like in that game where if you kill an enemy it drops a bag, if you walk ontop of the bag, the inventory of the bag appears on your screen and you may drag the items into you inventory, if you step off and back on, the remaining items will of course still be there. The lootbag itself will only actually spawn if the enemy actually dropped any loot to begin with and when all the loot is taken out, the bag disappears. I'm not really sure how to go about doing this with randomized loot and I recognize it will probably take me a bit of a back and fourth conversation to fully understand. It's the last basic I believe I still need for this game so I really do appreciate any help I can get.

    Tagged:

  • ObjectTypeName returns object name (a string), it can't be 0 or 1.

    You need to explain what you are trying to do.

    I'm making a card game, I have it set in the pack opener to whenever something in the card family spawns to add 1 to Cards.ObjectTypeName in the dictionary so it can keep track of how many of each card I own... so if you're telling me it needs to be a string that's a little odd to me since numbers are what I've been using and it's been working.

    But basically this is for the card gallery, I want it to be if you own at least 1 copy of a card it's 100% solid, and if not it's slightly translucent.

    Although I believe what I did is checking if any exists as apposed to checking each card. Which of course, I'd need it to check each card.

  • Tagged:

  • Or use "Set vector X". For example, if the enemy is to the left from the player:

    Enemy Set Vector X to -100

    But it's 8 direction, so I can't just do to left of player or something, like they come at the player from all directions.

  • I.e. if I wanted to make 8 variables a random number between 1 and 30 but I cannot allow them to be the same number.

  • Are they local variables in the screenshot? Also of course they work.

    No like blatantly do not work, you can't change a boolian if it's a local variable. And even after changing that I had other issues until I also changed other things into global variables

  • So today I learned that local variables... don't function. No seriously, most of the time they just don't work, literally every problem I had was fixed by changing all of them into global variables.

  • ...me suddenly realizing that it being local as apposed to global may be my issue...

  • If you are going to write events like this it's good to get used to debugging and logging. Add the Browser object to log the output and see if it's as expected.

    I normally would use the debug menu... but I can't view local variables in the debug menu.

  • Hi Cameron, This may or may not work but looking at the top of your events I see you have on anim end OR is respin > Set ROdds and Set Respin to False. What might be happening is Construct is seeing this as if Respin is True set it to False right away which will make it always False. Try to add a wait 0.1 seconds right above your Set Respin to False. This should allow the ROdds event to happen before it sets Respin back to False. I am no expert by any means just scrolling through the forums trying to help.

    This did not work, also even if it did I'd be scared of it having the chance of spawning multiple things.

  • No seriously, what am I doing wrong, I feel like this should work to make it all loop until it finds a result but it's simply just not, it's just playing through once and Respin never becomes true.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post