Jump to content
  • 0

Little complications.


Yuri

Question

Hi people!

Tile damage:

Made an event that deals damage to the player.  However, the damage only goes through once per collision.  Could you tell me if there is a way to make the event do damage constantly while the player is on over the event?

Warp:

The standard warp command immediately moves the player to the specified point without any (or minimal) delay.  It doesn't work for my game.  I need the player to be hidden and immobilized for a while, then he moves, then takes a few steps forward, after all this he becomes visible and controlled.  I tried to achieve this in various ways, but to no avail.  The player is either invisible, immobilized, or both.  Maybe I am doing something wrong or using commands in the wrong order.  Tell me how to achieve the result I need?

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 1
11 hours ago, Yuri said:

Yes that's right.

It would be easier if there was a check, such as: "Is the player on an event", but there is no such check in the editor. This is necessary for toxic swamps or lava.

It is not necessary. First I ask you to edit your topic, change its title to "Trap event system" "Tile damage event system" something like that. Because that way, whoever look this topic may be in need of the same help as you That way, making your topics "cleaner" will help others while being helped.

 

I'll show you some ways

 

Method 1

Spoiler

1 - Create a boolean variable, call it "tile damage" or something that reminds you of it.

9dea3a5cc804d9353514a4d826da6d16.png

2 - Create a common event with the same name of the var, and place it to reduce the player's hp by an amount x, then place it to wait for an amount of time(it is mandatory to place a command "wait" or you will kill the player constantly until the server closes.), and leave the event in autorun.
In the event conditions place "tile damage = true"

4828ae341d70f4a5a15a8644c96f41b4.png

3 - Create events at the edge of the area that turns OFF the variable. (Events must be on the layer below the player, with the "passable" box checked, and the "player touch" activator)

f42d71d0d925a4d11b71d26586f0507f.png

5da1e486cae998fb1fe4ac617782bb4c.png

4 - Create events at the edge inside of the area that turns ON the variable. (Events must be on the layer below the player, with the "passable" box checked, and the "player touch" activator)

e3ecdbe3991cba58f9cc4c87d77e725e.png

c1aad8b119f6cfc9714792faac6517e8.png

 

(ps: I forgot to tell you that you have to uncheck the box "hide name". Remember that haha, don't be alarmed by the video, isn't a bug)

5 - save the map and result: As long as it stays inside the area, it will take damage.

https://www.ascensiongamedev.com/resources/filehost/a76d0b51a89ff5acddb02245bb2288a2.mkv

 

6 - Don't forget to create 2 common events.
An event that activates "on respawn", and another event "on login", both must have the command to turn off the variable!

If the player dies and returns to life he will continue to take damage until the variable is turned off, the same goes if he leaves the game and comes back again.

 

The same goes if you have an event item, event spell, that teleports the player.

 

ps: do not do this in giant areas, many events can make the map heavy and difficult to be a player with a high drop in fps.

 

Method 2

Spoiler

This method is if each area does different damage.
1 - Instead of the variable being boolean, it will be int

 

2 - In each area you will define the value. If the events are on the lava side, you set to 1. If the events are on the acid side, you set to 2. If the events are on the swamp side, you set to 3. And so on ... E to turn it off, just set it to 0.

 

3 - In the common event that causes the damage, you will create conditional branches by checking the value of the variable. If it is 1, it causes damage x and expects x (ms). If it is 2, it causes damage y and waits for y (ms). If it is 1, it causes z damage and waits for z (ms). And so on.

 

4 - Don't forget the player's login and respawn just set it to 0.

 

It should therefore be sufficient to cause constant damage to areas using the events.

Link to comment
Share on other sites

  • 0
1 hour ago, Weylon Santana said:

If I understand correctly, do you want the player to continue taking damage as long as he is above of the event? When left above he stop taking damage?
I even know how, but I need to know if I understand correctly.

Yes that's right.

It would be easier if there was a check, such as: "Is the player on an event", but there is no such check in the editor. This is necessary for toxic swamps or lava.

Link to comment
Share on other sites

  • 0
3 hours ago, Weylon Santana said:

Method 1

  Reveal hidden contents

1 - Create a boolean variable, call it "tile damage" or something that reminds you of it.

