Generate loot...

Get help using Construct 2

Post » Fri Mar 18, 2016 3:22 pm

How do I generate loot pick up for infinite running style game. I want them in a group of 5 as I'm running I can pick them up. Like Mario bro. But every now and the have one in the row that can hurt you.

I know there is probably as simple way and I'm just not thinking if out.

Thank you in advance.
Last edited by ALLMarkMade on Fri Mar 18, 2016 8:52 pm, edited 1 time in total.
Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

Image

ALLMarkMade Designs
B
41
S
20
G
6
Posts: 367
Reputation: 7,541

Post » Fri Mar 18, 2016 4:08 pm

Sorry, I have no clue about your problem.
"on hidden that can bur you"
you mean burn?

Do you have troubles to create 5 objects or randomly spawn a "bad" one in between?

  • System > On start of layout | system > load game from slot "brain"
  • System > On load failed | system > scroll to obj_Forum
B
17
S
8
G
5
Posts: 340
Reputation: 4,707

Post » Fri Mar 18, 2016 9:03 pm

@fm4fanAT - I am so sorry I was at work trying to post with my phone and the site is not very mobile friendly.

Here is a clip from my game. If you can see as he moves up and down I want coins to generate so he can move up and down to get them. It's an infinite scroller so I'm not sure how to implement that. But sometimes the row of coins mad have a bad cone in them so you would have to grab as many coins as you can and avoiding any pitfalls/obstacles that may come.


Image


Very sorry for my confusion thank you very much.
Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

Image

ALLMarkMade Designs
B
41
S
20
G
6
Posts: 367
Reputation: 7,541

Post » Sat Mar 19, 2016 1:08 am

It's a very simple task with spawn point outside the screen and some random or choose in the eventsheet
so choose which lane the object should spawn = choose (spawn1, spawn2, spawn3)
randomize e.g. time in between
randomize which object should spawn variable1 = random (0,1)
if varibale1 is greater then 0.9 then spawn bad stuff


there is a tutorial that should help you a lot https://youtu.be/9LDzIiHl97g?t=285 (here he starts using spawn points - but the whole tutorial is excelent)

  • System > On start of layout | system > load game from slot "brain"
  • System > On load failed | system > scroll to obj_Forum
B
17
S
8
G
5
Posts: 340
Reputation: 4,707

Post » Sat Mar 19, 2016 1:47 am

@fm4fanAT - Thank you so much I'm all over it... I just wanted pointed the right direction and you've done that thank you.
Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

Image

ALLMarkMade Designs
B
41
S
20
G
6
Posts: 367
Reputation: 7,541

Post » Sat Mar 19, 2016 3:38 pm

@fm4fanAT - You were so right! That is a great tut and I learned a lot. It was not quite what I wanted to do because he had so many things going on that I didn't need it was hard to follow and leave them out but I made it work. And there are so many elements in it that I will pull from for future set ups so again I wanted to thank you and it was your help that got me closer to what I'm trying to do.


Image


I'm having fun now :D Thanks
Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

Image

ALLMarkMade Designs
B
41
S
20
G
6
Posts: 367
Reputation: 7,541

Post » Sat Mar 19, 2016 7:34 pm

Looks like I spoke to soon... After getting deeper into the code and removing the things I did not need it started to get crazy and not working correctly. So I created my own based off the general idea of the video. Now I have one side randomly putting out the coins good loot and bad loot. But here's what I want to do. I just want 1 command that randomly chooses the loot type and randomly sends it to one of the spawn spots (The Yellow Blocks) and in groups of 3 or 5 something like that. Kind of like the other picture above.

Image


I guess I can do each spawn block separately and stagger the create time but that still won't let me generate them in groups. I hate asking for so much help but I appreciate it just the same.

Thanks
Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

Image

ALLMarkMade Designs
B
41
S
20
G
6
Posts: 367
Reputation: 7,541

Post » Sun Mar 20, 2016 10:19 pm

What about creating a bunch more of the sprite spawner but create function for each instance you want and have it For each X number of second random choose a number and then have it find the function name based on that number. So for example let say you have 6 sprite spawner and have it layout liek 3x3 grid.

and arrange the function to spawn coin at what ever spawner you want such as this three at top just spawner 1 2 3 and if you want a number to choose bottom three 4 5 6.

im sure you can use lots more but this way you can pretty much use function to spawn the thing and control what pattern of coin you want to use.
B
52
S
24
G
6
Posts: 391
Reputation: 7,855

Post » Sun Mar 20, 2016 10:49 pm

@Gearworkdragon

Yeah, I can do that, I guess I was trying to avoid all the extra work since from the video he was able to generate a code to do it but I could not get it to work with my set up. But I do understand what you're saying so it's the best option for my code set up.

Thank you very much.
Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

Image

ALLMarkMade Designs
B
41
S
20
G
6
Posts: 367
Reputation: 7,541

Post » Sun Mar 20, 2016 11:39 pm

maybe I did not understand properly...but

spawnLot.capx

Image

of course you can use just one sprite...and just change frame..
..frame0= Coin ;frame1=Hurt ;frame2=somethingElse...etc

Player on colision with Sprite
Sprite frame=0.....pick Coin
Sprite frame=1....hurt player
Sprite frame=2....do somethin else...etc
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests