Jump to content

Advanced Event tutorial - Various event system


Gibier

Recommended Posts

First be sure to know the text variables for the event editor, they will be really usefull, we will probably use them to create each event of the tutorial.

 

 

I'll add some tutorial to create more very flexibles events. 

 

Event on map (information)

Spoiler

If you create an event on a map and this event make your character get out of the map the event will still running. No need to create another event to continue the same event.

 

How to create a flexible MOTD system (easy)

Spoiler

What you will need to do this event: a player variable, a lot of conditional branch, an event that run at the player connection, event text variable.

 

Optional: You could insert an event to explain the game, gameplay, story that only run once after the character has be created.

 

1. You will need to create a player variable. Let's name it nbConnection. This will be use to change what the chat will display in chat when a player login in the game.

 

2. Now you will need to create the event, let's call it MOTD and select the Login trigger.

 

3. Create the conditional branch ( variable nbConnection = 0)

 

4. If it's true show a message on the global chat

You can show what you want. Maybe a short starter guide ?? Which explain the gameplay, story or other things.

 

5. If it's false add a new conditional branch (if player is an administrator)

 

6. Let's fill the main core of the event, put a message on the global chat: "The administrator \pn has started the game."

 

7. Else if the acces of the player is administrator or moderator then show: "The moderator \pn has started the game."

 

8. Else if the player variable nbConnection is egal or supperior than 100 (put the wanted number) put a message on the global chat: "\pn, an old player, has started the game."

 

9. Else if the player variable nbConnection is egal or supperior than 75 (put the wanted number) put a message on the global chat: "\pn, a good player of the community, has started the game."

 

10. Put many condition for the nbConection variable as you want. but the last should be supperior or egal than 1

 

11.  Choose the variable of the player: choose to add 1 and don't the define option, select the nbConnection (outside of all the conditionnal branch)

 

12. put a message on the global chat: "\onlinecount player(s) are currently online. "

 

Explanation: If it's the first time the player is joining the game he could have the choice to see a short explanation of the game.  Each time the player is joining the game his variable nbConnection will increase of 1. If the player  has already played the game 50 time the game will not showing the same message than a new player and will display a special message if the player is an administror or moderator..

 

How to create a housing system (easy)

Spoiler

What you will need to do this event: a player variable, same number of global switch than the number of house, some event on maps to acces to the house.

 

1) You will need to create some player switchs. Let's name them "ownerOfHouse 1, 2, 3, 4....". This will be use to know if the player bought the house.

 

1b) Create some other player switch "House x - Slot x"


Picture:

Spoiler

073e3380302442cac0462b25d6438687.png

 

(Propriétaire Maison 1 - District Est)

 

2) Recreate the same switch of 1b) but with global switches.

 

Picture:

Spoiler

c4429d38b84557e310b67ded6c01e5f8.png

 

3) Now find a place on a map to put your first house and go in the event menu of the maps editor.

 

Picture:

Spoiler

5fd7036495d2ff80ff2160c2483e21f6.png

 

4) Create a second event page, the first will be use to show the mask level of the house, the second will be to buy the house. Yes if the player buy the house he will see only the half of the house.

 

Picture:

Spoiler

09068e66167b1935d069b7441daf1949.png

 

5) double click on the preview square of the entity option.

 

Picture:

Spoiler

af160588ae7885d9736ebe2a4a36fc32.png

 

6) Select the tileset option and choice your tileset

 

Picture:

Spoiler

First event page:

2b1b20270713f2cb8e6bfed486e6158a.png

 

For the first page choice any tileset that you wish.

 

7) choose the page condition (ownerOfHouse 1, 2, 3, 4....)

 

Picture:

Spoiler

second page:

5b49aa662dbc05f05d2204158d662ceb.png

 

first page:

61744e5befc30c1fefa487b96b437bca.png

 

8. create another maps event to show the other part of the house, put the same condition as the second page of the other event. and select the other part of the house. (dobt forget to set it on a fringe level.

 

Picture:

Spoiler

f08a3dc6acf13f4b8465ab6d54d9d130.png

 

The buying page will seems like it: 

94c795104f1d243f083b40909d922120.png

 

The system IG will be like:

Spoiler

first page:

f2e62580b520c8cf448f39e0c127fc69.png

 

second page:

19b51f3796de0258950b668cdbaff778.png

 

Screen of the difference between an owner and not owner:

2a043cd8301e9b8d2e494b196b6af3c5.png

 

Ps: don't forget to make empty blocked event around the house if the player see the house.

Explanation: If the player didn't buy the house the player will see a panel. If he bought it the house will be display with the blocker. Many player can buy the "same house" but it's limited to the number that you want.

 

How to create a chest system with random loot (easy)

Spoiler

What you will need to do this event: two player variable, the same number of player witch than the number of chest that you want, some event on map to display the chest.

 

1) You will need to create some player switchs. Let's name them "chest 1, 2, 3, 4....". This will be use to know which chest the player have opened.

 

2)You will need to create two player variables. The first 'loot number', the second 'chest number'.

 

3) Let's create the chest event: create an event named 'random loot chest' in the event editor with no trigger.

 

4) Start the event by adding a 'set player variable' select 'loot number' and select random (lower: 1, high: what you want (3 for me))

 

5) Put as many conditional branch inside each other as you want to have in your game. (if player variable 'Loot number' is egal to 1,2,3...)

 

6) Give the it a different item of each conditional branch.

 

7) Save the event and exit the event editor.

 

8 ) Create an event on map to display the chest on the maps. Create a second page. With an action button trigger.

 

9 a) The first page need to have a closed chest picture, have a condition 'chest X' set to false.

 

9 a) The second page need to have a opened chest picture, have a condition 'chest X' set to true.

 

10) Time to fill the first page: put a start common event: random loot chest then set the player's switch chest X to true

 

Picture:

Spoiler

6fc695b7a4546d24bf8d05111bef5740.png

 

Explanation: If the player have not opened the chest yet then the player will see a closed chest else he will see an opened chest.

 

How to create a gambling system (easy / medium)

Spoiler

1) You will need 3 player variable
842672a0b3c5296ad8f4c473860bf10e.png

 

 

2. Add the command 'Show option'

 

ba58b1e0a05757bdf66a53ddf13eaca6.png

 

 ce55d2bdc942b933fe76e24bba791cd5.png

 

3. Add labels to the showed section in the screen. They will make the system better (relooping). 

 

94e05d1229548b0c18cbbfce18222c18.png

 

4. Let's fill the first option. Add a 'Show text' command and write the wanted description message. Add a 'Go to Label ' to it and write the first label inside.

 

55ebee42fd7f5b50e1b24ef7b1c5196f.png

 

5. In the second option (Miser) add the command 'Input Variable'

 

e6c99f0be050bfd3a9e004cf0bd4e72a.png

 

6. Add a 'Has item' condition to verify if the player have enough money to gamble.

 

b9dc76f99ad438bb4a0ed44b14cbcf38.png

 

7. In the true section add a 'Input variable' with the choice possibility.

 

06027cdf1983885fd6515a07cee5ec76.png

 

8. If the variable meet the condition compare the 'choix' variable and the 'resultat' variable.

 

34647e51385447d9207ac35aac46fdb4.png

 

9. Add the label 'Choix' and 'Go To Label' with each possible errors messages.

 

4e2f241d89c0693b11bb3b76dbf894b2.png

 

ef969fa0a709be4d1426452e3dcb4fa0.png

 

10. If the choice and result are the same then double the 'Montant à miser's value and add the item 'Money' with the 'Montant à miser''s value. 

 

55ac041b79bdfce6c38821016e5dfb04.png

 

 

Preview video: https://www.ascensiongamedev.com/resources/filehost/b5d8e193bcbe64c172b4e5622d68d4ef.mp4

Link to comment
Share on other sites

I've finished the base of housing system. I fuck up the conditionnal part of the event, but it's still usable. I'm gonna fix it this week, each tutorial here are more basic version of my game's features. I'm not gonna put every feature, i'm just adding the feature that every game could use.

Link to comment
Share on other sites

The housing tutorial is pretty interesting but it may be easier to map the actual house and make the event a warp tile. You can use a switch to activate it if the player has purchased the house, or skip the switches entirely and check if the player has a key or an item on them to open it. The only benefit I see of being able to do it this way is that you can have the houses be instanced, but that may not suit everyone's needs. Still, it's a pretty cool and different approach. You could also maybe use a system like this later on to build houses if the event system gets a gettile/settile function. You may be able to do that now actually through common events.

 

I might play around with this later. It's sparked some ideas. Thank you!

Link to comment
Share on other sites

18 hours ago, Tiro said:

The housing tutorial is pretty interesting but it may be easier to map the actual house and make the event a warp tile. You can use a switch to activate it if the player has purchased the house, or skip the switches entirely and check if the player has a key or an item on them to open it. The only benefit I see of being able to do it this way is that you can have the houses be instanced, but that may not suit everyone's needs. Still, it's a pretty cool and different approach. You could also maybe use a system like this later on to build houses if the event system gets a gettile/settile function. You may be able to do that now actually through common events.

 

I might play around with this later. It's sparked some ideas. Thank you!

 

Yeah sure you can do that but i want to show some "complex" event. After all it's the main goal of the topic. Those event are basically made for my game first ^^

 

But i dont really like how this event work. I'll change it to only use player switch. Like this every player will be able to buy the "same" house.

 

So finally this event will be more complex.

 

 

Link to comment
Share on other sites

