Creating a nest.

For questions about using Classic.

Post » Fri May 20, 2011 2:37 am

I want to create a sort of nest in a game I am making that creates an enemy if there's not an enemy already created from a particular nest. I have pretty much no clue how to go about this. Anybody have any ideas?
B
3
G
1
Posts: 33
Reputation: 566

Post » Fri May 20, 2011 4:14 am

Give the nest a private variable, if variable = 0, then create an enemy from it and add 1 to variable.
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Fri May 20, 2011 2:58 pm

Thanks alspal. Another thing is how do I tell it to add a new enemy when I kill the enemy it spawned the first time etc?
B
3
G
1
Posts: 33
Reputation: 566

Post » Fri May 20, 2011 3:03 pm

When an enemy from a particular nest is killed, you can subtract 1 from the nest it spawned from so it goes back to 0 and spawns again--

in order to effectively do this though, you will have to learn about picking!
B
5
S
1
G
2
Posts: 99
Reputation: 1,575

Post » Fri May 20, 2011 5:05 pm

Thanks aldo for [quote:3kkhhfki]in order to effectively do this though, you will have to learn about picking![/quote:3kkhhfki]. Do you know how I would go about doing this? I'm fairly new to construct.
B
3
G
1
Posts: 33
Reputation: 566

Post » Fri May 20, 2011 6:43 pm

You can pick an object by creating a condition for picking an object--

http://sourceforge.net/apps/mediawiki/c ... ct_picking
B
5
S
1
G
2
Posts: 99
Reputation: 1,575

Post » Fri May 20, 2011 7:48 pm

I made a tutorial-like blog post providing an example on how to create such "nests":

We Construct Blog - Forum rescue #003: Respawn an enemy

Hope that is helpful! :)
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Fri May 20, 2011 7:59 pm

^ what he said
B
11
S
3
G
4
Posts: 622
Reputation: 3,186

Post » Fri May 20, 2011 9:44 pm

Thanks that should do the trick. :D
B
3
G
1
Posts: 33
Reputation: 566


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests