How do I make an event system

Get help using Construct 2

Post » Wed Aug 24, 2016 9:29 am

Hello, I'd like to know if there is anyway to have something working like RPG maker where you set up a list of actions and execute one action at a time. I really can't find how to do that without having some hard time having to test each condition end. Sometimes, it's not even possible.
Image
B
34
S
6
G
2
Posts: 221
Reputation: 3,324

Post » Wed Aug 24, 2016 10:50 am

you need list for one character? and the action what is?

i am working for multi character control at the same time atm.. that you need is easy..

be more specific what you need exactly and i help you..
B
15
S
7
G
7
Posts: 201
Reputation: 5,277

Post » Wed Aug 24, 2016 11:03 am

skymen wrote:Hello, I'd like to know if there is anyway to have something working like RPG maker where you set up a list of actions and execute one action at a time. I really can't find how to do that without having some hard time having to test each condition end. Sometimes, it's not even possible.


I haven't tried RPG maker, so might misunderstand your question as they might call things different names.

But in C2 an event refers to something that contain actions and each event is it's own. So an event can have many conditions which determine whether the event run or not in the first place. Just as it can have many conditions, an event can also have many actions and these are the ones that actually do something, like moving units and so on.

Once the conditions of an event is met all actions are potentially executed in the order in which you add them, the reason I write potentially is because you can have sub conditions that can be used to only trigger certain actions.

Unless I have misunderstood you, what you want is to test specific events. Which you can do by simply adding a condition, such as when a certain key is press it should execute the actions in that event.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,828

Post » Wed Aug 24, 2016 11:22 am

Well, I'm not new to Construct, and it's my fault for assuming everyone would understand what I'm talking about.

What I mean by a "RPG Maker like event system" is a common feature in top down RPGs.

You can set multiple "events" that are represented by a box on your map. Each box contains some piece of code that can be run using a defined trigger: Automatic, parrallel process, Action Button, and collision.

For the moment, this is quite easy to set up on construct. What is harder tho, is how that piece of code is processed.

In RPG maker, you associate a list of actions to each event, and those actions are realised one at a time. Some are realized together, some need to pause the event processing and so on.

For exemple, if I need to make a cutscene containing two NPCs walking along and talking, all I'd have to do would be to set a move route to each NPC, have it loop (or, not, depending on what's wanted) and then add the "message" action and set the actual message as a parameter. This message actions are listed one after another, and the next message action is not processed if the previous one has not been ended (aka the enter have been pressed to terminate the current dialogue). However, the message actions do not prevent the NPCs from walking. So you have to set it so some action can restrain other actions from happening but not all of them.

I have a very blurry idea of how to do this using a 3D dictionnary, a list or an array. But it's very sketchy, and I'm not sure how to do it in a way so it's extensible.
Image
B
34
S
6
G
2
Posts: 221
Reputation: 3,324

Post » Wed Aug 24, 2016 11:44 am

In RPG maker where you would have something like (Player1)Move Right > Move Left > Text: Hello > (Player 2) Move Right > Move Left >Text : Hello. In C2, you can do the same because events run top to bottom. Processing events one at a time can be done by way of using functions, waiting for certain conditions to be met or with 'timers' and 'wait' commands.

In terms of the specific example of having NPCs walking and talking in a cutscene, I would set up destination points, when a player has walked to it, then run the next action, could be a change of movement or change in dialogue. It also depends on how you want the dialogue to update, if you want it so that the players cannot move until the dialogue has been dismissed then put in a condition Move unless Dialogue is on screen. If you want the dialogue updating as they walk and doesn't need to be dismissed then have it update when they hit certain destination points.
B
45
S
15
G
73
Posts: 2,021
Reputation: 43,424

Post » Wed Aug 24, 2016 10:55 pm

Yeah, I guess there are plenty of ways to do this. I'm still figuring this out. I'm not even sure if I want to do that on Construct anyways, and not just good old RPG Maker.
Image
B
34
S
6
G
2
Posts: 221
Reputation: 3,324


Return to How do I....?

Who is online

Users browsing this forum: alextro, Ryan Kocourek and 4 guests