9dea3a5cc804d9353514a4d826da6d16.png

2 - Create a common event with the same name of the var, and place it to reduce the player's hp by an amount x, then place it to wait for an amount of time(it is mandatory to place a command "wait" or you will kill the player constantly until the server closes.), and leave the event in autorun.
In the event conditions place "tile damage = true"

4828ae341d70f4a5a15a8644c96f41b4.png

3 - Create events at the edge of the area that turns OFF the variable. (Events must be on the layer below the player, with the "passable" box checked, and the "player touch" activator)

f42d71d0d925a4d11b71d26586f0507f.png

5da1e486cae998fb1fe4ac617782bb4c.png

4 - Create events at the edge inside of the area that turns ON the variable. (Events must be on the layer below the player, with the "passable" box checked, and the "player touch" activator)

e3ecdbe3991cba58f9cc4c87d77e725e.png

c1aad8b119f6cfc9714792faac6517e8.png

 

(ps: I forgot to tell you that you have to uncheck the box "hide name". Remember that haha, don't be alarmed by the video, isn't a bug)

5 - save the map and result: As long as it stays inside the area, it will take damage.

https://www.ascensiongamedev.com/resources/filehost/a76d0b51a89ff5acddb02245bb2288a2.mkv

 

6 - Don't forget to create 2 common events.
An event that activates "on respawn", and another event "on login", both must have the command to turn off the variable!

If the player dies and returns to life he will continue to take damage until the variable is turned off, the same goes if he leaves the game and comes back again.

 

The same goes if you have an event item, event spell, that teleports the player.

 

ps: do not do this in giant areas, many events can make the map heavy and difficult to be a player with a high drop in fps.

 

In step 4 of this method (which is very well elaborated) I would create a condition to verify that the variable is false before starting to assign it true indefinitely, it is just a suggestion not to consume so many resources when assigning the variable while you are in that area unnecessarily.

Link to comment
Share on other sites

  • 0
3 hours ago, Blinkuz said:

In step 4 of this method (which is very well elaborated) I would create a condition to verify that the variable is false before starting to assign it true indefinitely, it is just a suggestion not to consume so many resources when assigning the variable while you are in that area unnecessarily.

A good placement and a good addition as well.  I fully agree.

Link to comment
Share on other sites

  • 0
10 hours ago, Blinkuz said:

In step 4 of this method (which is very well elaborated) I would create a condition to verify that the variable is false before starting to assign it true indefinitely, it is just a suggestion not to consume so many resources when assigning the variable while you are in that area unnecessarily.

Thanks for the tip!

I was supposed to do something similar, but I was not sure how.

 

Link to comment
Share on other sites

  • 0
16 hours ago, Weylon Santana said:

It is not necessary. First I ask you to edit your topic, change its title to "Trap event system" "Tile damage event system" something like that. Because that way, whoever look this topic may be in need of the same help as you That way, making your topics "cleaner" will help others while being helped.

 

I'll show you some ways

 

Method 1

  Hide contents

1 - Create a boolean variable, call it "tile damage" or something that reminds you of it.

9dea3a5cc804d9353514a4d826da6d16.png

2 - Create a common event with the same name of the var, and place it to reduce the player's hp by an amount x, then place it to wait for an amount of time(it is mandatory to place a command "wait" or you will kill the player constantly until the server closes.), and leave the event in autorun.
In the event conditions place "tile damage = true"

4828ae341d70f4a5a15a8644c96f41b4.png

3 - Create events at the edge of the area that turns OFF the variable. (Events must be on the layer below the player, with the "passable" box checked, and the "player touch" activator)

f42d71d0d925a4d11b71d26586f0507f.png

5da1e486cae998fb1fe4ac617782bb4c.png

4 - Create events at the edge inside of the area that turns ON the variable. (Events must be on the layer below the player, with the "passable" box checked, and the "player touch" activator)

e3ecdbe3991cba58f9cc4c87d77e725e.png

c1aad8b119f6cfc9714792faac6517e8.png

 

(ps: I forgot to tell you that you have to uncheck the box "hide name". Remember that haha, don't be alarmed by the video, isn't a bug)

5 - save the map and result: As long as it stays inside the area, it will take damage.

