How do I stop Team A from healing Team B with a splash potion of healing

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Zackwall

New Member
Apr 21, 2022
9
0
1
Ok, so I'm trying to make it so that when Team A or Team B has a splash potion of healing it would only heal their team and not the enemy team. I checked the
event and it doesn't have a `event-shooter` and `event-healed` or something

this is what I'm kinda looking for
Code:
on heal:
    shooter is "%shooter%"
    if healed is not "%healed%"
    cancel event
obviously this doesn't work but I'm looking for something like that could anyone help me?
[doublepost=1650883392,1650528387][/doublepost]bump
 
Ok, so I'm trying to make it so that when Team A or Team B has a splash potion of healing it would only heal their team and not the enemy team. I checked the event and it doesn't have a `event-shooter` and `event-healed` or something

this is what I'm kinda looking for
Code:
on heal:
    shooter is "%shooter%"
    if healed is not "%healed%"
    cancel event
obviously this doesn't work but I'm looking for something like that could anyone help me?
[doublepost=1650883392,1650528387][/doublepost]bump
On heal is too late you need to use on healing to cancel the event
 
On heal is too late you need to use on healing to cancel the event
ah no its not the code its just an example because `shooter` in on heal doesn't exist
the reason for the `shooter` is because if a player throws a splash potion of healing to another player it would heal them and that's the thing i want to cancel event
[doublepost=1650981706,1650981670][/doublepost]
yes... but it doesn't have `event-shooter` or something for splash potion of healing
 
ah no its not the code its just an example because `shooter` in on heal doesn't exist
the reason for the `shooter` is because if a player throws a splash potion of healing to another player it would heal them and that's the thing i want to cancel event
[doublepost=1650981706,1650981670][/doublepost]
yes... but it doesn't have `event-shooter` or something for splash potion of healing
I have been thinking and you might be able to use on right click with the potions and set a location at the player location then on heal detect a radius around that location the loop players and if the player is not from the team cancel event
 
I have been thinking and you might be able to use on right click with the potions and set a location at the player location then on heal detect a radius around that location the loop players and if the player is not from the team cancel event
great idea! the only problem is that if the other team also throws a healing potion at the same time it might detect it as the enemys team and heals the enemy team
[doublepost=1651181683,1651060815][/doublepost]bump
[doublepost=1651342229][/doublepost]bump
[doublepost=1651448698][/doublepost]bump
 
Code:
on right click with red dye:
  name of tool contains "&dHeal Spell"
  remove 1 of tool from tool
  loop all players in a radius of 5 around player where [{team::%input%} = "red"]:
    heal loop-player by 4 hearts
    send "&dYou have been healed by %player%"
Not exactly what you're looking for but still does the job, the problem with splash potions is that there apparently isn't much you can do with them in skript (from my experience).

Change the team variable with whatever variable you use for teams
 
Status
Not open for further replies.