Method, device, terminal, storage medium and program product for using virtual props
By using virtual props throwing and multiple prop effects triggering mechanisms in battle games, the problem of location information leakage during virtual weapons attacks is solved, and the usage rate of virtual weapons and the success rate of combat is improved.
Patent Information
- Application Number
- CN202111652771.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-11-02
- Filing Date
- 2021-12-30
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2041-12-30
AI Technical Summary
In battle games, users are prone to leaking location information when attacking with virtual weapons, which affects the use rate of virtual weapons.
Provide a method and device for using virtual props, which can display prop throw controls, control the target virtual object to throw target virtual props, and trigger at least two prop effects on the thrown target virtual props, ensuring that the position and time are different when each prop effect is triggered.
It reduces the probability that users will leak location information using virtual weapons, and improves the usage rate and combat success rate of virtual weapons.
Smart Images

Figure CN114210062B_ABST
Abstract
Description
[0001] This application claims priority to the Chinese patent application filed on November 2, 2021, with application number 202111289599.1 and invention name “Method, device, terminal, storage medium and program product for using virtual props”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The embodiments of the present application relate to the field of computer technology, and in particular to a method, device, terminal, storage medium, and program product for using a virtual prop. Background Art
[0003] A battle game is a game in which multiple user accounts compete in the same scene. Players can control virtual objects in the virtual environment to perform actions such as walking, running, climbing, and shooting. Multiple players can also team up online to collaborate on a task in the same virtual environment.
[0004] In related technologies, when playing a game, virtual weapons such as guns can be used to attack other virtual objects. When shooting with virtual weapons, there is an attack sound effect. In this case, other users can identify the position of the virtual object through the attack sound effect.
[0005] It can be seen that when users use virtual weapons to attack other virtual objects, it is easy to leak location information, which affects the usage rate of virtual weapons. Summary of the Invention
[0006] The embodiments of the present application provide a method, device, terminal, storage medium, and program product for using virtual props, which can reduce the probability of users leaking location information when using virtual weapons and increase the utilization rate of virtual weapons. The technical solution is as follows:
[0007] In one aspect, an embodiment of the present application provides a method for using a virtual item, the method comprising:
[0008] Displaying a prop throwing control, wherein the prop throwing control is used to trigger throwing a target virtual prop, and the target virtual prop is used to simulate the attack sound effect of a virtual weapon;
[0009] In response to a triggering operation on the prop throwing control, controlling the target virtual object to throw the target virtual prop;
[0010] The target virtual prop is controlled to trigger a prop effect at least twice after being thrown, wherein the position of the target virtual prop is different when the prop effect is triggered at least twice, and the time when the prop effect is triggered at least twice is different.
[0011] On the other hand, an embodiment of the present application provides a device for using a virtual prop, the device comprising:
[0012] A first display module is used to display a prop throwing control, wherein the prop throwing control is used to trigger the throwing of a target virtual prop, and the target virtual prop is used to simulate the attack sound effect of a virtual weapon;
[0013] A first control module is configured to control a target virtual object to throw the target virtual prop in response to a triggering operation on the prop throwing control;
[0014] The second control module is used to control the target virtual prop to trigger at least two prop effects after being thrown, wherein the position of the target virtual prop is different when the prop effects are triggered for at least two times, and the time when the prop effects are triggered for at least two times is different.
[0015] On the other hand, an embodiment of the present application provides a terminal, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method for using virtual props as described in the above aspects.
[0016] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores at least one instruction, at least one program, a code set, or an instruction set. The at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the method for using virtual props as described in the above aspects.
[0017] In another aspect, embodiments of the present application provide a computer program product or computer program, comprising computer instructions stored in a computer-readable storage medium. A processor of a terminal reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the terminal to perform a method for providing virtual item usage in various optional implementations of the aforementioned aspects.
[0018] The beneficial effects of the technical solutions provided by the embodiments of the present application include at least:
[0019] In an embodiment of the present application, a target virtual prop is provided that can simulate the attack sound effects of a virtual weapon, and can control the target virtual prop to trigger the prop effect at different positions, so that the target virtual prop simulates the attack sound effects of the virtual weapon at different positions at different times, thereby improving the authenticity of the simulated user controlling the target virtual object to use the virtual weapon to attack, thereby reducing the probability of the user leaking position information when using the virtual weapon, helping to improve the success rate of the battle, and thus increasing the usage rate of the virtual weapon. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A schematic diagram showing an implementation environment provided by an embodiment of the present application is shown;
[0021] Figure 2 A flowchart showing a method for using a virtual prop provided by an exemplary embodiment of the present application is shown;
[0022] Figure 3 A schematic diagram of an interface illustrating a process of using a virtual prop according to an exemplary embodiment of the present application is shown;
[0023] Figure 4 A flowchart showing a method for using virtual props provided by another exemplary embodiment of the present application is shown;
[0024] Figure 5 A schematic diagram of an interface showing a target virtual prop jumping process according to an exemplary embodiment of the present application is shown;
[0025] Figure 6 A flowchart showing a method for using virtual props provided by another exemplary embodiment of the present application is shown;
[0026] Figure 7 A schematic diagram of an interface for displaying a prop identification provided by an exemplary embodiment of the present application is shown;
[0027] Figure 8 A schematic diagram of an interface for displaying a sound effect identifier provided by an exemplary embodiment of the present application is shown;
[0028] Figure 9 A schematic diagram of an interface of a virtual restraint prop provided by an exemplary embodiment of the present application is shown;
[0029] Figure 10 A flowchart showing a method for using virtual props provided by another exemplary embodiment of the present application is shown;
[0030] Figure 11 This is a structural block diagram of a device for using virtual props provided by an exemplary embodiment of the present application;
[0031] Figure 12 A structural block diagram of a terminal provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0032] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0033] In this document, "plurality" refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates an "or" relationship between the associated objects.
[0034] First, the nouns involved in the embodiments of this application are introduced:
[0035] A virtual environment is the virtual environment displayed (or provided) when an application is running on a terminal. This virtual environment can be a simulation of the real world, a semi-simulated and semi-imaginary environment, or a purely imaginary environment. This application does not limit this to any of the following: a 2D virtual environment, a 2.5D virtual environment, or a 3D virtual environment. The following embodiments utilize a 3D virtual environment as an example.
[0036] Virtual objects are movable objects in a virtual environment. These movable objects can be virtual characters, virtual animals, or animated characters, such as people or animals displayed in a 3D virtual environment. Alternatively, virtual objects can be 3D models created using animation skeletal technology. Each virtual object has its own unique shape and volume within the 3D virtual environment and occupies a portion of the space within the 3D virtual environment.
[0037] Shooting games: These include first-person shooters and third-person shooters. First-person shooters are games played from a first-person perspective, where the virtual environment is viewed from the perspective of the first virtual subject. Third-person shooters are games played from a third-person perspective, where the virtual environment is viewed from a third-person perspective (e.g., from behind the first virtual subject's head).
[0038] In the game, at least two virtual objects engage in a single-game battle mode in a virtual environment. The virtual objects survive in the virtual environment by avoiding damage initiated by other virtual objects and dangers in the virtual environment (such as poison gas circles, swamps, etc.). When the virtual object's health value in the virtual environment reaches zero, the virtual object's life in the virtual environment ends, and the virtual object that survives the last in the virtual environment is the winner. Optionally, the battle starts when the first client joins the battle and ends when the last client exits the battle. Each client can control one or more virtual objects in the virtual environment. Optionally, the competitive mode of the battle can include a single-player battle mode, a two-player team battle mode, or a multi-player group battle mode. The embodiments of the present application do not limit the battle mode.
[0039] Virtual props: These are props that virtual objects can use in a virtual environment, including attack props, supply props, and defensive props that can change the attributes of other virtual objects. Attack props that can change the attributes of other virtual objects include long-range virtual props, short-range virtual props, and throwing virtual props.
[0040] The method provided in this application can be applied to virtual reality applications, three-dimensional map programs, first / third-person shooter games, multiplayer online battle arena games (MOBA), etc. The following embodiments are illustrated by using applications in games.
[0041] Games based on virtual environments are often composed of one or more game world maps. The virtual environment in the game simulates scenes in the real world. Users can control virtual objects in the game to walk, run, jump, shoot, fight, drive, switch to using virtual props, use virtual props to harm other virtual objects, and other actions in the virtual environment. The interactivity is strong, and multiple users can team up online to play competitive games.
[0042] During a game, users can control virtual objects to use virtual guns to attack other virtual objects. When using virtual guns to attack, there is an attack sound effect. Other players can identify the attack location through the attack sound effect, thereby leaking the location of the target virtual object controlled by the user.
[0043] It should be noted that the virtual firearms, virtual guns, virtual bullets, virtual weapons, etc. involved in the embodiments of the present application are all virtual props in the game.
[0044] Please refer to Figure 1 , which shows a schematic diagram of an implementation environment provided by an embodiment of the present application. The implementation environment may include: a first terminal 110, a server 120 and a second terminal 130.
[0045] A first terminal 110 runs an application 111 that supports a virtual environment. Application 111 can be a multiplayer online battle program. When application 111 runs, the user interface of application 111 is displayed on the screen of first terminal 110. Application 111 can be any of a Multiplayer Online Battle Arena (MOBA) game, a battle royale shooter game, or a simulation game (SLG). In this embodiment, application 111 is a first-person shooter (FPS) game. First terminal 110 is used by a first user 112. First user 112 uses first terminal 110 to control a first virtual object in the virtual environment. The first virtual object can be referred to as the primary virtual object of first user 112. The activities of the first virtual object include, but are not limited to, at least one of adjusting body posture, crawling, walking, running, riding, flying, jumping, driving, picking up items, shooting, attacking, throwing, and performing skills. Illustratively, the first virtual object is a first virtual character, such as a realistic or animated character.
[0046] The second terminal 130 runs an application 131 that supports a virtual environment. Application 131 can be a multiplayer online battle program. When the second terminal 130 runs application 131, the user interface of application 131 is displayed on the screen of the second terminal 130. The client can be any of a MOBA game, a battle royale shooter game, or a SLG game. In this embodiment, application 131 is an FPS game as an example. The second terminal 130 is used by a second user 132. Second user 132 uses second terminal 130 to control a second virtual object in the virtual environment to perform activities. The second virtual object can be referred to as the second user's 132 primary virtual character. Illustratively, the second virtual object is a second virtual person, such as a simulated or animated character.
[0047] Optionally, the first virtual object and the second virtual object are in the same virtual world. Optionally, the first virtual object and the second virtual object may belong to the same camp, the same team, the same organization, have a friendship relationship, or have temporary communication permissions. Optionally, the first virtual object and the second virtual object may belong to different camps, different teams, different organizations, or have a hostile relationship.
[0048] Optionally, the applications running on the first terminal 110 and the second terminal 130 are the same, or the applications running on the two terminals are the same type of applications on different operating system platforms (Android or iOS). The first terminal 110 can generally refer to one of multiple terminals, and the second terminal 130 can generally refer to another of the multiple terminals. This embodiment uses the first terminal 110 and the second terminal 130 as examples. The first terminal 110 and the second terminal 130 can be of the same or different device types, including at least one of a smartphone, a tablet computer, an e-book reader, a Moving Picture Experts Group Audio Layer III (MP3) player, a Moving Picture Experts Group Audio Layer IV (MP4) player, a laptop computer, and a desktop computer.
[0049] Figure 1 Only two terminals are shown, but in different embodiments, multiple other terminals can access the server 120. Optionally, there are one or more terminals corresponding to developers, on which a development and editing platform for applications supporting virtual environments is installed. Developers can edit and update applications on these terminals and transmit the updated application installation package to the server 120 via a wired or wireless network. The first terminal 110 and the second terminal 130 can download the application installation package from the server 120 to update the application.
[0050] The first terminal 110 , the second terminal 130 and other terminals are connected to the server 120 via a wireless network or a wired network.
[0051] Server 120 includes at least one of a single server, a server cluster consisting of multiple servers, a cloud computing platform, and a virtualization center. Server 120 provides backend services for applications that support 3D virtual environments. Optionally, server 120 performs primary computing tasks, while terminals perform secondary computing tasks; alternatively, server 120 performs secondary computing tasks, while terminals perform primary computing tasks; alternatively, server 120 and terminals utilize a distributed computing architecture for collaborative computing.
[0052] In an illustrative example, server 120 includes memory 121, processor 122, user account database 123, battle service module 124, and user-facing input / output interface (I / O interface) 125. Processor 122 is configured to load instructions stored in server 120 and process data in user account database 123 and battle service module 124. User account database 123 is configured to store user account data used by first terminal 110, second terminal 130, and other terminals, such as user account avatars, user account nicknames, user account combat power indexes, and the service areas where user accounts are located. Battle service module 124 is configured to provide multiple battle rooms for users to engage in battles, such as 1v1 battles, 3v3 battles, and 5v5 battles. User-facing I / O interface 125 is configured to establish communication and exchange data with first terminal 110 and / or second terminal 130 via a wireless or wired network.
[0053] Please refer to Figure 2 , which shows a flowchart of a method for using virtual props provided by an exemplary embodiment of the present application. Figure 1 Taking the first terminal 110 or the second terminal 130 in the implementation environment shown or other terminals in the implementation environment as an example, the method includes the following steps:
[0054] Step 201: Display a prop throwing control, which is used to trigger the throwing of a target virtual prop, and the target virtual prop is used to simulate the attack sound effect of a virtual weapon.
[0055] The method of an embodiment of the present application is applied to a virtual environment, which includes a first virtual object and a second virtual object, and the first virtual object and the second virtual object belong to different camps. In one possible implementation, the terminal displays the virtual environment through a virtual environment screen. Optionally, the virtual environment screen is a screen that observes the virtual environment from the perspective of the virtual object. The viewing angle refers to the observation angle when observing the virtual environment from the first-person perspective or the third-person perspective of the virtual object. Optionally, in an embodiment of the present application, the viewing angle is the angle when observing the virtual object through a camera model in the virtual environment.
[0056] Optionally, the camera model automatically follows the virtual object in the virtual environment. Specifically, when the position of the virtual object in the virtual environment changes, the camera model simultaneously follows the position of the virtual object in the virtual environment, and the camera model always remains within a preset distance range of the virtual object in the virtual environment. Optionally, during the automatic following process, the relative position of the camera model and the virtual object does not change.
[0057] A camera model refers to a three-dimensional model positioned around a virtual object in a virtual environment. When using a first-person perspective, the camera model is located near or at the virtual object's head. When using a third-person perspective, the camera model can be located behind the virtual object and bound to it, or it can be located at any position within a preset distance from the virtual object. This camera model allows viewing of the virtual object in the virtual environment from different angles. Optionally, when the third-person perspective is a first-person over-the-shoulder perspective, the camera model is located behind the virtual object (e.g., the head and shoulders of the virtual character). Alternatively, in addition to first-person and third-person perspectives, perspectives may include other perspectives, such as a bird's-eye view. When using a bird's-eye view, the camera model can be located above the virtual object's head. A bird's-eye view is a perspective from which the virtual environment is viewed from an aerial perspective. Optionally, the camera model is not actually displayed in the virtual environment; that is, it is not displayed in the virtual environment displayed on the user interface.
[0058] In an embodiment of the present application, a target virtual prop is provided. The prop is a throwing virtual prop, and after being thrown, it can simulate the attack sound effect of a virtual weapon. Among them, the virtual weapon can be a virtual firearm weapon. For example, it can simulate the attack sound effect corresponding to the virtual firearm prop, and different virtual weapons can correspond to different attack sound effects.
[0059] In one possible implementation, a user can pre-equip a virtual object with a target virtual item before entering a match. After entering a match, when using the target virtual item, the user can trigger an item-throwing control to throw the target virtual item, thereby triggering the item effect of the target virtual item. The item-throwing control can be displayed in the virtual environment after the target virtual object is equipped with the target virtual item, or after the user triggers the corresponding control for the target virtual item.
[0060] Target virtual items can be pre-equipped before entering a match, or picked up from random or fixed locations in the virtual environment after entering a match. It should be noted that when pre-equipping target virtual items before entering a match, there is a limit on the number of items that can be equipped. This means the number of pre-equipped target virtual items must be less than a threshold, such as 2. In one possible implementation, users can increase the number of equipped target virtual items by expanding virtual items. Expanding virtual items is used to add tactical equipment to virtual objects, such as target virtual items, smoke bombs, and explosion-proof devices.
[0061] Indicative, such as Figure 3 As shown, when the user clicks the control 301 corresponding to the target virtual prop, the attack control will switch to the prop throwing control 302.
[0062] Step 202: In response to a trigger operation on a prop throwing control, control the target virtual object to throw the target virtual prop.
[0063] The user can control the target virtual object to throw the target virtual prop by triggering the prop throwing control. When controlling the target virtual object to throw the target virtual prop, the throwing direction and throwing distance can also be adjusted to throw the target virtual prop to the target position.
[0064] Optionally, the trigger operation may be at least one of a click operation, a long press operation, and a sliding operation.
[0065] Indicative, such as Figure 3 As shown, the target virtual object 303 is controlled to throw the target virtual prop 304.
[0066] Step 203 , controlling the thrown target virtual prop to trigger the prop effect at least twice, wherein the target virtual prop is located at different positions when the at least two prop effects are triggered, and the at least two prop effects are triggered at different times.
[0067] When the target virtual prop is thrown, the terminal can control the target virtual prop to trigger a prop effect, where the prop effect includes playing the attack sound effect of the virtual weapon. Furthermore, since the target virtual prop is used to simulate the attack sound effect of the virtual weapon, and when the user controls the target virtual object to attack with the virtual weapon, it usually moves to different positions to attack. Therefore, in this embodiment of the application, the target virtual prop can be controlled to trigger the prop effect at different positions, and each triggering time is different, thereby improving the realism of the simulation of the target virtual object using the virtual weapon to attack.
[0068] Optionally, when virtual objects controlled by other users are within a certain range of the target virtual prop trigger position, an attack sound effect can be heard, and the attack sound effect gradually becomes smaller as the distance increases.
[0069] It should be noted that controlling the target virtual object to throw the target virtual prop can be executed by the terminal or by the server. Similarly, controlling the target virtual prop to trigger the prop effect can be executed by the terminal or by the server. When the server controls the execution, when the terminal receives the trigger operation of the prop trigger control, the terminal sends the throwing instruction to the server. The server controls the target virtual object to throw the target virtual prop to the target position according to the throwing instruction, and controls the target virtual prop to trigger the prop effect at different positions. This embodiment does not limit this. For ease of explanation, the following embodiments will be described using terminal execution as an example.
[0070] Indicative, such as Figure 3 As shown, after the target virtual prop 304 is thrown, the prop effects of the target virtual prop 304 may be triggered at different positions.
[0071] To sum up, in an embodiment of the present application, a target virtual prop is provided, which can simulate the attack sound effects of virtual weapons, and can control the target virtual props at different positions to trigger the prop effects, so that the target virtual props can simulate the attack sound effects of virtual weapons at different positions at different times, thereby improving the authenticity of the simulated user controlling the target virtual object to use the virtual weapon to attack, thereby reducing the probability of the user leaking position information when using the virtual weapon, helping to improve the success rate of the battle, and thus increasing the usage rate of the virtual weapon.
[0072] In an embodiment of the present application, after being thrown, the target virtual prop can automatically jump in different directions, thereby changing the position of the target virtual prop in the virtual environment, thereby achieving control of the target virtual prop at different positions to trigger the prop effect. The following will be described with exemplary embodiments.
[0073] Please refer to Figure 4 , shows a flowchart of a method for using virtual props provided by another exemplary embodiment of the present application. Figure 1 Taking the first terminal 110 or the second terminal 130 in the implementation environment shown or other terminals in the implementation environment as an example, the method includes the following steps:
[0074] Step 401: Display the prop throwing control.
[0075] Step 402: In response to a trigger operation on a prop throwing control, control the target virtual object to throw the target virtual prop.
[0076] The implementation of step 401 and step 402 can refer to the above-mentioned steps 201 to 202, and will not be repeated in this embodiment.
[0077] Step 403: Control the target virtual prop to play the attack sound effect of the virtual weapon at the i-th trigger position.
[0078] When the target virtual prop is thrown, the terminal can control the target virtual prop to play the attack sound effects of the virtual weapon at different trigger positions. Among them, when the target virtual weapon touches the virtual ground, the terminal can control the attack sound effects of the virtual weapon to be played at the corresponding position of the virtual ground. In one possible embodiment, after the target virtual prop is thrown, the target virtual prop can emit a certain distance of ray detection during the flight, wherein the ray detection is used to detect the obstacle touched by the target virtual prop. When the ray hits the wall, the target virtual prop will be controlled to rebound, and when the ray hits the ground, the target virtual prop can be controlled to stop moving. Among them, different materials can be preset for the virtual wall and the virtual ground. When ray detection is used, it can be determined based on the detected material whether the target virtual prop is about to touch the ground or the wall.
[0079] When the target virtual item lands for the first time, the point of contact with the virtual ground can be determined as the first trigger position. In one possible scenario, the target virtual item stops immediately after landing. In this case, the point where it lands is determined as the first trigger position. In another possible scenario, the target virtual item may bounce several times before coming to rest. In this case, the point where it stops and contacts the virtual ground is determined as the first trigger position. After determining the first trigger position, the terminal controls the target virtual item to play the virtual weapon attack sound effect at the first trigger position. Subsequently, when the target virtual item changes position, the virtual weapon attack sound effect is played at the changed trigger position.
[0080] Since there is a certain time interval between attacks at different positions when the target virtual object uses a virtual weapon to attack, and in order to improve the realism of the movement of the target virtual object when using the virtual weapon, there will be a certain time interval when controlling the target virtual props at different positions to trigger the prop effect. For example, this step can be replaced with the following steps:
[0081] Step 403a, in response to the duration at the i-th trigger position reaching the duration threshold, controlling the target virtual prop to play the attack sound effect of the virtual weapon at the i-th trigger position, where the duration threshold is a fixed value, or the duration threshold is a random value within the target duration range.
[0082] When the target virtual item stays at each trigger position for a certain duration threshold, the terminal controls the target virtual item to play the attack sound effect of the virtual weapon at that trigger position. In one possible embodiment, the duration threshold corresponding to each trigger position may be the same. For example, the duration threshold may be 2 seconds. Then, when the target virtual item is thrown and stays at the first trigger position for 2 seconds, the target virtual item is controlled to play the attack sound effect of the virtual weapon at the first trigger position. When the target virtual item changes position and stays at the second trigger position for 2 seconds, the target virtual item is controlled to play the attack sound effect of the virtual weapon at the second trigger position. Similarly, the target virtual item is controlled to play the attack sound effect of the virtual weapon at different positions.
[0083] In another possible embodiment, since the time intervals between switching positions may vary when controlling the target virtual object to attack with a virtual weapon at different locations, to further enhance simulation realism, the duration threshold corresponding to each trigger position may be a random value. The terminal pre-stores a target duration range. When the trigger position of the target virtual item changes, a random value within the target duration range is determined as the duration threshold. For example, the target duration range may be 1-2 seconds. When the target virtual item is thrown, a first duration threshold of 2 seconds is selected. After the target item remains at the first trigger position for 2 seconds, the target virtual item is controlled to play the virtual weapon attack sound effect at the first trigger position. When the target virtual item changes position, a second duration threshold of 1.5 seconds is selected. After the target item remains at the second trigger position for 1.5 seconds, the target virtual item is controlled to play the virtual weapon attack sound effect at the second trigger position. This process is repeated in this manner, and the target virtual item is controlled to play the virtual weapon attack sound effect at different locations.
[0084] Step 404 : Control the target virtual prop to perform the i-th jump, wherein after the i-th jump, the target virtual prop moves to the (i+1)-th trigger position.
[0085] In this embodiment, the trigger position of the target virtual prop is changed by controlling its hopping. While controlling the target virtual prop to play a virtual weapon attack sound effect at the i-th trigger position, the terminal controls the target virtual prop to hop for the i-th time, thereby moving the target virtual prop to the i+1-th trigger position. If the target virtual prop collides with a wall during the hopping process, it will rebound until it lands. The post-hopping trigger position is the point where it contacts the virtual ground after landing and coming to rest. That is, the i+1-th trigger position is the point where the target virtual prop contacts the virtual ground after the i-th hopping.
[0086] In order to enable users to understand the status of the target virtual prop more clearly, when the target virtual prop is playing the attack sound effect of the virtual weapon and jumping, the first explosion animation will be displayed in the virtual environment screen. For example, the animation can be a special effects animation of sparks flying, thereby prompting the user that the target virtual prop is playing the attack sound effect.
[0087] In this embodiment, each time the target virtual prop is controlled to jump, it is a random jump. This step can be replaced by the following steps:
[0088] Step 404a, determining the i-th initial jump velocity and the i-th jump direction corresponding to the i-th jump, the i-th initial jump velocity is within the target speed range, and the angle between the i-th jump direction and the virtual ground is within the target angle range.
[0089] In one possible implementation, it is first necessary to determine the i-th initial jump velocity and the i-th jump direction corresponding to the i-th jump, so as to control the i-th jump according to the i-th initial jump velocity and the i-th jump direction. The i-th initial jump velocity refers to the initial upward velocity of the target virtual prop when it jumps. The terminal can select a random value within the target speed range and determine it as the i-th initial jump velocity. For example, the target speed range can be 2-5m / s. The i-th jump direction refers to the angle between the target virtual prop and the virtual ground when it jumps. The terminal can select a random value within the target angle range and determine it as the i-th jump direction. For example, the target angle range can be 50°-80°.
[0090] In another possible implementation, since the attack sound effects played by the target virtual prop at each trigger position are the same, that is, they imitate the attack sound effects corresponding to the same virtual weapon, and the attack sound effects played by the target virtual prop may be virtual weapons that require higher stability when used, such as sniper rifles. When users use this type of virtual weapon to attack other target virtual objects, they usually do not move over a large range in a short period of time. To improve the authenticity of the attack sound effects simulated by the target virtual prop, when controlling the target virtual prop to jump, it is necessary to control it to move within a small range. Therefore, the initial velocity and jumping direction of the target virtual prop can be determined according to the weapon type, which may include the following situations:
[0091] 1. In response to the virtual weapon belonging to the first type, the i-th jump initial velocity is determined within a first speed range and the i-th jump direction is determined within a first angle range, the first speed range belongs to the target speed range, and the first angle range belongs to the target angle range.
[0092] When the target virtual item plays an attack sound effect at the first trigger position, the terminal can determine the virtual weapon corresponding to the attack sound effect, thereby determining the weapon type of the virtual weapon. In one possible implementation, the terminal can pre-store a correspondence between different types of virtual weapons. Once the virtual weapon simulated by the target virtual item is determined, the corresponding weapon type can be determined.
[0093] Among them, the first type of virtual weapon refers to a virtual weapon that requires higher stability during use, that is, the first type of virtual weapon requires higher stability during use than the second type of virtual weapon. When using a target virtual prop to simulate this type of virtual weapon, it is necessary to control the target virtual prop to move within a small range. Therefore, it is necessary to determine the i-th initial jump velocity within a smaller speed range and the i-th jump direction within a smaller angle range, so that the position change distance of the target virtual prop after jumping is relatively close. Among them, the i-th initial jump velocity can be determined within a first speed range, wherein the first speed range is a smaller range within the target speed range. In combination with the above example, the first speed range can be 2-3m / s. Similarly, the first angle range is a smaller range within the target angle range, and the first angle range can be 50°-60°.
[0094] In an illustrative example, when the virtual weapon is a sniper rifle, the corresponding weapon type can be determined to be the first type, and a random value is selected in the range of 2-3m / s when determining the initial jumping velocity of the target virtual prop, and a random angle is selected in the range of 50°-60° as the jumping direction when determining the jumping direction.
[0095] 2. In response to the virtual weapon belonging to the second type, the initial velocity of the i-th jump is determined within a second speed range and the i-th jump direction is determined within a second angle range, the second speed range belongs to the target speed range, and the second angle range belongs to the target angle range.
[0096] The second type of virtual weapon requires lower stability during use. When using a target virtual prop to simulate this type of virtual weapon, the target virtual prop can be controlled to move within a larger range. Therefore, the i-th initial jump velocity can be determined within a larger speed range, and the i-th jump direction can be determined within a larger angle range. Specifically, the i-th initial jump velocity can be determined within a second speed range that is greater than the first speed range, and the i-th jump direction can be determined within a second angle range that is greater than the first angle range. In other words, the second speed range is a larger range within the target speed range, for example, 3-5 m / s, and the second angle range is a larger range within the target angle range, for example, 60°-80°.
[0097] Schematically, when the virtual weapon is a rifle, the corresponding weapon type can be determined as the second type, and when determining the initial jumping velocity of the target virtual prop, a random value is selected in the range of 3-5m / s, and when determining the jumping direction, a random angle is selected within 60°-80° as the jumping direction.
[0098] Step 404b: Based on the i-th initial jump velocity and the i-th jump direction, control the target virtual prop to perform the i-th jump.
[0099] The terminal may control the target virtual prop to perform the i-th jump according to the i-th jump initial velocity and the i-th jump direction, thereby moving the target virtual prop to the i+1-th trigger position.
[0100] Indicative, such as Figure 5 As shown, when the target virtual prop is thrown and falls to the first trigger position 501, the terminal controls the target virtual prop to play the attack sound effect at the first trigger position 501, and controls the target virtual prop to jump, so that it moves to the second trigger position 502. Subsequently, the terminal will continue to control the attack sound effect to be played at the second trigger position 502, and control the target virtual prop to jump.
[0101] In this embodiment, by controlling the target virtual prop to play the attack sound effect of the virtual weapon while controlling the target virtual prop to jump, the next trigger position of the target virtual prop is changed, thereby improving the authenticity of the simulated attack using the virtual weapon.
[0102] In this embodiment, the initial jump velocity and jump direction are randomly selected each time, so that the position movement of the target virtual prop is random. When the speed and direction are randomly selected, the selection range can be further determined according to the weapon type of the simulated virtual weapon. Therefore, when simulating virtual weapons with higher stability requirements, the movement range of the target virtual weapon is controlled to be smaller, further improving the authenticity of the simulated attack using virtual weapons.
[0103] Because the target virtual prop bounces within the virtual environment, in this embodiment, a prop icon is displayed at the corresponding display location on the virtual environment screen to alert the user to its real-time location. Furthermore, a removal condition is set for the target virtual prop; when the removal condition is met, the target virtual prop is removed. This is explained below using an exemplary embodiment.
[0104] Please refer to Figure 6 , shows a flowchart of a method for using virtual props provided by another exemplary embodiment of the present application. Figure 1 Taking the first terminal 110 or the second terminal 130 in the implementation environment shown or other terminals in the implementation environment as an example, the method includes the following steps:
[0105] Step 601: Display the prop throwing control.
[0106] Step 602: In response to a trigger operation on a prop throwing control, control the target virtual object to throw the target virtual prop.
[0107] The implementation of steps 601 to 602 may refer to the above-mentioned steps 201 to 202, and this embodiment does not limit the same.
[0108] Step 603: randomly select a target attack sound effect from a sound effect library, where the sound effect library contains an attack sound effect corresponding to at least one virtual weapon.
[0109] In this embodiment, the attack sound effect of the virtual weapon simulated by the target virtual prop can be the attack sound effect corresponding to a random virtual weapon. The terminal pre-stores a sound effect library containing attack sound effects corresponding to different virtual weapons. For example, the attack sound effect of a rifle is a series of gunshots lasting 1 second; the attack sound effect of a light machine gun is a series of gunshots lasting 2 seconds; the attack sound effect of a submachine gun is a series of gunshots lasting 1 second; the attack sound effect of a sniper rifle and a shotgun is a single gunshot, and the corresponding attack sound effects vary depending on the weapon.
[0110] After controlling the target virtual object to throw the target virtual prop, a target attack sound effect may be randomly selected from the sound effect library, and the target attack sound effect may be determined as the attack sound effect subsequently played by the target virtual prop.
[0111] Step 604 : Control the thrown target virtual prop to play a target attack sound effect at least twice, wherein the target virtual prop plays the same attack sound effect each time.
[0112] After selecting the target attack sound effect, the terminal can control the target attack sound effect to be played at each trigger position.
[0113] Step 605: Display a prop identifier at a display position corresponding to the trigger position of the target virtual prop in the virtual environment screen. The prop identifier includes prompt information, which is used to indicate the remaining retention time or the remaining trigger times of the target virtual prop.
[0114] After the target virtual item is thrown, an item identifier is displayed at the display position corresponding to the target virtual item's trigger position in the virtual environment screen to clearly indicate the user's trigger position. Furthermore, when the target virtual item's trigger position changes, the display position of the item identifier will change accordingly. Specifically, when the target virtual item's trigger position is the i-th trigger position, the item identifier's display position is the display position corresponding to the i-th trigger position in the virtual environment screen. When the target virtual item's trigger position is the i+1-th trigger position, the item identifier's display position is the display position corresponding to the i+1-th trigger position in the virtual environment screen.
[0115] Optionally, the prop identification can be displayed in the virtual environment screen in the form of icons, text, models, etc.
[0116] In order to enable the user to further understand the status of the target virtual item, the item identifier will be displayed in different forms when the target virtual item is in different states, which may include the following situations:
[0117] 1. In response to the target virtual item being in a triggered state, displaying the item identifier in a first display format.
[0118] The trigger state refers to a state in which the effect of the target virtual prop is triggered, that is, the target virtual prop is playing the attack sound effect of the virtual weapon and is jumping.
[0119] When the target virtual prop is in the triggered state, the prop identifier may be displayed in the first display form, for example, the prop identifier may be in a shaking state.
[0120] 2. In response to the target virtual item being in a non-triggered state, displaying the item identifier in a second display form.
[0121] The non-trigger state is a state in which the target virtual prop is in a stationary state. In this case, the prop identifier may be displayed in a second display form that is different from the first display form.
[0122] Indicative, such as Figure 7 As shown, when the target virtual prop is in the triggered state, the prop identifier is displayed in the first display form 701, and after being triggered, the target virtual prop moves to another trigger position. At this time, the target virtual prop is in the untriggered state and the prop identifier is displayed in the second display form 702.
[0123] In addition, in this embodiment, users in the same camp can be prompted in the same way, that is, a prop logo is displayed in the virtual environment screen of the client corresponding to the first virtual object, and the first virtual object and the target virtual object belong to the same camp.
[0124] After the terminal obtains the trigger position of the target virtual prop, it can send the trigger position information to the server. The server forwards the trigger position information to the client corresponding to the first virtual object. After receiving the trigger position information, the client corresponding to the first virtual object can display the prop logo at the corresponding position on the virtual environment screen. When the trigger position of the target virtual prop changes, the updated trigger position is sent to the server accordingly. The server forwards the trigger position information, thereby causing the prop logo position in the virtual environment screen of the client corresponding to the first virtual object to change accordingly. The prop logo is only displayed in the virtual environment screen of the client corresponding to the first virtual object, and is not displayed in the virtual environment screen of the client corresponding to the second virtual object. The second virtual object and the target virtual object belong to different camps.
[0125] To further enhance the simulation realism of the target virtual prop, when the target virtual prop plays a virtual weapon attack sound effect, a sound effect identifier can be displayed in the map display control of the client corresponding to the second virtual object. The sound effect identifier is the same as the identifier displayed in the map display control when using a virtual weapon to attack. In other words, the sound effect identifier is used to indicate to users from different factions that there is a virtual object using a virtual weapon to attack at the virtual environment location corresponding to the sound effect identifier. It is only displayed when the target virtual prop plays an attack sound effect. The sound effect identifier is only displayed in the map display control of the client corresponding to the second virtual object and is not displayed in the map display control of the client corresponding to the first virtual object.
[0126] In one possible implementation, after the terminal sends trigger location information to the server, the server can determine the corresponding display position in the map display control based on the trigger location information, and thereby forward the display position to the client corresponding to the second virtual object, so that the client corresponding to the second virtual object displays a sound effect logo at the corresponding display position.
[0127] Indicative, such as Figure 8 As shown, when the target virtual prop triggers the prop effect, a sound effect logo 801 is displayed in the map display control in the client corresponding to the second virtual object, indicating that there is a virtual object at the corresponding position in the virtual environment using a virtual weapon to attack.
[0128] Step 606 : In response to a removal condition being met, the target virtual item is removed from the virtual environment. The removal condition includes at least one of a retention time condition, a trigger count condition, and an item restraint condition.
[0129] In a possible implementation, to ensure game fairness and prevent the target virtual item from continuously triggering the item effect, a removal condition is set for the target virtual item.
[0130] Optionally, when the removal condition is a retention time condition, this step may be implemented as follows:
[0131] In response to the target virtual prop remaining in the virtual environment for a time period greater than a time threshold, it is determined that a removal condition is satisfied, and the target virtual prop is removed from the virtual environment.
[0132] The target virtual item's retention time in the virtual environment can be the time the target virtual item remains in the virtual environment after being thrown to the first trigger position. When the target virtual item lands and comes to rest after being thrown, the terminal can begin counting. When the retention time reaches a time threshold, the terminal removes the target virtual item. For example, the time threshold can be 10 seconds.
[0133] In order to make the user intuitively understand the remaining time of the target virtual props, a corresponding prompt information can be displayed in the props logo to indicate the remaining time. Figure 7 As shown, the remaining time is displayed around the prop logo.
[0134] Optionally, when the removal condition is a trigger count condition, this step may be implemented as follows:
[0135] In response to the triggering times of the target virtual item reaching a quantity threshold, it is determined that a removal condition is satisfied, and the target virtual item is removed from the virtual environment.
[0136] In another possible implementation, a trigger count threshold, or quantity threshold, can be set for the target virtual item. When the target virtual item is triggered three times, the target virtual item's pulsation is stopped and removed from the virtual environment. For example, the quantity threshold can be set to 3. When the target virtual item's item effect is triggered three times, the quantity threshold is determined to have been reached, and the target virtual item is removed from the virtual environment.
[0137] Similarly, when the removal condition is a trigger count condition, a corresponding prompt message can be displayed in the prop identifier to indicate the remaining trigger count.
[0138] Optionally, when the removal condition is an item restraint condition, this step may be implemented as follows:
[0139] In response to the trigger position of the target virtual prop being within the effective range of the virtual restraining prop, it is determined that the removal condition is satisfied, the target virtual prop is removed from the virtual environment, and the virtual restraining prop is used to destroy the target virtual prop.
[0140] In this embodiment, the target virtual prop can be destroyed by the virtual restraining prop, wherein the virtual restraining prop can be used to restrain the throwing virtual prop, and it has a certain range of action. When the throwing virtual prop is within the prop range of the virtual restraining prop, the prop will be destroyed and the prop effect cannot be triggered.
[0141] The virtual restraining item is a item placed by the second virtual object. The target virtual item will be removed only when it is within the effective range of the virtual restraining item placed by the second virtual object. In one possible implementation, because the target virtual item is bouncy, it may not fall within the effective range of the virtual restraining item after being thrown. In this case, the item effect of the target virtual item can be triggered normally. Once the target virtual item bouncy into the effective range of the virtual restraining item, the terminal will remove the target virtual item.
[0142] When the target virtual prop is removed, a second explosion animation may be displayed in the virtual environment screen and removed after the display is completed. The second explosion animation is different from the first explosion animation.
[0143] Indicative, such as Figure 9 As shown, there is a virtual restraining prop 901 placed by the second virtual object in the virtual environment, and the target virtual prop is within the action range 902 of the virtual restraining prop 901, so the target virtual prop needs to be removed.
[0144] Step 607: In response to the target virtual prop being removed, stop displaying the prop identifier.
[0145] When the target virtual prop is removed, the terminal will stop displaying the prop identifier. Accordingly, the server forwards the removal information to the client corresponding to the first object, and the client corresponding to the first virtual object stops displaying the prop identifier in the virtual environment screen.
[0146] In this embodiment, a prop icon is displayed at the corresponding display position of the target virtual prop's trigger position in the virtual environment screen to indicate the target prop's location. Furthermore, this embodiment also provides a removal condition. When the target virtual prop meets the removal condition, it will be removed to prevent the prop's effect from being continuously triggered and affecting the fairness of the game.
[0147] In combination with the above embodiments, in an illustrative example, the process of using a virtual prop is as follows: Figure 10 shown.
[0148] Step 1001: Display the prop throwing control.
[0149] Step 1002 , determining whether a trigger operation for the prop throwing control is received, if so, executing step 1003 .
[0150] Step 1003: Control the target virtual object to throw the target virtual prop.
[0151] Step 1004 : Control the target virtual prop to play the attack sound effect of the virtual weapon at the i-th trigger position and control the target virtual prop to jump.
[0152] Step 1005 , determine whether the removal condition is met, if so, execute step 1006 , if not, execute step 1004 .
[0153] Step 1006: Remove the target virtual item.
[0154] Figure 11 This is a structural block diagram of a device for using virtual props provided by an exemplary embodiment of the present application, the device comprising:
[0155] The first display module 1101 is used to display a prop throwing control, wherein the prop throwing control is used to trigger the throwing of a target virtual prop, and the target virtual prop is used to simulate the attack sound effect of a virtual weapon;
[0156] A first control module 1102 is configured to control a target virtual object to throw the target virtual prop in response to a triggering operation on the prop throwing control;
[0157] The second control module 1103 is used to control the target virtual prop to trigger at least two prop effects after being thrown, wherein the position of the target virtual prop is different when the prop effects are triggered at least twice, and the time when the prop effects are triggered at least twice is different.
[0158] Optionally, the second control module 1103 includes:
[0159] A first control unit, configured to control the target virtual prop to play an attack sound effect of the virtual weapon at an i-th trigger position;
[0160] The second control unit is configured to control the target virtual prop to jump for an i-th time, wherein after the i-th jump, the target virtual prop moves to an (i+1)-th trigger position.
[0161] Optionally, the first control unit is further configured to:
[0162] In response to the duration at the i-th trigger position reaching a duration threshold, the target virtual prop is controlled to play the attack sound effect of the virtual weapon at the i-th trigger position, where the duration threshold is a fixed value, or the duration threshold is a random value within a target duration range.
[0163] Optionally, the second control unit is further configured to:
[0164] Determining an i-th initial jump velocity and an i-th jump direction corresponding to the i-th jump, wherein the i-th initial jump velocity is within a target speed range, and an angle between the i-th jump direction and the virtual ground is within a target angle range;
[0165] Based on the i-th jumping initial velocity and the i-th jumping direction, the target virtual prop is controlled to perform an i-th jumping.
[0166] Optionally, the attack sound effect played by the target virtual prop at each triggering position is the same.
[0167] Optionally, the second control unit is further configured to:
[0168] In response to the virtual weapon being of a first type, determining the i-th initial jump velocity within a first speed range and determining the i-th jump direction within a first angle range, wherein the first speed range belongs to the target speed range and the first angle range belongs to the target angle range;
[0169] In response to the virtual weapon being of a second type, determining the i-th initial jump velocity within a second speed range and determining the i-th jump direction within a second angle range, wherein the second speed range belongs to the target speed range and the second angle range belongs to the target angle range;
[0170] The stability requirement of the first type of virtual weapon during use is higher than that of the second type of virtual weapon, the speed in the first speed range is lower than the speed in the second speed range, and the angle in the first angle range is lower than the angle in the second angle range.
[0171] Optionally, the device further includes:
[0172] A selection module, configured to randomly select a target attack sound effect from a sound effect library, wherein the sound effect library contains an attack sound effect corresponding to at least one virtual weapon;
[0173] The second control module is further configured to:
[0174] The target virtual prop is controlled to play the target attack sound effect at least twice after being thrown, wherein the attack sound effect played by the target virtual prop is the same each time.
[0175] Optionally, the device further includes:
[0176] The removal module is configured to remove the target virtual item from the virtual environment in response to a removal condition being met, wherein the removal condition includes at least one of a retention time condition, a trigger count condition, and an item restraint condition.
[0177] Optionally, the removal condition is the retention time condition, and the removal module is further configured to:
[0178] In response to the target virtual item remaining in the virtual environment for a time period greater than a time threshold, determining that the removal condition is satisfied, and removing the target virtual item from the virtual environment;
[0179] or,
[0180] The removal condition is the triggering number condition, and the removal module is further configured to:
[0181] In response to the triggering number of the target virtual item reaching a quantity threshold, determining that the removal condition is satisfied, and removing the target virtual item from the virtual environment;
[0182] or,
[0183] The removal condition is the item restraint condition, and the removal module is further used to:
[0184] In response to the trigger position of the target virtual prop being within the effective range of the virtual restraining prop, it is determined that the removal condition is satisfied, and the target virtual prop is removed from the virtual environment. The virtual restraining prop is used to destroy the target virtual prop.
[0185] Optionally, the device further includes:
[0186] The second display module is used to display the prop identifier at a display position corresponding to the trigger position of the target virtual prop in the virtual environment screen, and the prop identifier includes prompt information, and the prompt information is used to indicate the remaining retention time or the remaining number of triggers of the target virtual prop.
[0187] Optionally, the second display module includes:
[0188] A first display unit, configured to display the item identifier in a first display form in response to the target virtual item being in a triggered state;
[0189] a second display unit, configured to display the item identifier in a second display form in response to the target virtual item being in a non-triggered state;
[0190] The device further comprises:
[0191] The display stopping module is configured to stop displaying the item identifier in response to the target virtual item being removed.
[0192] Optionally, the prop identifier is displayed in the virtual environment screen in the client corresponding to the first virtual object, and the sound effect identifier is displayed in the map display control in the client corresponding to the second virtual object. The sound effect identifier is displayed when the target virtual prop plays the attack sound effect. The first virtual object and the target virtual object belong to the same camp, and the second virtual object and the target virtual object belong to different camps.
[0193] To sum up, in an embodiment of the present application, a target virtual prop is provided, which can simulate the attack sound effects of virtual weapons, and can control the target virtual props at different positions to trigger the prop effects, so that the target virtual props can simulate the attack sound effects of virtual weapons at different positions at different times, thereby improving the authenticity of the simulated user controlling the target virtual object to use the virtual weapon to attack, thereby reducing the probability of the user leaking position information when using the virtual weapon, helping to improve the success rate of the battle, and thus increasing the usage rate of the virtual weapon.
[0194] Please refer to Figure 12, which shows a block diagram of a terminal 1200 provided in an exemplary embodiment of the present application. The terminal 1200 may be a portable mobile terminal, such as a smartphone, tablet computer, MP3 player, or MP4 player. The terminal 1200 may also be referred to as user equipment, portable terminal, or other names.
[0195] Typically, the terminal 1200 includes a processor 1201 and a memory 1202 .
[0196] Processor 1201 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 1201 may be implemented in at least one of the following hardware forms: digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). Processor 1201 may also include a main processor and a coprocessor. The main processor is used to process data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1201 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing content required to be displayed on the display screen. In some embodiments, processor 1201 may also include an artificial intelligence (AI) processor, which is used to handle computational operations related to machine learning.
[0197] Memory 1202 may include one or more computer-readable storage media, which may be tangible and non-transitory. Memory 1202 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in memory 1202 is used to store at least one instruction, which is used to be executed by processor 1201 to implement the method provided in the embodiments of the present application.
[0198] In some embodiments, the terminal 1200 may further optionally include a peripheral device interface 1203 and at least one peripheral device, such as a radio frequency circuit, a touch screen display, and a power supply.
[0199] Those skilled in the art will understand that Figure 12The structure shown in the figure does not constitute a limitation on the terminal 1200, and the terminal 1200 may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0200] An embodiment of the present application further provides a computer-readable storage medium storing at least one instruction, wherein the at least one instruction is loaded and executed by the processor to implement the method for using the virtual props as described in the above embodiments.
[0201] According to one aspect of the present application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a terminal reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the terminal to perform the method for using a virtual item provided in various optional implementations of the aforementioned aspects.
[0202] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable storage medium or transmitted as one or more instructions or codes on a computer-readable storage medium. Computer-readable storage media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0203] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for using a virtual prop, characterized in that, the method includes: displaying a prop throwing control, where the prop throwing control is used to trigger the throwing of a target virtual prop, and the target virtual prop is used to simulate the attack sound effect of a virtual weapon; responding to a trigger operation on the prop throwing control, controlling the target virtual object to throw the target virtual prop; controlling the target virtual prop after throwing to trigger at least two prop effects, where when at least two of the prop effects are triggered, the positions of the target virtual prop are different, and the times when at least two of the prop effects are triggered are different; and, at the display position corresponding to the trigger position of the target virtual prop in the virtual environment screen, if the target virtual prop is in a triggered state, the prop identifier is displayed in a first display form, and if the target virtual prop is in a non-triggered state, the prop identifier is displayed in a second display form; the prop identifier contains prompt information, and the prompt information is used to indicate the remaining retention time or the remaining number of trigger times of the target virtual prop, and the display position of the prop identifier changes with the change of the trigger position of the target virtual prop; the prop identifier is displayed in the virtual environment screen of the client corresponding to the first virtual object, the prop identifier is not displayed in the virtual environment screen of the client corresponding to the second virtual object, and an audio effect identifier is displayed in the map display control of the client corresponding to the second virtual object, and the audio effect identifier is displayed when the target virtual prop plays the attack sound effect, and the audio effect identifier is the same as the identifier displayed in the map display control when using a virtual weapon to attack. The first virtual object and the target virtual object belong to the same camp, and the second virtual object and the target virtual object belong to different camps.
2. The method according to claim 1, characterized in that, the controlling the target virtual prop after throwing to trigger at least two prop effects includes: controlling the target virtual prop to play the attack sound effect of the virtual weapon at the i-th trigger position; controlling the target virtual prop to make the i-th jump, where after the i-th jump, the target virtual prop moves to the (i + 1)-th trigger position.
3. The method according to claim 2, characterized in that, the controlling the target virtual prop to play the attack sound effect of the virtual weapon at the i-th trigger position includes: responding to the duration at the i-th trigger position reaching a duration threshold, controlling the target virtual prop to play the attack sound effect of the virtual weapon at the i-th trigger position, where the duration threshold is a fixed value, or the duration threshold is a random value within a target duration range.
4. The method according to claim 2, characterized in that, the controlling the target virtual prop to make the i-th jump includes: determining the i-th jump initial velocity and the i-th jump direction corresponding to the i-th jump, where the i-th jump initial velocity is within a target velocity range, and the angle between the i-th jump direction and the virtual ground is within a target angle range; based on the i-th jump initial velocity and the i-th jump direction, controlling the target virtual prop to make the i-th jump.
5. The method according to claim 4, It is characterized in that The attack sound effect played by the target virtual prop at each trigger position is the same, and determining the i-th jumping initial velocity and the i-th jumping direction corresponding to the i-th jumping includes: In response to the weapon type of the virtual weapon belonging to the first type, determining the i-th jumping initial velocity within a first speed range and determining the i-th jumping direction within a first angle range, the first speed range belonging to the target speed range, and the first angle range belonging to the target angle range; In response to the weapon type of the virtual weapon belonging to the second type, determining the i-th jumping initial velocity within a second speed range and determining the i-th jumping direction within a second angle range, the second speed range belonging to the target speed range, and the second angle range belonging to the target angle range; Among them, the stability requirement of the first type of virtual weapon when in use is higher than that of the second type of virtual weapon, the speed in the first speed range is smaller than the speed in the second speed range, and the angle in the first angle range is smaller than the angle in the second angle range.
6. The method according to any one of claims 1 to 5, It is characterized in that After controlling the target virtual object to throw the target virtual prop, the method further includes: Randomly selecting a target attack sound effect from a sound effect library, wherein the sound effect library contains an attack sound effect corresponding to at least one virtual weapon; The controlling of the target virtual prop after throwing triggers the prop effect at least twice, including: The target virtual prop after being thrown is controlled to play the target attack sound effect at least twice, wherein the attack sound effect played by the target virtual prop each time is the same.
7. The method according to any one of claims 1 to 5, It is characterized in that After the target virtual prop after the throwing is controlled to trigger the prop effect at least twice, the method further includes: In response to satisfying a removal condition, the target virtual item is removed from the virtual environment, wherein the removal condition includes at least one of a retention time condition, a triggering number condition, and an item restraint condition.
8. The method according to claim 7, It is characterized in that The removal condition is the retention time condition, and in response to satisfying the removal condition, removing the target virtual item from the virtual environment includes: In response to the target virtual prop remaining in the virtual environment for a time period greater than a time threshold, determining that the removal condition is satisfied, and removing the target virtual prop from the virtual environment; or, The removal condition is the triggering number condition, and in response to satisfying the removal condition, removing the target virtual item in the virtual environment includes: In response to the triggering times of the target virtual item reaching a quantity threshold, determining that the removal condition is satisfied, and removing the target virtual item from the virtual environment; or, The removal condition is the item restraint condition, and in response to satisfying the removal condition, removing the target virtual item in the virtual environment includes: In response to the trigger position of the target virtual prop being within the action range of the virtual restraining prop, it is determined that the removal condition is satisfied, and the target virtual prop is removed from the virtual environment, the virtual restraining prop being used to destroy the target virtual prop.
9. The method according to claim 1, It is characterized in that The method further comprises: In response to the target virtual prop being removed, the prop identifier is stopped from being displayed.
10. A device for using a virtual item, It is characterized in that The device comprises: A first display module is used to display a prop throwing control, wherein the prop throwing control is used to trigger a throwing target virtual prop, and the target virtual prop is used to simulate the attack sound effect of a virtual weapon; A first control module, configured to control a target virtual object to throw the target virtual prop in response to a trigger operation on the prop throwing control; A second control module is used to control the target virtual prop after being thrown to trigger the prop effect at least twice, wherein the position of the target virtual prop is different when the prop effect is triggered at least twice, and the time when the prop effect is triggered at least twice is different; and A second display module includes a first display unit and a second display unit; The first display unit is used to display a prop identifier in a first display form at a display position corresponding to the trigger position of the target virtual prop in the virtual environment screen, if the target virtual prop is in a triggered state; the prop identifier includes prompt information, the prompt information is used to indicate the remaining retention time or the remaining number of triggers of the target virtual prop, and the display position of the prop identifier changes with the change of the trigger position of the target virtual prop; The second display unit is used to display the prop identifier in a second display form at a display position corresponding to the trigger position of the target virtual prop in the virtual environment screen if the target virtual prop is in a non-triggered state; The prop logo is displayed in the virtual environment screen of the client corresponding to the first virtual object, the prop logo is not displayed in the virtual environment screen of the client corresponding to the second virtual object, and a sound effect logo is displayed in the map display control of the client corresponding to the second virtual object, the sound effect logo is displayed when the target virtual prop plays the attack sound effect, the sound effect logo is the same as the logo displayed in the map display control when using a virtual weapon to attack, the first virtual object and the target virtual object belong to the same camp, and the second virtual object and the target virtual object belong to different camps.
11. The device according to claim 10, It is characterized in that The second control module includes: A first control unit, used for controlling the target virtual prop to play the attack sound effect of the virtual weapon at the i-th trigger position; The second control unit is used to control the target virtual prop to jump for the i-th time, wherein after the i-th jump, the target virtual prop moves to the (i+1)th trigger position.
12. The device according to claim 11, It is characterized in that The first control unit is further configured to: In response to the duration at the i-th trigger position reaching a duration threshold, the target virtual prop is controlled to play the attack sound effect of the virtual weapon at the i-th trigger position, and the duration threshold is a fixed value, or the duration threshold is a random value within a target duration range.
13. The device according to claim 11, It is characterized in that The second control unit is further used for: Determine an i-th jumping initial velocity and an i-th jumping direction corresponding to the i-th jumping, wherein the i-th jumping initial velocity is within a target velocity range, and an angle between the i-th jumping direction and the virtual ground is within a target angle range; Based on the i-th jumping initial velocity and the i-th jumping direction, the target virtual prop is controlled to perform an i-th jumping.
14. The device according to claim 13, It is characterized in that The second control unit is further used for: In response to the weapon type of the virtual weapon belonging to the first type, determining the i-th jumping initial velocity within a first speed range and determining the i-th jumping direction within a first angle range, the first speed range belonging to the target speed range, and the first angle range belonging to the target angle range; In response to the weapon type of the virtual weapon belonging to the second type, determining the i-th jumping initial velocity within a second speed range and determining the i-th jumping direction within a second angle range, the second speed range belonging to the target speed range, and the second angle range belonging to the target angle range; Among them, the stability requirement of the first type of virtual weapon when in use is higher than that of the second type of virtual weapon, the speed in the first speed range is smaller than the speed in the second speed range, and the angle in the first angle range is smaller than the angle in the second angle range.
15. The device according to any one of claims 10 to 14, It is characterized in that The device also includes: A selection module, used to randomly select a target attack sound effect from a sound effect library, wherein the sound effect library contains an attack sound effect corresponding to at least one virtual weapon; The second control module is further used for: The target virtual prop after being thrown is controlled to play the target attack sound effect at least twice, wherein the attack sound effect played by the target virtual prop each time is the same.
16. The device according to any one of claims 10 to 14, It is characterized in that The device also includes: The removal module is used to remove the target virtual prop in the virtual environment in response to meeting the removal condition, wherein the removal condition includes at least one of a retention time condition, a trigger number condition, and a prop restraint condition.
17. The device according to claim 16, It is characterized in that The removal condition is the retention time condition, and the removal module is further used for: In response to the target virtual prop remaining in the virtual environment for a time period greater than a time threshold, determining that the removal condition is satisfied, and removing the target virtual prop from the virtual environment; or, The removal condition is the triggering number condition, and the removal module is further used for: In response to the triggering times of the target virtual item reaching a quantity threshold, determining that the removal condition is satisfied, and removing the target virtual item from the virtual environment; or, The removal condition is the item restraint condition, and the removal module is further used for: In response to the trigger position of the target virtual prop being within the action range of the virtual restraining prop, it is determined that the removal condition is satisfied, and the target virtual prop is removed from the virtual environment, the virtual restraining prop being used to destroy the target virtual prop.
18. The device according to claim 10, It is characterized in that The device also includes: The display stopping module is used to stop displaying the prop identifier in response to the target virtual prop being removed.
19. A terminal, It is characterized in that The terminal includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method for using the virtual props as described in any one of claims 1 to 9.
20. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method for using the virtual props as described in any one of claims 1 to 9.
21. A computer program product, It is characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. The processor of the terminal reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the method for using the virtual props as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Virtual object control method, device and equipment and storage medium
CN112245917A