https://www.ascensiongamedev.com/resources/filehost/a76d0b51a89ff5acddb02245bb2288a2.mkv

 

6 - Don't forget to create 2 common events.
An event that activates "on respawn", and another event "on login", both must have the command to turn off the variable!

If the player dies and returns to life he will continue to take damage until the variable is turned off, the same goes if he leaves the game and comes back again.

 

The same goes if you have an event item, event spell, that teleports the player.

 

ps: do not do this in giant areas, many events can make the map heavy and difficult to be a player with a high drop in fps.

 

Method 2

  Hide contents

This method is if each area does different damage.
1 - Instead of the variable being boolean, it will be int

 

2 - In each area you will define the value. If the events are on the lava side, you set to 1. If the events are on the acid side, you set to 2. If the events are on the swamp side, you set to 3. And so on ... E to turn it off, just set it to 0.

 

3 - In the common event that causes the damage, you will create conditional branches by checking the value of the variable. If it is 1, it causes damage x and expects x (ms). If it is 2, it causes damage y and waits for y (ms). If it is 1, it causes z damage and waits for z (ms). And so on.

 

4 - Don't forget the player's login and respawn just set it to 0.

 

It should therefore be sufficient to cause constant damage to areas using the events.

Thanks a lot for the detailed explanation!

Link to comment
Share on other sites

  • 0
17 hours ago, Weylon Santana said:

It is not necessary. First I ask you to edit your topic, change its title to "Trap event system" "Tile damage event system" something like that. Because that way, whoever look this topic may be in need of the same help as you That way, making your topics "cleaner" will help others while being helped.

 

I'll show you some ways

 

Method 1

  Reveal hidden contents

1 - Create a boolean variable, call it "tile damage" or something that reminds you of it.

9dea3a5cc804d9353514a4d826da6d16.png

2 - Create a common event with the same name of the var, and place it to reduce the player's hp by an amount x, then place it to wait for an amount of time(it is mandatory to place a command "wait" or you will kill the player constantly until the server closes.), and leave the event in autorun.
In the event conditions place "tile damage = true"

4828ae341d70f4a5a15a8644c96f41b4.png

3 - Create events at the edge of the area that turns OFF the variable. (Events must be on the layer below the player, with the "passable" box checked, and the "player touch" activator)

f42d71d0d925a4d11b71d26586f0507f.png

5da1e486cae998fb1fe4ac617782bb4c.png

4 - Create events at the edge inside of the area that turns ON the variable. (Events must be on the layer below the player, with the "passable" box checked, and the "player touch" activator)

e3ecdbe3991cba58f9cc4c87d77e725e.png

c1aad8b119f6cfc9714792faac6517e8.png

 

(ps: I forgot to tell you that you have to uncheck the box "hide name". Remember that haha, don't be alarmed by the video, isn't a bug)

5 - save the map and result: As long as it stays inside the area, it will take damage.

https://www.ascensiongamedev.com/resources/filehost/a76d0b51a89ff5acddb02245bb2288a2.mkv

 

6 - Don't forget to create 2 common events.
An event that activates "on respawn", and another event "on login", both must have the command to turn off the variable!

If the player dies and returns to life he will continue to take damage until the variable is turned off, the same goes if he leaves the game and comes back again.

 

The same goes if you have an event item, event spell, that teleports the player.

 

ps: do not do this in giant areas, many events can make the map heavy and difficult to be a player with a high drop in fps.

 

Method 2

  Reveal hidden contents

This method is if each area does different damage.
1 - Instead of the variable being boolean, it will be int

 

2 - In each area you will define the value. If the events are on the lava side, you set to 1. If the events are on the acid side, you set to 2. If the events are on the swamp side, you set to 3. And so on ... E to turn it off, just set it to 0.

 

3 - In the common event that causes the damage, you will create conditional branches by checking the value of the variable. If it is 1, it causes damage x and expects x (ms). If it is 2, it causes damage y and waits for y (ms). If it is 1, it causes z damage and waits for z (ms). And so on.

 

4 - Don't forget the player's login and respawn just set it to 0.

 

It should therefore be sufficient to cause constant damage to areas using the events.

Everything worked out!
Thank.

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...