I think this is a solid tutorial, Gib. It is a complex matter to handle housing in Intersect, but it can be done. I have in development right now an "inn" system that will let you hold a room for a few hours before it kicks you out and is publicly available for rent and it was similar to yours. A real head scratcher I've not fully figured out, too. Basically, it goes something like this:

  • Create an 'Inn' map where rooms can be rented.
  • Within the map are 'room' events which show open/closed doors depending on global variables (Room1IsRented, etc). Default is to just display a door which you cannot enter. Second tab states that it displays a lit-up entryway which, on touch, warps player to room if it is rented.
  • Within the Inn map there is also an event-NPC who 'sells' the rooms. He sets the global variables as well as a player variable (IsRentingRoom1, etc).
  • Create the 'rented' room which kicks the player out and sets the global (Room1IsRented) to false after an hour.
  • I also set the 'rented' room to have a locked door system. This is a global variable triggered by an event within the rented room to show locked/unlocked status on the room event within the 'Inn' map. In other words, a curtain shows up on that room within the inn map, when the door is locked, telling players they cannot enter. Warp is also removed.

I don't mind telling you folks that bit about kicking the player and resetting switches after an hour is the most difficult task, presently. I have it set to wait in intervals of 30000ms to trigger kicking anyone out... for an hour :D I'm probably missing an easier way. ;)

Link to comment
Share on other sites

16 minutes ago, EVOLV said:

I think this is a solid tutorial, Gib. It is a complex matter to handle housing in Intersect, but it can be done. I have in development right now an "inn" system that will let you hold a room for a few hours before it kicks you out and is publicly available for rent and it was similar to yours. A real head scratcher I've not fully figured out, too. Basically, it goes something like this:

  • Create an 'Inn' map where rooms can be rented.
  • Within the map are 'room' events which show open/closed doors depending on global variables (Room1IsRented, etc). Default is to just display a door which you cannot enter. Second tab states that it displays a lit-up entryway which, on touch, warps player to room if it is rented.
  • Within the Inn map there is also an event-NPC who 'sells' the rooms. He sets the global variables as well as a player variable (IsRentingRoom1, etc).
  • Create the 'rented' room which kicks the player out and sets the global (Room1IsRented) to false after an hour.
  • I also set the 'rented' room to have a locked door system. This is a global variable triggered by an event within the rented room to show locked/unlocked status on the room event within the 'Inn' map. In other words, a curtain shows up on that room within the inn map, when the door is locked, telling players they cannot enter. Warp is also removed.

I don't mind telling you folks that bit about kicking the player and resetting switches after an hour is the most difficult task, presently. I have it set to wait in intervals of 30000ms to trigger kicking anyone out... for an hour :D I'm probably missing an easier way. ;)

 

I'm not at my home. But when i'm back i'll finish my housting system and will take a look on it after.

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...
On 11/19/2018 at 11:02 PM, Gibier said:

After almost a year I finally add another tutorial: How to create a chest system with random loot

A simpler way would be making one RandomChest variable and make it randomly change between the number of chests you have. Just instead of multiple switches. :P

Link to comment
Share on other sites

12 hours ago, Xeno Games said:

A simpler way would be making one RandomChest variable and make it randomly change between the number of chests you have. Just instead of multiple switches. :P

 

Sure but the switch are here to let the chest open so the player can't reloot the chest.

Link to comment
Share on other sites

  • 2 years later...
2 hours ago, Gibier said:

It's been age but I'm slowly going to add more system to this page. I've added a choice gambling system to it.

As a beginner in the Intersect engine, these tutorials are invaluable to me. I wanted to ask if you think it would be possible to create something similar to this (using event system):

"Marketplace"
380783c7f9ca0ea3554d1c92b4b8f5b0.png
For the system, I envision it to be more simplified compared to the image.
Here are the key functionalities:
- Players can buy and sell their items as well as offer services such as being a doctor or an armorer.
- Is it feasible to implement this without a UI? Perhaps utilizing chat options exclusively?


I just start to learn the engine, so I'm sorry if I say something silly.

Link to comment
Share on other sites

17 minutes ago, Manigold said:

As a beginner in the Intersect engine, these tutorials are invaluable to me. I wanted to ask if you think it would be possible to create something similar to this (using event system):

"Marketplace"
380783c7f9ca0ea3554d1c92b4b8f5b0.png
For the system, I envision it to be more simplified compared to the image.
Here are the key functionalities:
- Players can buy and sell their items as well as offer services such as being a doctor or an armorer.
- Is it feasible to implement this without a UI? Perhaps utilizing chat options exclusively?


I just start to learn the engine, so I'm sorry if I say something silly.



No there wouldn't be a way or at least something good/unbugged. This feature with or without UI should be make in the source code.

Link to comment
Share on other sites

16 minutes ago, Gibier said:



No there wouldn't be a way or at least something good/unbugged. This feature with or without UI should be make in the source code.

Well, at least I've crossed this item off my list.

 

I'm still in the early stages of learning the engine, but I've recently found out that we have an API available for us to work with. Perhaps I can utilize this to create something like a webpage. My intention is to minimize the amount of changes made to the source code, considering that we are still in the beta version. If I do this, I will definitely share it with the community.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...