random spawns of a sprite into a another sprite

Get help using Construct 2

Post » Fri Jul 06, 2012 4:28 pm

thanks alot, your a genius, i shall beaver away at this till i get it (and hopefully get the hang on it as well )right
B
16
S
4
G
4
Posts: 179
Reputation: 4,688

Post » Fri Jul 06, 2012 5:20 pm

could you do a capx of that?, running into some difficulty

https://dl.dropbox.com/u/84483952/phantasy%20star%20style%20part%20%281%29.capx

i didnt know if the global variables were numbers or ...
B
16
S
4
G
4
Posts: 179
Reputation: 4,688

Post » Fri Jul 06, 2012 6:05 pm

Sure, here you go:
railslaves_game.capx (r98)
Edit: Link removed to avoid confusion, reposted belowNimtrix2012-07-08 22:24:25
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sat Jul 07, 2012 5:45 pm

ok sprite 1 (for example) spawns at a certain rate ....but when you touch sprite 2 you "level up" and that changes the rate at which sprite 1 one spawns (slower rate ).... how could i do this ...?
B
16
S
4
G
4
Posts: 179
Reputation: 4,688

Post » Sun Jul 08, 2012 1:31 pm

If you set your sprite to spawn every second, you can just multiply that with the level. For example Every (1 * Level) seconds. Here's a quick example to illustrate:

DecreasingSpawntime.capx (r98)Nimtrix2012-07-08 13:32:13
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sun Jul 08, 2012 3:57 pm

thanks again, that is great, i did work out a rather cruder way of doing it ... but great to see it so simple in a few lines, awesome seems to all be about the *

i have another big problem ... in a new game mechanic you have to collect things (office workers !?)...but after you go into the random events (speedruns) the things you have collected reappear :P even though i have set them to destroy upon collection heres a capx...

https://dl.dropbox.com/u/84483952/try%20this%20one%20game%20demo.capx

oh space is now the button to get out the run sections


appriciate all the help , learning from all this railslave2012-07-08 21:41:01
B
16
S
4
G
4
Posts: 179
Reputation: 4,688

Post » Sun Jul 08, 2012 4:53 pm

The link is a dead end, maybe you moved the .capx? Please double-check/reupload and I'll have a look when it's sorted.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sun Jul 08, 2012 8:57 pm

ok this should work


https://dl.dropbox.com/u/84483952/try%20this%20one%20game%20demo.capx


thanks again :) just need to game to remember how many of "the glitched" have been captured. Youl see :p
B
16
S
4
G
4
Posts: 179
Reputation: 4,688

Post » Sun Jul 08, 2012 10:08 pm

When you return to the first layout, all non-global objects you have placed in that layout are respawned. What you could do is make a global sprite that spawns your officeworkers, and use an instance boolean to check if the officeworker has already been picked. Then, on start of layout, spawn an officeworker on every spawner sprite with the boolean set to "false".

Edited .capx: railslaves_game.capx (r98)

(PS: I moved some overlay sprites to a different layer to get them out of the way and deleted some files to reduce the .capx file size. I would also suggest using groups and comments to make your project easier to navigate through. For yourself and others.)Nimtrix2012-07-08 22:10:18
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Previous

Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], DiabloOvermind, emoticon, MrWhizm and 14 guests