Exp system problems.

For questions about using Classic.

Post » Mon Oct 18, 2010 8:34 pm

Hello all, I'm new to construct and programming. However I am trying to set up a exp system where at an exponential amount of kills will grant you one extra level, and in turn that receiving the extra level will grant either a set or exponential amount of life.
I hope I explained this okay, if anyone has any links for me to look at that would be very cool.
Thanks all for your time.
B
1
G
2
Posts: 8
Reputation: 641

Post » Mon Oct 18, 2010 9:54 pm

How far have you gotten?
B
3
G
3
Posts: 23
Reputation: 946

Post » Mon Oct 18, 2010 11:00 pm

Well, I have just figured it out, however now i am trying to break a condition. As of right now I have a monster generator, after 10 hits the generator is destroyed. However, the monsters are spawning form a different area of the map once destroyed. i have the condition set up like this

Every 7000 milliseconds- System create Monster on layer 1 at (gen x, and gen y).

I'm pretty new to this so how do I break the cycle once the Generator is destroyed?
B
1
G
2
Posts: 8
Reputation: 641

Post » Tue Oct 19, 2010 2:01 am

There are several ways to do this. One way would be to add a global variable and add the condition "global variable generator is equal to yes" to what you already have (probably the best way). Also, you would need to add the action "set global variable generator to no" to the event that destroys your generator. Another way you could do it would be with private variables instead of global variables (this would probably be used for multiple generators). However, the shortest and probably least complicated way(as in least steps) to do it would be to add the inverted condition "generator is inside layout" (you can invert a condition by right clicking on it and selecting "Invert Condition") to what you have(I'm guessing this is the worst since it would probably use more cpu.)

Good luck! 8)
B
2
G
2
Posts: 48
Reputation: 746

Post » Tue Oct 19, 2010 11:07 am

As RomanCenturion has suggested,

Every 7000 milliseconds
Generator: Is on-screen - System create Monster on layer 1 at (gen x, gen y)

or you could assign a private variable to the generator (we'll call it 'Alive')

Ever 7000 milliseconds
Generator: Value 'Alive' Equal to 1 - System create Monster on layer 1 at (gen x, gen y)
B
3
G
3
Posts: 23
Reputation: 946

Post » Tue Oct 19, 2010 4:23 pm

Thanks guys that was pretty cool
B
1
G
2
Posts: 8
Reputation: 641


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests