Solved Need help to an bee that i'm riding attacks player

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

angrybeezz

Member
May 31, 2022
4
0
1
23
Hello, i'm into a problem and i don't know what to do, i want to make a bee that i'm riding attack the monster/player that attacks me, this is the code:

------------------------------------------------------------

on right click on bee:
if {game::%player%} is equal to 1:
make player ride clicked entity

on damage:
if victim is riding a bee:
make victim's vehicle target attacker

------------------------------------------------------------

Plugins:
Skbee

Note: If i need to install another plugin to solve this problem make it very clearly.
 
Hello, i'm into a problem and i don't know what to do, i want to make a bee that i'm riding attack the monster/player that attacks me, this is the code:

------------------------------------------------------------

on right click on bee:
if {game::%player%} is equal to 1:
make player ride clicked entity

on damage:
if victim is riding a bee:
make victim's vehicle target attacker

------------------------------------------------------------

Plugins:
Skbee

Note: If i need to install another plugin to solve this problem make it very clearly.
Code:
#try this
on damage:
    if victim is riding a bee:
    while attacker is alive:
        make victim's vehicle target attacker
        if distance between victim's vehicle and attacker is less than 10:
            wait a tick
            if distance between victim's vehicle and attacker is less than 1:
                damage the attcker by 1 heart
                push attacker upwards with force 0.5
                push attacker backwards with force 0.5
                wait 1 second
        else:
            exit loop
 
Your code didn't worked, but i found a way to solve my problem, i'm going to close the discussion now.

The code:


on right click on bee:
make player ride clicked entity

on damage:
if victim is riding a bee:
loop all bees in radius 2 of victim:
if victim is riding loop-entity:
set loop-entity's target to attacker
 
Status
Not open for further replies.