Virtual object controlling method, device, equipment and storage medium
Patent Information
- Authority / Receiving Office
- HK · HK
- Patent Type
- Patents
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2023-05-30
- Publication Date
- 2026-07-17
AI Technical Summary
In existing technologies, applications or AI have poor control over virtual objects, with a high degree of randomness in the hit rate, making accurate control impossible.
By obtaining the attribute values of the target object, the attack effect parameters of the virtual object, such as hit rate and damage value, are dynamically adjusted based on the attribute values, thereby controlling the virtual object to perform attack actions.
It improves the flexibility and accuracy of attacks on target objects by virtual objects, and enhances the control that applications or AI have over virtual objects.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of virtual scene technology, and in particular to a virtual object control method, apparatus, device and storage medium. Background Technology
[0002] In applications with virtual scenes, to enrich the interaction between virtual objects and the virtual scene, virtual objects controlled by the application or AI (Artificial Intelligence) objects are usually set up in the virtual scene to attack the user-controlled virtual objects in the virtual scene. For example, AI-controlled machine guns, bows and arrows, etc. can be set up in the virtual scene.
[0003] In related technologies, applications or AI obtain the location of a target object in a virtual scene and randomly execute attack actions on the target object within a certain range centered on the target object's location. The hit rate of the application or AI can be adjusted by changing the size of this range.
[0004] However, the aforementioned technologies, which adjust the hit rate of the application or AI by adjusting the size of the range determined by the location of the target prop, are highly random. The application or AI cannot accurately control the virtual object, resulting in poor control performance. Summary of the Invention
[0005] This application provides a virtual object control method, apparatus, device, and storage medium, which can improve the accuracy of application programs or AI in controlling virtual objects. The technical solution is as follows:
[0006] On the one hand, a method for controlling virtual objects is provided, the method comprising:
[0007] In response to a first virtual object in a virtual scene being in a state of launching an attack on a target object, a first attribute value of the target object is obtained; the first virtual object is a non-user-controlled virtual object, and the first attribute value is used to indicate the health status of the target object in the virtual scene;
[0008] Based on the first attribute value, the effect attribute parameters of the first virtual object are obtained; the effect attribute parameters are used to indicate the attack effect of the first virtual object on the target object;
[0009] Based on the effect attribute parameters, the first virtual object is controlled to perform an attack action against the target object.
[0010] On the other hand, a virtual object control device is provided, the device comprising:
[0011] The first attribute value acquisition module is used to acquire the first attribute value of the target object in response to the first virtual object in the virtual scene being in a state of launching an attack on the target object; the first virtual object is a non-user-controlled virtual object, and the first attribute value is used to indicate the health status of the target object in the virtual scene;
[0012] The attribute parameter acquisition module is used to acquire the effect attribute parameters of the first virtual object based on the first attribute value; the effect attribute parameters are used to indicate the attack effect of the first virtual object on the target object;
[0013] The attack module is used to control the first virtual object to perform an attack action against the target object based on the effect attribute parameters.
[0014] In one possible implementation, the attack effect of the first virtual object on the target object includes at least one of the hit rate of the first virtual object on the target object and the damage value of the first virtual object on the target object.
[0015] In one possible implementation, the response to the attack effect of the first virtual object on the target object is the hit rate of the first virtual object on the target object; the attribute parameter acquisition module includes:
[0016] The first hit rate coefficient determination submodule is used to determine the first hit rate coefficient of the first virtual object based on the first attribute value; the first hit rate coefficient is positively correlated with the first attribute value;
[0017] The hit rate adjustment submodule is used to adjust the initial hit rate of the first virtual object to the target object based on the first hit rate coefficient, so as to obtain the current hit rate of the first virtual object to the target object.
[0018] In one possible implementation, the device further includes:
[0019] The second attribute value acquisition module is used to acquire the second attribute value of the target object, the second attribute value being used to indicate the lateral movement speed of the target object relative to the first virtual object;
[0020] The attribute parameter acquisition module includes:
[0021] The second hit rate coefficient determination submodule is used to determine the second hit rate coefficient of the first virtual object based on the second attribute value; the second hit rate coefficient is negatively correlated with the second attribute value;
[0022] The hit rate adjustment submodule is used to adjust the initial hit rate of the first virtual object to the target object based on the first hit rate and the second hit rate coefficient, and to obtain the current hit rate of the first virtual object to the target object.
[0023] In one possible implementation, the device further includes:
[0024] The level parameter acquisition module is used to acquire the level parameters of the first virtual object;
[0025] The initial hit rate determination module is used to determine the initial hit rate of the first virtual object based on the level parameter of the first virtual object; the initial hit rate of the first virtual object is positively correlated with the level parameter of the first virtual object.
[0026] In one possible implementation, the response to the attack effect of the first virtual object on the target object is the damage value of the first virtual object on the target object; the attribute parameter acquisition module includes:
[0027] The damage value coefficient acquisition module is used to acquire the damage value coefficient of the first virtual object based on the first attribute value of the target object; the damage value coefficient is positively correlated with the first attribute value;
[0028] The damage value adjustment module is used to adjust the initial damage value of the first virtual object based on the damage value coefficient, so as to obtain the current damage value of the first virtual object to the target object.
[0029] In one possible implementation, the device further includes:
[0030] The level parameter acquisition module is used to acquire the level parameters of the first virtual object;
[0031] The initial damage value acquisition module is used to determine the initial damage value of the first virtual object based on the level parameter of the first virtual object; the initial damage value of the first virtual object is positively correlated with the level parameter of the first virtual object.
[0032] In one possible implementation, the attack module includes:
[0033] The random number generation submodule is used to generate random numbers;
[0034] The attack direction determination submodule is used to determine the attack direction of the attack action performed by the first virtual object based on the relationship between the random number and the current hit rate.
[0035] The attack submodule is used to control the first virtual object to perform an attack action against the target object based on the attack direction.
[0036] In one possible implementation, the attack direction determination submodule is used for,
[0037] In response to the random number being less than or equal to the current hit rate, the attack direction of the attack action performed by the first virtual object is controlled to be directed toward the target object;
[0038] In response to the random number being greater than the current hit rate, the attack direction of the attack action performed by the first virtual object is controlled to deviate from the target object.
[0039] In one possible implementation, the first virtual object has an angle adjustment speed and an attack time interval; the attack submodule is used for,
[0040] In response to the attack time interval, the first virtual object moves towards the attack direction based on the current direction after the angle adjustment speed adjustment, and controls the first virtual object to attack in the attack direction;
[0041] In response to the attack time interval, if the first virtual object, after adjusting its current direction based on the angle and speed, is not facing the attack direction, the first virtual object is controlled to attack in the current direction.
[0042] In one possible implementation, the target object is a user-controlled virtual object in the virtual scene.
[0043] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement the above-described virtual object control method.
[0044] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored therein, wherein 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 virtual object control method described above.
[0045] On the other hand, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the virtual object control method provided in the various optional implementations described above.
[0046] The technical solution provided in this application may include the following beneficial effects:
[0047] When a non-user-controlled first virtual object in a virtual scene is in an attack state against a target object, the attack effect corresponding to the first virtual object can be adjusted based on the first attribute value of the target object. The attack is then carried out based on the adjusted attack effect, so that the attack effect of the first virtual object against the target object can change with the change of the first attribute value of the target object. This improves the flexibility of the attack effect of the first virtual object against the target object and improves the accuracy of the application or AI's control over the first virtual object.
[0048] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0049] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0050] Figure 1 This is a schematic diagram of the display interface of a virtual scene according to an exemplary embodiment;
[0051] Figure 2 This is a schematic diagram illustrating the structure of a virtual scene service system according to an exemplary embodiment of this application;
[0052] Figure 3 A flowchart illustrating a virtual object control method according to an embodiment of this application is shown;
[0053] Figure 4 A flowchart illustrating a virtual object control method according to an exemplary embodiment of this application is shown;
[0054] Figure 5 This illustration shows a schematic diagram illustrating the exponential relationship between a first hit rate coefficient and a first attribute value, as shown in an exemplary embodiment of this application.
[0055] Figure 6 A schematic diagram illustrating the lateral movement speed of a target object according to an exemplary embodiment of this application is shown;
[0056] Figure 7 A schematic diagram illustrating the lateral movement speed of a target object according to an exemplary embodiment of this application is shown;
[0057] Figure 8 This illustration shows a schematic diagram illustrating the exponential relationship between the second hit rate coefficient and the second attribute value, as shown in an exemplary embodiment of this application.
[0058] Figure 9 This invention provides a schematic diagram illustrating the relationship between the rating parameter and the initial hit rate, as shown in an exemplary embodiment of this application.
[0059] Figure 10 This illustration shows a schematic diagram illustrating the linear relationship between the damage value coefficient and the first attribute value, as shown in an exemplary embodiment of this application.
[0060] Figure 11 This invention provides a schematic diagram illustrating the relationship between the level parameter and the initial damage value, as shown in an exemplary embodiment of this application.
[0061] Figure 12 A flowchart illustrating a virtual object control method according to an exemplary embodiment of this application is shown;
[0062] Figure 13 A block diagram of a virtual object control device illustrated in an exemplary embodiment of this application is shown;
[0063] Figure 14 This is a structural block diagram of a computer device according to an exemplary embodiment;
[0064] Figure 15 This is a structural block diagram of a computer device according to an exemplary embodiment. Detailed Implementation
[0065] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0066] In virtual scenarios, virtual objects controlled by applications or AI are often set up to attack or interact with user-controlled virtual objects. When applications or AI control virtual objects to attack user-controlled virtual objects, they often employ random attacks within a certain attack range, resulting in poor control over the virtual objects. To improve the control effect of applications or AI over virtual objects and enrich the attack capabilities of applications or AI in virtual scenarios, this application provides a virtual object control method. The virtual scenario in this application refers to a computer-generated virtual environment that provides a multimedia virtual world. Users can control operable virtual objects in the virtual scenario through operating devices or interfaces, observing objects, characters, and scenery from the perspective of virtual objects, or interacting with virtual objects and objects, characters, scenery, or other virtual objects in the virtual scenario. For example, users can operate a virtual soldier to attack a target enemy.
[0067] Virtual scenes are typically generated by applications on computer devices such as terminals and displayed based on the hardware (such as a screen) of those terminals. These terminals can be mobile devices such as smartphones, tablets, or e-readers; alternatively, they can be personal computer devices such as laptops or stationary computers. Virtual scenes can be three-dimensional or two-dimensional. Taking a three-dimensional virtual scene as an example... Figure 1 This is a schematic diagram illustrating the display interface of a virtual scene according to an exemplary embodiment. For example... Figure 1 As shown, the virtual scene display interface 100 includes a virtual object 110, a three-dimensional virtual scene environment screen 120, at least one set of virtual control buttons 130, and a virtual object 140. The virtual object 110 can be the currently controlled object of the user account corresponding to the terminal, and the virtual control buttons 130 are optional control elements, meaning the user can manipulate the virtual object 110 through the virtual control buttons 130. The virtual object 140 can be a non-user-controlled object, meaning it is controlled by an application or AI, or it can be a virtual object controlled by a user account corresponding to another terminal. The user can interact with the virtual object 140 by controlling the virtual object 110, for example, by controlling the virtual object 110 to attack the virtual object 140.
[0068] exist Figure 1 In this context, virtual objects 110 and 140 are 3D models within a 3D virtual scene. The 3D virtual scene environment displayed on the display interface 100 represents the objects observed from the perspective of virtual object 110. For example, ... Figure 1As shown, from the perspective of the virtual object 110, the displayed environment 120 of the three-dimensional virtual scene consists of the land 124, the sky 125, the horizon 123, the hills 121, and the factory buildings 122.
[0069] Virtual object 110 can be moved instantly under the user's control, for example, Figure 1 The virtual control button 130 shown is a virtual button used to control the movement of the virtual object 110. When the user touches the virtual control button 130, the virtual object 110 can move in the virtual scene towards the center of the touch point relative to the virtual control button 130.
[0070] A virtual object refers to an movable object in a virtual scene. This movable object can be at least one of a virtual character, a virtual animal, or an anime character. Optionally, when the virtual scene is a three-dimensional virtual scene, the virtual object can be a three-dimensional model. Each virtual object has its own shape and volume in the three-dimensional virtual scene and occupies a portion of the space within the three-dimensional virtual scene. Optionally, a virtual character is a three-dimensional character constructed based on three-dimensional human skeleton technology, and this virtual character achieves different external appearances by wearing different skins. In some implementations, the virtual character can also be implemented using a 2.5D or 2D model; this application does not limit this aspect.
[0071] Figure 2 This is a schematic diagram illustrating the structure of a virtual scene service system according to an exemplary embodiment of this application, such as... Figure 2 As shown, the system includes: a terminal 210 and a server 220;
[0072] Among them, terminal 210 can be the control terminal of the virtual object in the embodiments of this application. Terminal 210 can be a mobile phone, tablet computer, e-book reader, smart glasses, smart watch, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), etc.
[0073] Server 220 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0074] The terminal and the server are connected via a communication network. Optionally, the communication network can be a wired network or a wireless network.
[0075] Optionally, the system may also include a management device 230 (not shown in the figure), which is connected to the server 220 via a communication network. Optionally, the communication network may be a wired network or a wireless network.
[0076] Optionally, the aforementioned wireless or wired networks use standard communication technologies and / or protocols. The network is typically the Internet, but can also be any network, including but not limited to Local Area Networks (LANs), Metropolitan Area Networks (MANs), Wide Area Networks (WANs), mobile, wired or wireless networks, private networks, or any combination of virtual private networks. In some embodiments, technologies and / or formats, including Hyper Text Markup Language (HTML), Extensible Markup Language (XML), etc., are used to represent data exchanged over the network. Furthermore, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Networks (VPNs), and Internet Protocol Security (IPsec) can be used to encrypt all or some links. In other embodiments, custom and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.
[0077] Figure 3 A flowchart illustrating a virtual object control method according to an embodiment of this application is shown. This method can be executed by a computer device, which may be a server or a terminal. Schematic, the computer device can be implemented as follows: Figure 2 The server or terminal shown, such as Figure 3 As shown, the virtual object control method may include the following steps:
[0078] Step 310: In response to the first virtual object in the virtual scene being in a state of launching an attack on the target object, obtain the first attribute value of the target object; the first virtual object is a non-user-controlled virtual object, and the first attribute value is used to indicate the health status of the target object in the virtual scene.
[0079] The target object is the object that triggers the first virtual object to enter the attack state. The target object can trigger the first virtual object to enter the attack state in different ways. For example, the target object triggers the first virtual object to enter the attack state when it enters the attack range corresponding to the first virtual object; or, the target object triggers the first virtual object to enter the attack state when it performs a specified action in the virtual scene. For example, the specified action can be to trigger the function switch of the first virtual object; or, the target object completes a specified task in the virtual scene, such as destroying other control props set in front of the first virtual object, etc.
[0080] The target object can be a virtual object controlled by the user in a virtual scene, or a virtual vehicle controlled by the user, or a virtual summon controlled by the user, etc.; wherein, the target object has a first attribute value, which is used to indicate the health status of the target object in the virtual scene. For a virtual object controlled by the user, the first attribute value is used to indicate whether the virtual object has been eliminated; for a virtual vehicle controlled by the user, or a virtual summon controlled by the user, the first attribute value is used to indicate whether the virtual vehicle or virtual summon has been destroyed.
[0081] In one possible implementation, the first virtual object is controlled by an application or AI to indiscriminately attack target objects in the virtual scene that trigger it to enter an attack state.
[0082] Step 320: Based on the first attribute value, obtain the effect attribute parameter of the first virtual object; the effect attribute parameter is used to indicate the attack effect of the first virtual object on the target object.
[0083] The first attribute value of the target object is a variable numerical value. As the first attribute value changes, the effect attribute parameters of the first virtual object determined based on it will also change accordingly.
[0084] The first virtual object has an initial attack effect on the target object. In this embodiment, the initial attack effect can be dynamically adjusted based on the first attribute value of the target object, so that the first virtual object can exert different attack effects depending on the target object. For example, when the attack method of the first virtual object is to attack using a virtual prop that requires aiming during use, the effect attribute parameter can be used to adjust the aiming effect controlled by the first virtual object, thereby affecting the attack effect of the first virtual object on the target object.
[0085] Step 330: Based on the effect attribute parameters, control the first virtual object to perform an attack action against the target object.
[0086] In this embodiment, the application or AI can control the first virtual object to attack the target object through its own actions, or it can control the first virtual object to attack the target object using virtual props, such as using virtual shooting props, virtual bows and arrows, virtual grenades, etc. to attack the target object.
[0087] In summary, the virtual object control method provided in this application embodiment can adjust the attack effect corresponding to the first virtual object based on the first attribute value of the target object when the first virtual object in the virtual scene is in an attack state against the target object. The attack is then carried out based on the adjusted attack effect, so that the attack effect of the first virtual object against the target object can change with the change of the first attribute value of the target object. This improves the flexibility of the attack effect of the first virtual object against the target object and improves the accuracy of the application or AI's control over the first virtual object.
[0088] In this embodiment, the first virtual object can attack the target object using a virtual prop that needs to be aimed during the attack. The corresponding attack effect can include at least one of the first virtual object's hit rate against the target object and the damage value of the first virtual object against the target object. In this case, the first attribute value of the target object can affect the first virtual object's hit rate and / or damage value. For example, if the first attribute value of the target object can affect the first virtual object's hit rate and damage value... Figure 4 A flowchart illustrating a virtual object control method according to an exemplary embodiment of this application is shown. This virtual object control method can be executed by a computer device, which can be implemented as follows: Figure 2 The server or terminal shown, such as Figure 4 As shown, the virtual object control method may include the following steps:
[0089] Step 410: In response to the first virtual object in the virtual scene being in a state of launching an attack on the target object, obtain the first attribute value of the target object; the first virtual object is a non-user-controlled virtual object, and the first attribute value is used to indicate the health status of the target object in the virtual scene.
[0090] The target object can be the object that triggers the first virtual object to enter the attack state. There can be one or more objects that trigger the first virtual object to enter the attack state. When the number of objects that trigger the first virtual object to enter the attack state is 1, the object is determined to be the target object. When the number of objects that trigger the first virtual object to enter the attack state is greater than 1, one of the multiple objects can be determined as the target object. For example, the distance between at least two objects and the first virtual object can be obtained respectively, and the object that is closest to the first virtual object among the at least two objects can be determined as the target object. Alternatively, one of the at least two objects can be randomly selected as the target object.
[0091] Alternatively, in another possible implementation, all objects that trigger the first virtual object to enter the attack state can be obtained as target objects. The above steps are implemented as follows: in response to the first virtual object in the virtual scene being in the state of launching an attack on the target object, the first attribute value of each target object is obtained respectively.
[0092] In one possible implementation, the target object is an object controlled by the user in a virtual scene. That is, the virtual object control method provided in this application embodiment can be applied to scenarios where users interact with AI. It should be understood that the virtual object control method provided in this embodiment can also be applied to scenarios where AI interacts with AI.
[0093] Step 420: Determine the first hit rate coefficient of the first virtual object based on the first attribute value.
[0094] The first attribute value is used to indicate the health status of the target object in the virtual scene, and to confirm whether the target object has been eliminated or destroyed. When the target object is attacked, the first attribute value will decrease. For example, the first attribute value can be implemented as the target object's health points.
[0095] When there is only one target object, the effect attribute parameters of the first virtual object are determined based on the first attribute value of the target object.
[0096] When there are multiple target objects, the effect attribute parameters of the first virtual object can be determined based on the average, maximum, minimum, or median of the first attribute values of the multiple target objects, i.e., the hit rate and / or damage value of the first virtual object. Specifically, the hit rate and damage value of the first virtual object can be determined based on values obtained by performing the same or different processing on the first attribute values of the multiple target objects. For example, the hit rate and damage value of the first virtual object can both be determined based on the average / maximum / minimum / median of the first attribute values of the multiple target objects; or, the hit rate of the first virtual object can be determined based on the average of the first attribute values of the multiple target objects; the damage value of the first virtual object can be determined based on the maximum of the first attribute values of the multiple target objects, and so on. This application does not impose any limitations on this.
[0097] In this embodiment of the application, the adjustment of the hit rate of the first virtual object to the target object based on the first attribute value of the target object can be implemented by obtaining a first hit rate coefficient for weighting the hit rate through the first attribute value of the target object, and adjusting the value of the hit rate based on the first hit rate coefficient, wherein the first hit rate coefficient is positively correlated with the first attribute value.
[0098] To illustrate, the positive correlation between the first hit rate coefficient and the first attribute value can be represented by a mathematical function. This mathematical formula can be constructed by developers based on actual needs. To illustrate, the first hit rate coefficient can decrease exponentially as the first attribute value decreases. Figure 5 This illustration shows a schematic diagram illustrating the exponential relationship between a first hit rate coefficient and a first attribute value, as shown in an exemplary embodiment of this application. Figure 5 As shown, the horizontal axis represents the first attribute value, and the vertical axis represents the first hit coefficient. The first hit coefficient increases exponentially with the increase of the first attribute value and decreases exponentially with the decrease of the first attribute value. When the value of the first attribute of the target object is the maximum, the first hit coefficient is 1. That is to say, the value range of the first hit coefficient is (0, 1]. When the value of the first attribute of the target object is 0, it is confirmed that the target object has been eliminated or destroyed, and the target object does not affect the first hit coefficient.
[0099] Step 430: Obtain the second attribute value of the target object.
[0100] The target object also has a second attribute value. In one possible implementation, the attack effect of the first virtual object on the target object is related not only to the first attribute value of the target object but also to the second attribute value of the target object, which indicates the lateral movement speed of the target object relative to the first virtual object. (Illustrative example) Figure 6 A schematic diagram illustrating the lateral movement speed of a target object in an exemplary embodiment of this application is shown, such as... Figure 6 As shown, when the target object and the first virtual object are on the same plane in the virtual scene, the direction of the lateral movement speed of the target object 610 relative to the first virtual object 620 is the tangent direction at the corresponding position point of the target object on a circle with the first virtual object 620 as the center and the distance between the target object 610 and the first virtual object 620 as the radius. The value of this lateral movement speed is the velocity component of the target object in this tangent direction; that is, when the movement direction of the target object is not towards the direction of the first virtual object, there is a lateral movement speed of the target object relative to the first virtual object. Figure 7 This illustration shows a schematic diagram of the lateral movement speed of a target object according to an exemplary embodiment of this application. When the target object and the first virtual object are on different planes in the virtual scene, the direction of the lateral movement speed of the target object 710 relative to the first virtual object 720 is the tangent direction at the position point of the target object on a sphere with the first virtual object 720 as the center and the distance between the target object 710 and the first virtual object 720 as the radius. The value of the lateral movement speed is the velocity component of the target object in the tangent direction.
[0101] Step 440: Based on the second attribute value, determine the second hit rate coefficient of the first virtual object; the second hit rate coefficient is negatively correlated with the second attribute value.
[0102] The negative correlation between the second hit rate coefficient and the second attribute value can also be represented by a mathematical function. Indicatively, the hit rate coefficient can increase exponentially as the second attribute value decreases, which can be used to simulate the situation where the target object is not easy to aim when its movement speed is fast. Figure 8 This illustration shows a schematic diagram illustrating the exponential relationship between the second hit rate coefficient and the second attribute value, as shown in an exemplary embodiment of this application. Figure 8 As shown, the horizontal axis represents the second attribute value, and the vertical axis represents the second hit coefficient. The second hit coefficient decreases exponentially as the second attribute value increases, and increases exponentially as the second attribute value decreases. When the value of the second attribute of the target object is the minimum, the second hit coefficient is 1. That is to say, when the horizontal movement speed of the target object relative to the first virtual object is 0, the second hit coefficient of the first virtual object is the maximum. The value range of the second hit coefficient is (0, 1).
[0103] Step 450: Based on the first hit rate and the second hit rate coefficient, adjust the initial hit rate of the first virtual object to the target object, and obtain the current hit rate of the first virtual object to the target object.
[0104] In this embodiment, the initial hit rate of the first virtual object is related to its level parameter. The level parameter can be set differently depending on the virtual environment. For example, as the difficulty of the level increases, the level of the non-user-controlled first virtual object in the virtual scene will increase accordingly. Therefore, before adjusting the initial hit rate of the first virtual object based on the hit rate coefficients (including the first hit rate coefficient and the second hit rate coefficient), it is necessary to obtain the level parameter of the first virtual object; based on the level parameter, the initial hit rate of the first virtual object is determined.
[0105] The initial hit rate of the first virtual object is positively correlated with its level parameter. In one possible implementation, the positive correlation between the initial hit rate and the level parameter can be represented by a piecewise function; that is, the positive correlation between the level parameter and the initial hit rate can be represented by different functions within different level ranges of the level parameter. Figure 9 This illustration shows a schematic diagram illustrating the relationship between the rating parameter and the initial hit rate, as shown in an exemplary embodiment of this application. Figure 9 As shown, the horizontal axis represents the level parameter, and the vertical axis represents the initial hit rate. As the level parameter increases, the initial hit rate increases; as the level parameter decreases, the initial hit rate decreases. However, the functional relationship between the level parameter and the initial hit rate differs across different level parameter ranges. Figure 9 As shown, in the first level range of 910, the initial hit rate increases significantly with the increase of the level parameter, while in the second level range of 920, the initial hit rate increases less significantly with the increase of the level parameter.
[0106] Schematic, the current hit rate of the first virtual object, adjusted based on the hit rate coefficient, can be expressed as:
[0107] Current hit rate = AI2Player Hit * AILevelHit * AIVelocity Fix Hit
[0108] Among them, AI2Player Hit represents the first hit rate coefficient, AILevelHit represents the initial hit rate of the first virtual object, and AIVelocity Fix Hit represents the second hit rate coefficient.
[0109] It should be noted that the hit rate of the first virtual object against the target object can be related to the first attribute value of the target object, the second attribute value of the target object, or both the first and second attribute values of the target object. Therefore, when adjusting the initial hit rate, it can be adjusted based on the first hit rate coefficient, in which case the current hit rate is not affected by the second hit rate coefficient, which has a value of 1; it can also be adjusted based on the second hit rate coefficient, in which case the current hit rate is not affected by the first hit rate coefficient, which has a value of 1; or it can be adjusted based on both the first and second hit rate coefficients simultaneously.
[0110] Step 460: Based on the first attribute value of the target object, obtain the damage value coefficient of the first virtual object.
[0111] In this embodiment, the damage coefficient of the first virtual object is determined based on a first attribute value, and this damage coefficient is positively correlated with the first attribute value. Illustratively, the positive correlation between the damage coefficient and the first attribute value can be represented by a mathematical function. Optionally, the damage coefficient can decrease linearly as the first attribute value decreases. Figure 10 This illustration shows a schematic diagram illustrating the linear relationship between the damage value coefficient and the first attribute value, as shown in an exemplary embodiment of this application. Figure 10 As shown, the horizontal axis represents the first attribute value, and the vertical axis represents the damage coefficient. The damage coefficient increases linearly with the increase of the first attribute value and decreases linearly with the decrease of the first attribute value. When the value of the first attribute of the target object is the maximum, the damage coefficient is 1. That is to say, the range of the damage coefficient is (0, 1]. When the value of the first attribute of the target object is 0, the target object is confirmed to be eliminated, and the target object does not affect the damage coefficient.
[0112] Step 470: Based on the damage value coefficient, adjust the initial damage value of the first virtual object to obtain the current damage value of the first virtual object to the target object.
[0113] In this embodiment of the application, the initial damage value of the first virtual object is related to the level parameter of the first virtual object. Therefore, before adjusting the initial damage value of the first virtual object based on the damage value coefficient, it is also necessary to obtain the level parameter of the first virtual object; and determine the initial damage value of the first virtual object based on the level parameter of the first virtual object.
[0114] The initial damage value of the first virtual object is positively correlated with its level parameter. In one possible implementation, the positive correlation between the initial damage value and the level parameter of the first virtual object can be represented by a mathematical function. Figure 11This invention illustrates a schematic diagram showing the relationship between a level parameter and an initial damage value, as shown in an exemplary embodiment of this application. Figure 11 As shown, the horizontal axis represents the level parameter, and the vertical axis represents the initial damage value. As the level parameter increases, the initial damage value increases, and as the level parameter decreases, the initial damage value decreases.
[0115] Schematic, based on the damage value coefficient, the current damage value of the first virtual object, after adjusting the initial damage value, can be expressed as:
[0116] Current damage value = AI2Player Damage * AILevelDamage
[0117] AI2Player Damage represents the damage coefficient, and AILevel Damage represents the initial damage value of the first virtual object.
[0118] Step 480: Based on the effect attribute parameters, control the first virtual object to perform an attack action against the target object.
[0119] Based on the determined current hit rate and current damage value, control the first virtual object to execute the attack action against the target object.
[0120] In one possible implementation, after determining the current hit rate of the first virtual object, the computer device can generate a random number; based on the relationship between the random number and the current hit rate, the attack direction of the attack action to be performed by the first virtual object is determined; based on the attack direction, the first virtual object is controlled to perform an attack action against the target object.
[0121] In response to the random number value being less than or equal to the current hit rate, the attack direction of the attack action executed by the first virtual object is controlled to be toward the target object;
[0122] In response to a random number value greater than the current hit rate, the attack direction of the attack action executed by the first virtual object is deviated from the target object.
[0123] Specifically, controlling the attack direction of the first virtual object to deviate from the target object can be achieved by controlling the attack direction of the first virtual object to point towards the adjacent range of the target object. This adjacent range can be a ring-shaped area around the target object determined based on the collider of the target object. For example, the outline range of the collider of the target object is used as the inner ring, and an outer ring is obtained by expanding outward by a certain length. The direction corresponding to the ring-shaped area defined by the inner and outer rings is used as the shooting direction when the attack direction of the first virtual object deviates from the target object.
[0124] The range of random number generation is the same as the range of the hit rate of the first virtual object on the target object, that is, the range of random number generation is (0, 1).
[0125] When the value of the random number is less than or equal to the adjusted hit rate of the first virtual object, it is determined that the first virtual object is aiming at the target object in this attack. Therefore, the attack direction of the first virtual object is controlled to be towards the target object. When the value of the random number is greater than the adjusted hit rate of the first virtual object, it is determined that the first virtual object is not aiming at the target object in this attack. Therefore, the attack direction of the first virtual object is controlled to deviate from the target object.
[0126] If the first virtual object successfully affects the target object in this attack, causing the target object's first attribute value to decrease and become non-zero, then in the next attack on the target object, the hit rate and damage value of the first virtual object will be recalculated, and the attack on the target object will be based on the first virtual object with the recalculated hit rate and damage value.
[0127] Since the first virtual object has an initial aiming angle in its initial state or after an attack, and the first virtual object has an angle adjustment speed and an attack time interval; after determining the attack direction of the first virtual object in this attack, during the aiming direction adjustment process, in response to the attack time interval, the first virtual object faces the attack direction based on the current direction adjusted by the angle adjustment speed, and controls the first virtual object to attack in the attack direction;
[0128] In response to the attack time interval, if the current direction of the first virtual object, after the angle and speed adjustment, is not facing the attack direction, control the first virtual object to attack in the current direction.
[0129] In other words, if the determined attack direction is towards the target object, within the attack time interval, if the first virtual object adjusts its aiming angle from the initial aiming angle to face the target object based on the angle adjustment speed, the adjustment of the aiming angle of the first virtual object stops, and at the end of the attack time interval, the first virtual object is controlled to attack the target object; after the attack time interval, if the first virtual object has not adjusted its aiming angle to face the target object from the initial aiming angle, in order to prevent AI lag, the first virtual object is controlled to attack in the current direction, and the current direction is determined as the new initial angle, and the direction is adjusted again until the attack direction of the first virtual object faces the target object.
[0130] If the attack direction of the first virtual object is determined to be towards the direction corresponding to the ring area of the target object, during the attack time interval, if the first virtual object adjusts from the initial angle to the direction corresponding to the ring area based on the angle adjustment speed, the adjustment of the aiming angle of the first virtual object stops, and at the end of the attack time interval, the first virtual object is controlled to attack the target object. After the attack time interval, if the first virtual object has not adjusted from the initial aiming angle to the angle corresponding to the ring area, in order to prevent AI lag, the first virtual object is controlled to attack in the current direction, and the current direction is determined as the new initial angle, and the direction is adjusted again until the attack direction of the first virtual object is adjusted to the angle corresponding to the ring area.
[0131] If the attack action performed by the first virtual object hits the target object, it will cause damage to the target object corresponding to the current damage value, and reduce the target object's first attribute value based on the current damage value.
[0132] In summary, the virtual object control method provided in this application embodiment can adjust the attack effect corresponding to the first virtual object based on the first attribute value of the target object when the first virtual object in the virtual scene is in an attack state against the target object. The attack is then carried out based on the adjusted attack effect, so that the attack effect of the first virtual object against the target object can change with the change of the first attribute value of the target object. This improves the flexibility of the attack effect of the first virtual object against the target object and improves the accuracy of the application or AI's control over the first virtual object.
[0133] It should be noted that the aforementioned determination of the effect attribute parameters of the first virtual object based on the target attribute may include at least one of the following: adjusting the initial hit rate of the first virtual object based on the first attribute value, adjusting the initial hit rate of the first virtual object based on the second attribute value, and adjusting the initial damage value of the first virtual object based on the first attribute value. At least one of the following relationships—the positive correlation between the first hit rate coefficient and the first attribute value, the negative correlation between the second hit rate coefficient and the second attribute value, the positive correlation between the initial hit rate of the first virtual object and the level parameter of the first virtual object, the positive correlation between the damage value coefficient and the first attribute value, and the positive correlation between the initial damage value of the first virtual object and the level parameter of the first virtual object—can be constructed using Bézier curves. Bézier curves are mathematical curves used in two-dimensional image applications, including a start point, an end point, and control points. By adjusting the control points, the shape of the curve changes, thereby constructing a curve that meets the actual needs to obtain the corresponding mathematical function to describe the correlation between different objects.
[0134] Taking the attack action performed by the first virtual object on the target object as an example, which is implemented by AI controlling the virtual shooting props, Figure 12 A flowchart illustrating a virtual object control method according to an exemplary embodiment of this application is shown. This virtual object control method can be executed by a computer device, which can be implemented as... Figure 2 The server shown is as follows: Figure 12 As shown, the virtual object control method includes:
[0135] Step 1210: The target object triggers the first virtual object to shoot using a virtual shooting prop.
[0136] Step 1220: Calculate the hit rate and damage value of the first virtual object.
[0137] The hit rate and damage of the first virtual object are adjusted based on the target object's health status (primary attribute value). This allows for timely adjustments to the hit rate and damage based on the target object's health status. When the target object has sufficient health, the hit rate and damage are increased, providing a more exciting and challenging experience for the user. Conversely, when the target object has low health, the hit rate and damage are decreased, giving the user more room for error and helping them defeat the AI, thus improving the user experience. Additionally, the hit rate of the first virtual object can be adjusted based on the target object's lateral movement status to guide the user's left and right movement actions.
[0138] Step 1230: Determine whether the shot hit the target. If yes, proceed to step 1240; otherwise, proceed to step 1250.
[0139] Step 1240: Control the first virtual object to rotate the virtual shooting prop toward the target object.
[0140] Step 1250: Control the first virtual object to rotate the virtual shooting prop toward the target object.
[0141] Step 1260: Determine if the virtual shooting prop has been rotated into position. If yes, proceed to step 1270; otherwise, proceed to step 1280.
[0142] Step 1270: Fire at the target or the area around the target.
[0143] Step 1280: Fire in the current aiming direction of the virtual shooting prop.
[0144] In summary, the virtual object control method provided in this application embodiment can adjust the attack effect corresponding to the first virtual object based on the first attribute value of the target object when the first virtual object in the virtual scene is in an attack state against the target object. The attack is then carried out based on the adjusted attack effect, so that the attack effect of the first virtual object against the target object can change with the change of the first attribute value of the target object. This improves the flexibility of the attack effect of the first virtual object against the target object and improves the accuracy of the application or AI's control over the first virtual object.
[0145] Figure 13 A block diagram of a virtual object control device illustrated in an exemplary embodiment of this application is shown, such as Figure 13 As shown, the device includes:
[0146] The first attribute value acquisition module 1310 is used to acquire the first attribute value of the target object in response to the first virtual object in the virtual scene being in a state of launching an attack on the target object; the first virtual object is a non-user-controlled virtual object, and the first attribute value is used to indicate the health status of the target object in the virtual scene;
[0147] The attribute parameter acquisition module 1320 is used to acquire the effect attribute parameters of the first virtual object based on the first attribute value; the effect attribute parameters are used to indicate the attack effect of the first virtual object on the target object;
[0148] The attack module 1330 is used to control the first virtual object to perform an attack action against the target object based on the effect attribute parameters.
[0149] In one possible implementation, the attack effect of the first virtual object on the target object includes at least one of the hit rate of the first virtual object on the target object and the damage value of the first virtual object on the target object.
[0150] In one possible implementation, the attack effect of the first virtual object on the target object is the hit rate of the first virtual object on the target object; the attribute parameter acquisition module 1320 includes:
[0151] The first hit rate coefficient determination submodule is used to determine the first hit rate coefficient of the first virtual object based on the first attribute value; the first hit rate coefficient is positively correlated with the first attribute value;
[0152] The hit rate adjustment submodule is used to adjust the initial hit rate of the first virtual object to the target object based on the first hit rate coefficient, so as to obtain the current hit rate of the first virtual object to the target object.
[0153] In one possible implementation, the device further includes:
[0154] The second attribute value acquisition module is used to acquire the second attribute value of the target object, the second attribute value being used to indicate the lateral movement speed of the target object relative to the first virtual object;
[0155] The attribute parameter acquisition module 1320 includes:
[0156] The second hit rate coefficient determination submodule is used to determine the second hit rate coefficient of the first virtual object based on the second attribute value; the second hit rate coefficient is negatively correlated with the second attribute value;
[0157] The hit rate adjustment submodule is used to adjust the initial hit rate of the first virtual object to the target object based on the first hit rate and the second hit rate coefficient, and to obtain the current hit rate of the first virtual object to the target object.
[0158] In one possible implementation, the device further includes:
[0159] The level parameter acquisition module is used to acquire the level parameters of the first virtual object;
[0160] The initial hit rate determination module is used to determine the initial hit rate of the first virtual object based on the level parameter of the first virtual object; the initial hit rate of the first virtual object is positively correlated with the level parameter of the first virtual object.
[0161] In one possible implementation, the attack effect of the first virtual object on the target object is the damage value of the first virtual object on the target object; the attribute parameter acquisition module 1320 includes:
[0162] The damage value coefficient acquisition module is used to acquire the damage value coefficient of the first virtual object based on the first attribute value of the target object; the damage value coefficient is positively correlated with the first attribute value;
[0163] The damage value adjustment module is used to adjust the initial damage value of the first virtual object based on the damage value coefficient, so as to obtain the current damage value of the first virtual object to the target object.
[0164] In one possible implementation, the device further includes:
[0165] The level parameter acquisition module is used to acquire the level parameters of the first virtual object;
[0166] The initial damage value acquisition module is used to determine the initial damage value of the first virtual object based on the level parameter of the first virtual object; the initial damage value of the first virtual object is positively correlated with the level parameter of the first virtual object.
[0167] In one possible implementation, the attack module 1330 includes:
[0168] The random number generation submodule is used to generate random numbers;
[0169] The attack direction determination submodule is used to determine the attack direction of the attack action performed by the first virtual object based on the relationship between the random number and the current hit rate.
[0170] The attack submodule is used to control the first virtual object to perform an attack action against the target object based on the attack direction.
[0171] In one possible implementation, the attack direction determination submodule is used for,
[0172] In response to the random number being less than or equal to the current hit rate, the attack direction of the attack action performed by the first virtual object is controlled to be directed toward the target object;
[0173] In response to the random number being greater than the current hit rate, the attack direction of the attack action performed by the first virtual object is controlled to deviate from the target object.
[0174] In one possible implementation, the first virtual object has an angle adjustment speed and an attack time interval; the attack submodule is used for,
[0175] In response to the attack time interval, the first virtual object moves towards the attack direction based on the current direction after the angle adjustment speed adjustment, and controls the first virtual object to attack in the attack direction;
[0176] In response to the attack time interval, if the first virtual object, after adjusting its current direction based on the angle and speed, is not facing the attack direction, the first virtual object is controlled to attack in the current direction.
[0177] In one possible implementation, the target object is a user-controlled virtual object in the virtual scene.
[0178] In summary, the virtual object control device provided in this application embodiment can adjust the attack effect corresponding to the first virtual object based on the first attribute value of the target object when the first virtual object in the virtual scene is in an attack state against the target object. The attack is then carried out based on the adjusted attack effect, so that the attack effect of the first virtual object on the target object can change with the change of the first attribute value of the target object. This improves the flexibility of the attack effect of the first virtual object on the target object and improves the accuracy of the application or AI's control over the first virtual object.
[0179] Figure 14 A structural block diagram of a computer device 1400 illustrating an exemplary embodiment of this application is shown. This computer device can be implemented as a server as described above in this application. The computer device 1400 includes a Central Processing Unit (CPU) 1401, a system memory 1404 including Random Access Memory (RAM) 1402 and Read-Only Memory (ROM) 1403, and a system bus 1405 connecting the system memory 1404 and the CPU 1401. The computer device 1400 also includes a mass storage device 1406 for storing an operating system 1409, application programs 1410, and other program modules 1411.
[0180] The mass storage device 1406 is connected to the central processing unit 1401 via a mass storage controller (not shown) connected to the system bus 1405. The mass storage device 1406 and its associated computer-readable media provide non-volatile storage for the computer device 1400. That is, the mass storage device 1406 may include computer-readable media (not shown) such as a hard disk or a compact disc read-only memory (CD-ROM) drive.
[0181] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include RAM, ROM, erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other solid-state storage technologies, CD-ROM, digital versatile disc (DVD) or other optical storage, magnetic tape cassettes, magnetic tape, disk storage, or other magnetic storage devices. Of course, those skilled in the art will recognize that the computer storage media are not limited to the above-mentioned types. The system memory 1404 and mass storage device 1406 described above can be collectively referred to as memory.
[0182] According to various embodiments of this disclosure, the computer device 1400 can also be connected to a remote computer on a network, such as the Internet. That is, the computer device 1400 can be connected to a network 1408 via a network interface unit 1407 connected to the system bus 1405, or it can use the network interface unit 1407 to connect to other types of networks or remote computer systems (not shown).
[0183] The memory also includes at least one instruction, at least one program, code set, or instruction set, which are stored in the memory. The central processing unit 1401 executes the at least one instruction, at least one program, code set, or instruction set to implement all or part of the steps in the virtual object control method shown in the above embodiments.
[0184] Figure 15 A structural block diagram of a computer device 1500 provided in an exemplary embodiment of this application is shown. The computer device 1500 can be implemented as the aforementioned terminal, such as a smartphone, tablet computer, laptop computer, or desktop computer. The computer device 1500 may also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, or other names.
[0185] Typically, computer device 1500 includes a processor 1501 and a memory 1502.
[0186] Processor 1501 may include one or more processing cores, such as a 4-core processor, a 15-core processor, etc. Processor 1501 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1501 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1501 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, processor 1501 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0187] The memory 1502 may include one or more computer-readable storage media, which may be non-transitory. The memory 1502 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1502 are used to store at least one instruction, which is executed by the processor 1501 to implement all or part of the steps in the virtual object control method provided in the method embodiments of this application.
[0188] In some embodiments, the computer device 1500 may also optionally include a peripheral device interface 1503 and at least one peripheral device. The processor 1501, memory 1502, and peripheral device interface 1503 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1503 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 1504, a display screen 1505, a camera assembly 1506, an audio circuit 1507, a positioning assembly 1508, and a power supply 1509.
[0189] Peripheral interface 1503 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1501 and memory 1502. In some embodiments, processor 1501, memory 1502 and peripheral interface 1503 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1501, memory 1502 and peripheral interface 1503 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0190] In some embodiments, the computer device 1500 further includes one or more sensors 1510. The one or more sensors 1510 include, but are not limited to: an accelerometer 1511, a gyroscope 1512, a pressure sensor 1513, a fingerprint sensor 1514, an optical sensor 1515, and a proximity sensor 1516.
[0191] Those skilled in the art will understand that Figure 15 The structure shown does not constitute a limitation on the computer device 1500, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0192] In one exemplary embodiment, a computer-readable storage medium is also provided for storing at least one instruction, at least one program, code set, or instruction set, wherein 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 all or part of the steps in the virtual object control method described above. For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, or optical data storage device, etc.
[0193] In one exemplary embodiment, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the aforementioned actions. Figure 3 , Figure 4 or Figure 12 All or part of the steps of the method shown in any embodiment.
[0194] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0195] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A virtual object control method, characterized in that, The method includes: In response to a first virtual object in a virtual scene being in a state of launching an attack on a target object, a first attribute value of the target object is obtained; the first virtual object is a virtual object controlled by an application or AI, and the first attribute value is used to indicate the health status of the target object in the virtual scene; the target object is a virtual object controlled by the user in the virtual scene; Based on the first attribute value, the effect attribute parameters of the first virtual object are obtained; the effect attribute parameters are used to indicate the attack effect of the first virtual object on the target object; Based on the effect attribute parameters, the first virtual object is controlled to perform an attack action against the target object; The attack effect includes the damage value of the first virtual object to the target object; obtaining the effect attribute parameters of the first virtual object based on the first attribute value includes: Based on the first attribute value of the target object, the damage value coefficient of the first virtual object is obtained; the damage value coefficient is positively correlated with the first attribute value. Based on the damage coefficient, the initial damage value of the first virtual object is adjusted to obtain the current damage value of the first virtual object to the target object.
2. The method according to claim 1, characterized in that, The attack effect of the first virtual object on the target object also includes the hit rate of the first virtual object on the target object.
3. The method according to claim 2, characterized in that, The step of obtaining the effect attribute parameters of the first virtual object based on the first attribute value of the target object further includes: Based on the first attribute value, a first hit rate coefficient of the first virtual object is determined; the first hit rate coefficient is positively correlated with the first attribute value. Based on the first hit rate coefficient, the initial hit rate of the first virtual object on the target object is adjusted to obtain the current hit rate of the first virtual object on the target object.
4. The method according to claim 3, characterized in that, The method further includes: Obtain a second attribute value of the target object, the second attribute value being used to indicate the lateral movement speed of the target object relative to the first virtual object; Based on the second attribute value, a second hit rate coefficient for the first virtual object is determined; the second hit rate coefficient is negatively correlated with the second attribute value. The step of adjusting the initial hit rate of the first virtual object to the target object based on the first hit rate coefficient, and obtaining the current hit rate of the first virtual object to the target object, includes: Based on the first hit rate and the second hit rate coefficient, the initial hit rate of the first virtual object on the target object is adjusted to obtain the current hit rate of the first virtual object on the target object.
5. The method according to claim 3, characterized in that, Before adjusting the initial hit rate of the first virtual object to the target object based on the first hit rate coefficient, and obtaining the current hit rate of the first virtual object to the target object, the method further includes: Obtain the level parameter of the first virtual object; Based on the level parameter of the first virtual object, the initial hit rate of the first virtual object is determined; the initial hit rate of the first virtual object is positively correlated with the level parameter of the first virtual object.
6. The method according to claim 1, characterized in that, Before adjusting the initial damage value of the first virtual object based on the damage value coefficient to obtain the current damage value of the first virtual object to the target object, the method further includes: Obtain the level parameter of the first virtual object; Based on the level parameter of the first virtual object, the initial damage value of the first virtual object is determined; the initial damage value of the first virtual object is positively correlated with the level parameter of the first virtual object.
7. The method according to claim 3, characterized in that, The step of controlling the first virtual object to perform an attack action against the target object based on the effect attribute parameters includes: Generate random numbers; Based on the relationship between the random number and the current hit rate, the attack direction of the attack action performed by the first virtual object is determined; Based on the attack direction, the first virtual object is controlled to perform an attack action against the target object.
8. The method according to claim 7, characterized in that, The step of determining the attack direction of the attack action performed by the first virtual object based on the relationship between the random number and the current hit rate includes: In response to the random number being less than or equal to the current hit rate, the attack direction of the attack action performed by the first virtual object is controlled to be directed toward the target object; In response to the random number being greater than the current hit rate, the attack direction of the attack action performed by the first virtual object is controlled to deviate from the target object.
9. The method according to claim 7, characterized in that, The first virtual object has an angle adjustment speed and an attack time interval; the step of controlling the first virtual object to perform an attack action against the target object based on the attack direction includes: In response to the attack time interval, the first virtual object moves towards the attack direction based on the current direction after the angle adjustment speed adjustment, and controls the first virtual object to attack in the attack direction; In response to the attack time interval, if the first virtual object, after adjusting its current direction based on the angle and speed, is not facing the attack direction, the first virtual object is controlled to attack in the current direction.
10. A virtual object control device, characterized in that, The device includes: The first attribute value acquisition module is used to acquire the first attribute value of the target object in response to the first virtual object in the virtual scene being in a state of launching an attack on the target object; the first virtual object is a virtual object controlled by an application or AI, and the first attribute value is used to indicate the health status of the target object in the virtual scene; the target object is a virtual object controlled by the user in the virtual scene; The attribute parameter acquisition module is used to acquire the effect attribute parameters of the first virtual object based on the first attribute value; the effect attribute parameters are used to indicate the attack effect of the first virtual object on the target object; An attack module is used to control the first virtual object to perform an attack action against the target object based on the effect attribute parameters; The attack effect includes the damage value of the first virtual object to the target object; the attribute parameter acquisition module includes: The damage value coefficient acquisition module is used to acquire the damage value coefficient of the first virtual object based on the first attribute value of the target object; the damage value coefficient is positively correlated with the first attribute value; The damage value adjustment module is used to adjust the initial damage value of the first virtual object based on the damage value coefficient, so as to obtain the current damage value of the first virtual object to the target object.
11. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one computer program, which is loaded and executed by the processor to implement the virtual object control method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to implement the virtual object control method as described in any one of claims 1 to 9.
13. A computer program product, characterized in that, The computer program product includes at least one computer program, which is loaded and executed by a processor to implement the virtual object control method as described in any one of claims 1 to 9.