mikewalton206's Recent Forum Activity

  • What do you mean by "spawn an object from this"? From what, from the array?

    Also, you are adding each value into the array twice - one at the start of the array and one at the end.

    Run your game in Debug Mode, select your array and you'll see.

    yes you are correct! I checked and it did get added twice. For the next part... I have for example an animation with 20 frames and each of those frames are on my layout 1-20 what I want to do is when I for example double click on frame 2... that frame 2 image gets added to the Array, I double click on frame 5 and the frame 5 image gets added to the array and so on till I have added 10 of the 20 frames to the Array. Then I wanna be able to randomly create those 10 added frames onto the layout.

    I didn't know if it would be better to do this way with image frames or just use 20 actual objects and not an animation. I'm sure if I do the animation way I will need a variable to reference each animation frame. I hope this makes sense so in short... I want to add whatever objects/animation frames I double click on, to the Array and then and then for example I click drop... those objects/animation frames are created randomly one by one on the layout till all 10 are gone from the Array.

  • ok so I been messing around with Array's and I believe I got the process down on how to populate it but I just wanna double check and see if this is correct? Then after successful populate... how do I randomly spawn an object from this? From how it looks now... i'm thinking I might have done the populate process wrong because I don't see how to spawn an object from this. Thanks everyone for any help on this problem.

  • You might be right that its actually 3d objects used in the game, just made to look more like a movie, which might actually be the most likely thing. Since loading large video files would take some time regardless of you using unreal or C2. However what you might be able to do is to load all needed video files for a battle before it starts and then you would just have to press play on the correct ones when needed. That might work but you should probably keep a close eye on memory use if you load a lot. But it might work.

    Yeah ?????? I'll have to look more into this when I get deeper into this project, thanks.

  • My initial thought is that it would be rather easy to do actually, at least programming wise. I guess the biggest problem might be with the cut scenes and whether C2 can load them fast enough for it to actually work. But you could easily test that. If you have a lot of video clips in varies sizes that represent what you think you might need. Then you could try to play them back as fast as possible and see if it works for you. Simply make it so each time you press Space it load and play a cut scene or something like that.

    But then again I might have misunderstood what you want to do

    haha no you are spot on! yeah that's what I was thinking too. I don't know if it can handle the video clips. well long ones anyways. Also I was thinking that it might not be video that's playing in the Naruto games. Just maybe super good 2d/3d sprites so who really knows the secret lol I tested a small video clip and it kinda worked but something larger didn't play. It made me think either C2 can't handle the larger videos or its not videos and just high quality sprites/backgrounds

  • Hey guys, first of all can construct 2 even handle what I wanna do lol you guys know how in the naruto games you can do

    those cool ass cutscene battles and have to do player inputs... like press the right arrow, then the X button, Right arrow, rapidly tap A... i put a video to show what I'm talking about. Is this even possible or just something that can only be done With unreal engine? This would be really cool to do 😀 if anyone knows how this could be done... the ideas would be greatly appreciated!

    https://youtu.be/gJDsY7Qu5nw

  • So basically take a random item from the inventory and drop it on the ground? You shouldn't have used the word "spawn", it usually means creating something new

    Anyway, here is the code:

    thanks! I'll test this out

  • So you want to spawn a copy of one of the items from the inventory?

    And what do you mean by "no duplicates"? Once one item is spawned, it can't be spawned again?

    Here is one way to do this:

    https://imgur.com/a/okN1n

    yes and no... I want to basically randomly drop one of the items from my inventory not make a copy onto the layout. lets say I pick up these... 4 blue items, two red items and 1green item. I right click and a red item drops someplace on the layout like the middle of the screen. now there's only 1 red item left. if I right click again... maybe this time a blue item drops and now there's only 3 blue items left. I right click again and this time I get another red item. now there's no more red items left in my inventory so all that I can randomly spawn now is 3 blue and 1 green item. The 2 red items are on the layout now. so basically there has to be something actually in my inventory for this to work so if my character doesn't pick up anything... no items can get randomly dropped.

  • Hey mikewalton206,

    with 'spawn item from inventory' you mean you want to drop an item from the inventory?

    I made an example (had to made it with C3, so please use it to open the file):

    c3p: https://1drv.ms/u/s!Ap_-qxoGKbDcd_xKj0E4FkdnXVI

    Do not be surprised, I had to make some changes to make it work. If it does not fit into your game concept, please let me know.

    Well yes and no... I want to spawn the actual inventory item onto the game level. Not just drop the item and not have it appear anyplace. I'm using this idea to actually do something else so I just need to be able to spawn the inventory items at random with no duplicates an then I can go from there and place the actual item where I want on the layout so basically like every X seconds I want to spawn at random one of the items from my inventory and place it for example on the middle of the layout.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • hi everyone, so i'm trying to spawn random items from what's in my inventory without any duplicates. I'm working with this capx but I will most likely have more slots... like 30. Is this something that can be done? any help would be great! Thanks

    https://www.dropbox.com/s/vl30jbms1ucpf ... .capx?dl=0

  • Bump. Does anyone know how? Or is there an alternative?

    See if this works...

    https://youtu.be/0ctfhDWY5S0

  • Ok, I put the game by default step by step in the site, but I cannot test;

    When I play, the game appears just a blank page

    link: https://www.scirra.com/arcade/other-games/cube-25888

    Hmm... 🤔 that's strange because I'm using my phone and the game starts up. I haven't released a game yet so I can't help trouble shoot this but I can at least tell you that the game is working.

    What I'm doing wrong?

    Thanks guys

  • We would have to see how you got it set up in order to help with this.

mikewalton206's avatar

mikewalton206

Member since 24 Mar, 2015

Twitter
mikewalton206 has 2 followers

Connect with mikewalton206

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies