Turn based RPG's with Construct 2

Just started using Construct 2? Post your questions here

Post » Thu May 01, 2014 4:23 pm

Hey I'm still fairly new with this tool, and I've ALWAYS wanted to make a turned based RPG a la the Adventure Construction Set (for those of us who can remember when EA Games was still called Electronic Arts).

Anyway what I would like to know how to do is how do structure the event sheet so that everything happens in a turn based format and how do I determine how long each characters' turn is? Also how do I set up a system for leveling up or skill development? Lastly how do I set up the game so that the Player can move from one layout to another and back?
Posts: 3
Reputation: 206

Post » Thu May 01, 2014 4:30 pm

Differentiating player turns can be easily done with one global variable. Same for turn duration.
Leveling/skill system depends on what you want to do - can be very basic or very advanced and complicated
Movement of player between layout is pretty similar to skill system - It's all about what you want to achieve.
What you are asking can be made in many different ways. You need to ask yourself what you specifically want to do and then ask specific questions.
Posts: 2,611
Reputation: 36,844

Post » Sat May 03, 2014 9:04 am

I recommend using a state machine, which is just a fancy way of saying you have a variable that keeps track of the game state.

My open source board game project has an example of this, but if you want to create it yourself just make a variable called 'GameState' and have this variable hold a string.

Then in your events, have stuff like

If GameState = 'PlayerStart' then [start of game actions]. The last start of game action should be setting GameState to something else, like 'PlayerTurn', and then if GameState = 'PlayerTurn' you should have a set of actions for that.
Project Lead of Zems Online Card Game

Producer at Impulse Limited
Posts: 677
Reputation: 5,234

Post » Sat May 03, 2014 12:37 pm

Just to reinforce the ideas above, because that's the way I would do it, would be to have a flag variable trigger back and fourth. I do this very commonly in my experiments. Traditionally, I would use a bool (true/false variable) but Construct doesn't allow global bools. Instead, just set a variable to 0. When you need to trigger it to true, set it to 1.

For instance,
if flagVariable = 1
Players turn with instructions
at end of player turn, switch variable to 0
if flagVariable = 0
enemies turn with instructions
at end of turn, switch flag variable

You can also add in a time element to the mix, like only allow the player to move if so much time has passed.

if flagVariable = 0 && timePassed = 30 (seconds used as an example here but that can change to your needs)

It's pretty easy. I would recommend prototyping out that specific instance of the game and play with it. Try and muddle with things and when you get stuck, come back here and ask some questions. Always be prepared to give examples or code snippets of your logic to.
Come visit and play Blast Box!
Posts: 205
Reputation: 1,349

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests