#Is possible to made combat system,like anti Interrupting
1 messages · Page 1 of 1 (latest)
@dapper hawk
ik how to
dms ?
Okey
I alr made it but I think it can more better if someone help me
damage: true```
player has_tag 'inPvp' && other has_tag 'inPvp' true ||
player has_tag != 'inPvp' && ither has_tag != 'inPvp'
No bro
I want made a ffa
So every 2 player can't have a same tag
Its just addition...
Every player who hit the another player who not have combat tag then they will both to add a same combat tag
1 combat tag just can 2 player
If the damaingEntity not has combat tag but hit ENTITY has combat tag then the damaingEntity will not be add tag
How are the tags added?
Remove the other tags every time u add tag
Everytime died
Remove the combat tag
If combat_1 tag alr have player pvping then will use combat_2 tag (not sure is working or not)
I think I need 4 player to test it
U might have to record the 2 players who has such tag
Refer to it to know when the player shouldn't have the tag
Like when they leave and rejoin
I will let them remove tag when left or die
Removing tag when player leaves errors, iirc
Wdym
Uhm, in beforevent playerLeave, there's privilege errors
Then system.run(() ?
I not do left event yet but I alr have addon
But my idea have some difference
I'm not remove tag when player left
Rather is rejoin
The player isn't valid that's why its not possible in playerLeave
however, it's removable in playerSpawn to remove the past "pvp leave" records
Yeah I used the playerSpawn
When player rejoined then remove all combat tag
Btw
const tags = ['combat_1', 'combat_2', 'combat_3', 'combat_4'];
function countTags(tags) {
const counts = {};
for (const tag of tags) {
counts[tag] = 0;
}
for (const player of world.getPlayers()) {
for (const tag of tags) {
if (player.hasTag(tag)) counts[tag]++;
}
}
return counts;
}
Did I correctly count the player who has tag ? @hearty reef
Yes, but that's for online players only
Nvm
The offline player is not influence
(idk) but maybe
What's the chance of a random player having the tag when 2 already have em?
No I changed the principle now
Doesn't using random
Just like queue
Combat1 full then combat2 and so on
Hmm, assuming the tags gets removed from everyone, followed by adding to the queued players,
is there still a function needed for uninterruptions?
Why need remove evryone
To ensure the tag is only added to the current participants
Ok, so how is 3rd player possible to interfere with the 2 players in pvp?
Cant
He is just get notice and immune damage
Hmm, did u test the fire_aspect sword?
No
But this is be writen in json
Can't deal damage
Cant sword dmg, but inflicts burn
Burn will deal damage?
The burning dmg, yes
Oh that bad
Cus the "other" source is undefined
Welp, that's just the pvp with enchanted equupments/pots
Has another way to solve?