Virtual object control method and apparatus, device, and readable storage medium
View Patent ↗This application discloses a virtual object control method performed by an electronic device. The method includes: displaying an environment picture, a virtual environment including a bonus draw prop; obtaining, in response to a target virtual object being located in an interactive distance range of the bonus draw prop, a teleportation skill from the bonus draw prop; displaying, when a skill display condition is met, a teleportation skill control used for triggering the teleportation skill; and moving the target virtual object from a first position to a second position in response to receiving a trigger operation for the teleportation skill associated with the teleportation skill control. In this way, the human-computer interaction efficiency in a process of controlling the target virtual object to move is improved.
1. A method for relocating a virtual object in a virtual environment of a game performed by an electronic device, the method comprising:
displaying an environment picture of the virtual environment of the game observed by a target virtual object, the virtual environment comprising a bonus draw prop, the bonus draw prop being used for providing at least two bonus resources to the target virtual object;
receiving a movement instruction from a user of the electronic device;
in response to the movement instruction, moving the target virtual object towards the bonus draw prop;
drawing a teleportation skill from the at least two bonus resources in response to the target virtual object being moved within an interactive distance range of the bonus draw prop;
in accordance with a determination that a skill display condition is met, displaying, on the environment picture, a teleportation skill control used for triggering the teleportation skill;
receiving a user selection of the teleportation skill control by the user of the electronic device; and
in response to the user selection of the teleportation skill control, moving the target virtual object from a first position to a second position, the first position being a current position of the target virtual object in the virtual environment and the second position being a randomly determined position in the virtual environment by the teleportation skill.
2. The method according to claim 1 , wherein the skill display condition comprises at least one of a state condition or an environmental condition, the state condition corresponds to the target virtual object, and the environmental condition corresponds to the virtual environment;
the state condition comprises that an energy value of the target virtual object is less than or equal to an energy threshold; and
the environmental condition comprises that a quantity of hostile virtual objects in a subregion of the virtual environment is greater than a quantity threshold, and the subregion of the virtual environment is obtained by dividing the virtual environment according to the position of the target virtual object in the virtual environment.
3. The method according to claim 2 , wherein the skill display condition comprises the state condition; and
the displaying, on the environment picture, the teleportation skill control used for triggering the teleportation skill comprises:
displaying the teleportation skill control in response to the energy value of the target virtual object being reduced to the energy threshold.
4. The method according to claim 3 , wherein the virtual environment further comprises a hostile virtual object, the hostile virtual object being a virtual object that attacks the target virtual object; and
before the displaying the teleportation skill control in response to the energy value of the target virtual object being reduced to the energy threshold, the method comprises:
receiving a first attack signal, the first attack signal being a signal generated when the hostile virtual object attacks the target virtual object; and
reducing the energy value of the target virtual object corresponding to the first attack signal.
5. The method according to claim 2 , wherein the skill display condition comprises the environmental condition; and
the displaying, on the environment picture, the teleportation skill control used for triggering the teleportation skill comprises:
displaying the teleportation skill control in response to a quantity of hostile virtual objects in a preset distance range reaching the quantity threshold, the preset distance range being centered on the target virtual object.
6. The method according to claim 1 , wherein the bonus draw prop corresponds to a collision detection box; and
before the drawing a teleportation skill from the at least two bonus resources in response to the target virtual object being moved within an interactive distance range of the bonus draw prop, the method comprises:
performing collision detection between the target virtual object and the bonus draw prop by using the collision detection box; and
determining, in response to detecting a collision between the target virtual object and the bonus draw prop, that the target virtual object is in the interactive distance range of the bonus draw prop.
7. The method according to claim 1 , wherein before the drawing a teleportation skill from the at least two bonus resources, the method further comprises:
receiving an attack operation of the target virtual object on the hostile virtual object;
receiving a second attack signal of the target virtual object to the hostile virtual object, the second attack signal being used for indicating that the target virtual object causes an injury event to the hostile virtual object; and
obtaining an exchange resource corresponding to the second attack signal, the exchange resource being used for drawing the bonus resource from the bonus draw prop, and the bonus resource comprising the teleportation skill.
8. The method according to claim 1 , wherein before the moving the target virtual object from a first position to a second position, the method further comprises:
determining a target positioning point in a map corresponding to the virtual environment in response to receiving the trigger operation for the teleportation skill control;
obtaining a candidate region corresponding to the target positioning point; and
determining the second position within the candidate region.
9. The method according to claim 8 , wherein at least one candidate positioning point is correspondingly configured in the virtual environment, and the at least one candidate positioning point comprises the target positioning point; and
the determining a target positioning point in a virtual map corresponding to the virtual environment in response to receiving the trigger operation for the teleportation skill control comprises:
randomly determining the target positioning point from the at least one candidate positioning point in response to receiving the trigger operation for the teleportation skill control; or, receiving a positioning point selection operation, and determining a candidate positioning point selected by the positioning point selection operation as the target positioning point.
10. The method according to claim 1 , wherein the at least two bonus resources are of different types including one skill-type and one prop-type.
11. An electronic device, comprising: a processor and a memory, the memory storing at least one program, the at least one program, when executed by the processor, causing the electronic device to implement a method for relocating a virtual object in a virtual environment of a game, the method including:
displaying an environment picture of the virtual environment of the game observed by a target virtual object, the virtual environment comprising a bonus draw prop, the bonus draw prop being used for providing at least two bonus resources to the target virtual object;
receiving a movement instruction from a user of the electronic device;
in response to the movement instruction, moving the target virtual object towards the bonus draw prop;
drawing a teleportation skill from the at least two bonus resources in response to the target virtual object being moved within an interactive distance range of the bonus draw prop;
in accordance with a determination that a skill display condition is met, displaying, on the environment picture, a teleportation skill control used for triggering the teleportation skill;
receiving a user selection of the teleportation skill control by the user of the electronic device; and
in response to the user selection of the teleportation skill control, moving the target virtual object from a first position to a second position, the first position being a current position of the target virtual object in the virtual environment and the second position being a randomly determined position in the virtual environment by the teleportation skill.
12. The electronic device according to claim 11 , wherein the skill display condition comprises at least one of a state condition or an environmental condition, the state condition corresponds to the target virtual object, and the environmental condition corresponds to the virtual environment;
the state condition comprises that an energy value of the target virtual object is less than or equal to an energy threshold; and
the environmental condition comprises that a quantity of hostile virtual objects in a subregion of the virtual environment is greater than a quantity threshold, and the subregion of the virtual environment is obtained by dividing the virtual environment according to the position of the target virtual object in the virtual environment.
13. The electronic device according to claim 12 , wherein the skill display condition comprises the state condition; and
the displaying, on the environment picture, the teleportation skill control used for triggering the teleportation skill comprises:
displaying the teleportation skill control in response to the energy value of the target virtual object being reduced to the energy threshold.
14. The electronic device according to claim 12 , wherein the skill display condition comprises the environmental condition; and
the displaying, on the environment picture, the teleportation skill control used for triggering the teleportation skill comprises:
displaying the teleportation skill control in response to a quantity of hostile virtual objects in a preset distance range reaching the quantity threshold, the preset distance range being centered on the target virtual object.
15. The electronic device according to claim 11 , wherein the bonus draw prop corresponds to a collision detection box; and
before the drawing a teleportation skill from the at least two bonus resources in response to the target virtual object being within an interactive distance range of the bonus draw prop, the virtual object control method comprises:
performing collision detection between the target virtual object and the bonus draw prop by using the collision detection box; and
determining, in response to detecting a collision between the target virtual object and the bonus draw prop, that the target virtual object is in the interactive distance range of the bonus draw prop.
16. The electronic device according to claim 11 , wherein before the drawing a teleportation skill from the at least two bonus resources, the virtual object control method further comprises:
receiving an attack operation of the target virtual object on the hostile virtual object;
receiving a second attack signal of the target virtual object to the hostile virtual object, the second attack signal being used for indicating that the target virtual object causes an injury event to the hostile virtual object; and
obtaining an exchange resource corresponding to the second attack signal, the exchange resource being used for drawing the bonus resource from the bonus draw prop, and the bonus resource comprising the teleportation skill.
17. The electronic device according to claim 11 , wherein before the moving the target virtual object from a first position to a second position, the virtual object control method further comprises:
determining a target positioning point in a map corresponding to the virtual environment in response to receiving the trigger operation for the teleportation skill control;
obtaining a candidate region corresponding to the target positioning point; and
determining the second position within the candidate region.
18. A non-transitory computer-readable storage medium, storing at least one program, the at least one program, when executed by a processor of an electronic device, causing the electronic device to implement a method for relocating a virtual object in a virtual environment of a game, the method including:
displaying an environment picture of the virtual environment of the game observed by a target virtual object, the virtual environment comprising a bonus draw prop, the bonus draw prop being used for providing at least two bonus resources to the target virtual object;
receiving a movement instruction from a user of the electronic device;
in response to the movement instruction, moving the target virtual object towards the bonus draw prop;
drawing a teleportation skill from the at least two bonus resources in response to the target virtual object being moved within an interactive distance range of the bonus draw prop;
in accordance with a determination that a skill display condition is met, displaying, on the environment picture, a teleportation skill control used for triggering the teleportation skill;
receiving a user selection of the teleportation skill control by the user of the electronic device; and
in response to the user selection of the teleportation skill control, moving the target virtual object from a first position to a second position, the first position being a current position of the target virtual object in the virtual environment and the second position being a randomly determined position in the virtual environment by the teleportation skill.
19. The non-transitory computer-readable storage medium according to claim 18 , wherein the skill display condition comprises at least one of a state condition or an environmental condition, the state condition corresponds to the target virtual object, and the environmental condition corresponds to the virtual environment;
the state condition comprises that an energy value of the target virtual object is less than or equal to an energy threshold; and
the environmental condition comprises that a quantity of hostile virtual objects in a subregion of the virtual environment is greater than a quantity threshold, and the subregion of the virtual environment is obtained by dividing the virtual environment according to the position of the target virtual object in the virtual environment.
20. The non-transitory computer-readable storage medium according to claim 18 , wherein the skill display condition comprises the state condition; and
the displaying, on the environment picture, the teleportation skill control used for triggering the teleportation skill comprises:
displaying the teleportation skill control in response to the energy value of the target virtual object being reduced to the energy threshold.