Jump to content
  • 0

Need help with event variables


DeathallaOnline

Question

I need help people! the variables do not work for me, the integer. because I want to use them in an event and it doesn't read me the variable "x" which is equal to 0, therefore it doesn't let me enter... And then if I upload the variable from the editor, then when it "subtracts" it doesn't do it .. I already tried in a global event, with all the options I already tried and it won't let me!

 

Does anyone know if the variables are bugged in the last patch? because before I could do pvp arenas without any problem

Edited by panda
Formatting and less scream-y title
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

The variables aren't buggy, you're not using it correctly or you don't know what you want to do, I myself didn't understand anything in your title, I don't have the slightest idea what to say to help you, maybe it's better to add step by step than you did, with prints, to try to understand, because from the text you sent nothing is clear

Link to comment
Share on other sites

  • 0
On 3/29/2023 at 1:30 PM, DeathallaOnline said:

I need help people! the variables do not work for me, the integer. because I want to use them in an event and it doesn't read me the variable "x" which is equal to 0, therefore it doesn't let me enter... And then if I upload the variable from the editor, then when it "subtracts" it doesn't do it .. I already tried in a global event, with all the options I already tried and it won't let me!

 

Does anyone know if the variables are bugged in the last patch? because before I could do pvp arenas without any problem

 

 

What is your event trigger. Cause the only way I would see that it would work would be:

1) The event never run so the event can't change the variable

 

2) You are trying to subtract a integer variable with a boolean variable.

 

3)  You are trying to subtract a integer variable with a null value or 0

 

4) The variable/event editor had a bug which made your event work and is now fixed so the event don't work anymore (Happened to me once or twice)

Link to comment
Share on other sites

  • 0

Sorry, I'm trying to create a 1vs1 "PVP ARENA", and I'm using integer variables, ie.. When a player enters the pvp arena variable, it goes up to 1.. And when he's in pvp 1, another player will enter goes up to 2 and when it's at variable 2, it's supposed to start the battle. I did all that correctly, but the error is that when the battle ends they are not subtracted and that makes the arena busy, and another thing that sometimes happens to me is that not even player 1 enters the battle because the variable 0, he doesn't read it to me. Thanks for answering, and sorry for my English. I'm from Uruguay and I don't speak English.

Edited by panda
Removing excessive bold text
Link to comment
Share on other sites

  • 0
On 4/1/2023 at 1:52 AM, DeathallaOnline said:

Sorry, I'm trying to create a 1vs1 "PVP ARENA", and I'm using integer variables, ie.. When a player enters the pvp arena variable, it goes up to 1.. And when he's in pvp 1, another player will enter goes up to 2 and when it's at variable 2, it's supposed to start the battle. I did all that correctly, but the error is that when the battle ends they are not subtracted and that makes the arena busy, and another thing that sometimes happens to me is that not even player 1 enters the battle because the variable 0, he doesn't read it to me. Thanks for answering, and sorry for my English. I'm from Uruguay and I don't speak English.

 

This is very simple but can be greatly improved on and should help you get the basic structure:

 

Variables:

InArena (Player Variable)

ArenaSize = 2 (set it to size you want arena to be) (Global Variable)

ArenaPlayers (Global Variable)

 

This will add a player to the Arena if they are not already in, and ArenaSize is less than 2.

 

Create a event tile on the entrance to arena.

TRIGGER: Set it to Player Collide.

 

Condition:

If ArenaSize < 2 AND If InArena = 0

Then

Set ArenaPlayers + 1

Set InArena = 1

ELSE

If InArena = 1

Then

Set InArena = 0

 

Now create a common event from "tools" menu (not a map tile event)

TRIGGER: PVP Kill

 

Condition:

If InArena = 1

Player Message (You won the battle)

Set ArenaPlayers - 1

Warp player to Arena Entrance

Set InArena = 0

 

Now create 2nd common event from "tools" menu (not a map tile event)

TRIGGER = PVP Death

If InArena = 1

Player Message (You Lost the battle)

Set ArenaPlayers - 1

Warp player to Arena Entrance

Set InArena = 0

 

You can take this much further, this is very simple. If you want multiple arena's across your world, just add a extra player variable to define where the arena is located:

 

ArenaLocation = 1 (Northern Arena)

ArenaLocation = 2 (Sothern Arena)

Ect..

 

Hope this helps.

 

Thanks

 

Link to comment
Share on other sites

  • 0
13 hours ago, Ainz Ooal Gown said:

 

This is very simple but can be greatly improved on and should help you get the basic structure:

 

Variables:

InArena (Player Variable)

ArenaSize = 2 (set it to size you want arena to be) (Global Variable)

ArenaPlayers (Global Variable)

 

This will add a player to the Arena if they are not already in, and ArenaSize is less than 2.

 

Create a event tile on the entrance to arena.

TRIGGER: Set it to Player Collide.

 

Condition:

If ArenaSize < 2 AND If InArena = 0

Then

Set ArenaPlayers + 1

Set InArena = 1

ELSE

If InArena = 1

Then

Set InArena = 0

 

Now create a common event from "tools" menu (not a map tile event)

TRIGGER: PVP Kill

 

Condition:

If InArena = 1

Player Message (You won the battle)

Set ArenaPlayers - 1

Warp player to Arena Entrance

Set InArena = 0

 

Now create 2nd common event from "tools" menu (not a map tile event)

TRIGGER = PVP Death

If InArena = 1

Player Message (You Lost the battle)

Set ArenaPlayers - 1

Warp player to Arena Entrance

Set InArena = 0

 

You can take this much further, this is very simple. If you want multiple arena's across your world, just add a extra player variable to define where the arena is located:

 

ArenaLocation = 1 (Northern Arena)

ArenaLocation = 2 (Sothern Arena)

Ect..

 

Hope this helps.

 

Thanks

 

thank you so much! I'll try it, although I did something very similar and it didn't work for me, I hope this one does! thank you

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