Plant vs Zombies

Get help using Construct 2

Post » Fri May 08, 2015 6:03 am

Hi guys, do you have or link to a tutorial for basics on PvZ kind of game. I mean, i already have an idea but im not sure about it. I think it uses array linked to a tile map but on how to bind that one so that you can drag and drop objects and also do you have any link that shows how to spawn random enemy on specific area because the one that i have created, after you killed the enemy using C2's destroy, the enemy will not spawn even the player goes out on a layout which eventually restarts the game but not the enemy.

Any help will be much appreciated.

Thanks...
B
4
Posts: 19
Reputation: 238

Post » Fri May 08, 2015 7:42 am

you have much to learn young one.

1 st - use sprites to create fields
2nd - since you want pvz game i assume your enemies walk a straight line, put a sprite on that field and check it's X and Y. spawn enemies on that X and Y, if you have more then 1 line, then random Y between 2-3-4-5 Ys (depending how many lines you got)
3rd - you will have to do some logic of hp / stuff and more.
4th - when you destroy last instance you removed that asset from layout, that's why it's prefered to put one instance outside layout (just drag and drop it outside layout (zoom out first) )
5th - make some global vars where you calc your hp/points/whatever and use them for your game

i can't help you much more because you didn't provide anything specific to solve, but you will get the just of it by working. a lot of working.
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
41
S
14
G
12
Posts: 623
Reputation: 9,359

Post » Fri May 08, 2015 8:23 am

Thanks for the help. What would be the best practice on removing an Object (enemy) when it reached 0 hp because C2's destroy wont cut it.
B
4
Posts: 19
Reputation: 238

Post » Fri May 08, 2015 8:29 am

C2's destroy should work just fine if implemented in the right way..
There must be some settings and/or events that produce the unwanted effect..

I can only guess, because I haven't seen your events and or game, but maybe enemy HP is a global variable and you are not resetting the variable when restarting layout?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Post » Thu May 14, 2015 1:18 pm

@Lordshiva1948
Thank you very much.
B
4
Posts: 19
Reputation: 238

Post » Fri May 15, 2015 7:56 am

Most welcome ravenchrono
B
245
S
37
G
15
Posts: 1,941
Reputation: 40,096


Return to How do I....?

Who is online

Users browsing this forum: SturmIV and 8 guests