Spawn Random Objects :)

Get help using Construct 2

Post » Sat Feb 04, 2012 1:19 am

Hello guys!

I have a little problem, (don't know how to figure this out in guild wars)
.
I have 4 rows with 10 objects on each row = 40 objects ^^'
The objects on the rows should spawn randomly on these specific "row-places"

Now... If a certain requirement is completed, row 2,3 and 4 should move one up and row 4 should spawn new objects...

Any Idea how you can save row 2,3, and 4 with the random objects and transport them up? o_o'Black2key2012-02-04 12:05:56
B
18
S
4
G
5
Posts: 27
Reputation: 4,132

Post » Sat Feb 04, 2012 2:06 am

Save the value of the object spawned on them in an array.

Also it could be good to post a capx to see how you implemented things so far and see what can be done.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Sat Feb 04, 2012 2:27 am

[It is the 44mb capx from before~ ;/]
I'll try and make that file smaller tomorrow (currently 3:30am and the spawning doesnt look quite right, but thanks for the answer!)

Thanks in advance
Black2key
B
18
S
4
G
5
Posts: 27
Reputation: 4,132

Post » Sat Feb 04, 2012 1:00 pm

I am here again :]
Got it to around 5mb, the Problem is still there (cant get my hand around it, tried it a few times and gave up :/ )~
Klick it!
Explanation: The important part here is the e-game layout and the e-game code!
The layout is self-explanatory: you have to press the keys according to the random spawner (I dont have.)
[The Arrow-Images are in Object types-->Game->Arrows]
[Arrow = not active and brown, still have to be pressed]
[Arrowon = active and blue, you should press that arrow]
[Arrowoff = already pressed, greyed out]
*When you complete a row,the arrows from the second row should move upwards, and the active [Arrowon] should be on the first position again
*Every correctly pressed arrow should save an amout of points to a global variable, also every wrongly pressed arrow to it's own global variable. I will show these at the end, but I can do that myself, it is just the hard part with the arrows I am stuck with :)
[But the active arrowobjects should only go on if they pressed the right arrow.]

Thanks in advance.
Black2key

The first layout is Hauptmen if ya want to see everything else [not that much]~
PS: The second, third and fourth row should have the exact same amout of arrows as the first one = 8~
PPS: The arrows have a 44x44 layout and the layout has a 10x10px lock [First arrow is at 330,80]
PPPS: Hopefully I did not overthrow you with questions.
PPPPS: Hopefully you can kind of understand with what I want to achieve.
PPPPPS: The only active layer in the layout is Arrow
PPPPPPS: Sorry for my terrible english, [not my native language~]
Black2key2012-02-04 13:04:26
B
18
S
4
G
5
Posts: 27
Reputation: 4,132

Post » Sat Feb 04, 2012 2:00 pm

I have a new Version: Made the 4 arrows as an animation (ArrowSprite Folder)
Frame1: normal
Frame2: active
Frame3: passed
And I made a family with the 4 obects (Arrowfam).
Klicky

Again, Thanks in advance
Black2key.


EDIT: (3h later...)
Tried to
[on start of layout]
       [Create Arrowfam Object on layer 3 at 330,80]
       [set animation frame to int8random(0,Arrowfam.AniFrameCount))]
To get a random Arrow: but the problem is: I want to start every arrow on every row on frame 0, the passive frame ;/
[Deleted everything again... back 2 basics...]
Black2key2012-02-04 15:50:06
B
18
S
4
G
5
Posts: 27
Reputation: 4,132

Post » Sun Feb 05, 2012 2:25 am

Sorry for 4x post, but has anyone found the answer or a way how I could solve the problem?
I have to complete this project in like 2-3 days, and it would be stupid if I fail to make this game work.
[I know how to do it in my mind, but can't find a solution on how to make that happen in Construct2, as this is my first game in this wonderful program~]

Again, Thanks in advance
Black2key
B
18
S
4
G
5
Posts: 27
Reputation: 4,132

Post » Sun Feb 05, 2012 7:08 am

When I click to try to download the "new Version: Made the 4 arrows" I end up on a mediafire page that ask me to upload files

Could you please try to use dropbox, it's really nicer for the people downloading your projects.

EDIT: I managed in downloading the 5.8 previous version (2-3 posts above), ignored a nasty error on opening of the capx and...
Well I still don't get what you're trying to do.

Arrows images are supposed to change shape/color or something ?

I don't get at all what you are trying to achieve (as in what is the goal of the game, what are the game mechanics, where are you stuck ? You told something like "arrows should do this/I haven't implemented it yet". You should first implement it then, it would be easier to move one/build on from there)
Sorry, the project looks good, but I don't know how to help you so far.Kyatric2012-02-05 07:20:17
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Sun Feb 05, 2012 2:01 pm

Haha thanks, I'll try and get to a point where anyone can understand what I want to do!
[It is a quite simple project, but I guess I did not explain it enough!] :)

Thanks for the help!
Black2key
B
18
S
4
G
5
Posts: 27
Reputation: 4,132

Post » Sun Feb 05, 2012 4:27 pm

Goal of the key: press as many arrow keys as possible.
[Quite simple game, I know. ;)]

I am stuck @ the random generization of the keys and saving them in rows which move up when you complete a row.
Also, you should see the arrows beforehand (Right now you can just see down arrows~)


Edit:
Kay. Did it! :)
Dropbox link
Made the concept and fixed the Error, plsease download and look at it~
It blocks at the 3-8th key, have yet to find a sloution but its just there to grasp the concept I intended to show. ;)
---
Now, there should be 4 rows like that, and when you finish the first line, you should start @ the first row again. (with new keys from the second row.)



Thanks for the help
Black2key
Black2key2012-02-05 16:35:53
B
18
S
4
G
5
Posts: 27
Reputation: 4,132

Post » Sun Feb 05, 2012 6:45 pm

here is how you properly do things
arrowGame.capx
Last edited by Yann on Sun Sep 14, 2014 9:42 pm, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Next

Return to How do I....?

Who is online

Users browsing this forum: Braus, Draconinho, luisgmolina, Magistross, nedzad, nimos100, R0J0hound and 34 guests