Methods, apparatus, devices, and media for controlling virtual characters via touch devices
By displaying various attack action controls and weapon switching functions in the graphical user interface of touch devices, the problems of misoperation and low control efficiency in physical combat games are solved, and more efficient virtual character control is achieved.
Patent Information
- Application Number
- CN202210558054.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-19
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2042-05-19
AI Technical Summary
In existing touch-screen games, those featuring physical combat and melee weapon battles suffer from issues of misoperation and low control efficiency, especially when enemy characters have varied postures, making it difficult for existing solutions to adapt.
A graphical user interface is provided via touch devices, displaying action controls, including a first attack action control and a second attack action control. Different touch operations are responded to control the virtual character to perform different attack actions, and weapon switching and defensive actions are supported. Target selection controls are used with swipe operations to improve control accuracy.
It improves the control efficiency of virtual characters, avoids incorrect operations before and after weapon switching, adapts to changes in the posture of enemy characters, and enhances the flexibility and accuracy of combat control.
Smart Images

Figure CN117122899B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of game technology, and in particular to a method, apparatus, device and medium for controlling virtual characters via touch devices. Background Technology
[0002] With the rapid development of internet technology and the growing entertainment and cultural needs of the people, the development of games has entered a new era. In order to achieve the diversity of games, they are often configured so that players can control the virtual characters they control to perform preset attack actions.
[0003] In existing touch-screen terminal game character attack control schemes, a basic attack button is usually set in the touch interface. Players control the character to perform specific attack actions by touching the basic attack button, or perform specific combo actions by clicking the basic attack button multiple times, or control the character to perform different attack actions by single and double clicks respectively.
[0004] However, for games that primarily rely on physical combat and melee weapons, the combat attack methods are quite diverse, and the postures of both enemy and player characters are quite varied. This adds to the difficulty of adapting the game for touch-screen devices, and the existing solutions mentioned above may suffer from issues such as easy misoperation and low control efficiency. Summary of the Invention
[0005] This application provides a method, apparatus, device, and medium for controlling virtual characters via a touch device, to at least partially overcome the shortcomings of related technologies.
[0006] In a first aspect, the present invention provides a method for controlling a virtual character via a touch device, wherein the touch device provides a graphical user interface, and the graphical user interface displays action controls, the action controls including at least a first attack action control and a second attack action control, the method comprising:
[0007] In response to a movement control operation applied to the graphical user interface, the first virtual character is controlled to move in the three-dimensional virtual environment;
[0008] In response to a first touch operation applied to the first attack action control, the first virtual character is controlled to perform a first attack action using the first melee weapon of the first virtual character, wherein the first melee weapon is the weapon currently used by the first virtual character;
[0009] In response to a second touch operation applied to the second attack action control, the first virtual character is controlled to perform a second attack action using the first virtual character's first melee weapon, wherein the attack angles of the first attack action and the second attack action are different;
[0010] In response to a weapon switching command, the weapon currently used by the first virtual character is switched from the first melee weapon to the second melee weapon;
[0011] In response to a third touch operation applied to the first attack action control, the first virtual character is controlled to perform a first attack action using the second melee weapon;
[0012] In response to a fourth touch operation applied to the second attack action control, the first virtual character is controlled to perform a second attack action using the second melee weapon.
[0013] In an optional implementation, the graphical user interface further includes a skill control, wherein the first skill corresponding to the skill control is associated with a first virtual character in the three-dimensional virtual environment, and the first skill corresponds to a first skill cooldown time.
[0014] In an optional implementation, the action control further includes a defensive action control, and the method further includes:
[0015] In response to a fifth touch operation applied to the defensive action control, the first virtual character is controlled to perform a defensive action;
[0016] The response to the first touch operation applied to the first attack action control controls the first virtual character to perform a first attack action using the first virtual character's first melee weapon, including:
[0017] In response to a first touch operation applied to the first attack action control, the first set of controls is displayed;
[0018] If the first touch operation is a click operation, then the first virtual character is controlled to perform the first attack action; if the first touch operation is a swipe operation, then a first target control is determined from the controls included in the first control set according to the swipe operation, and the first virtual character is controlled to perform the action corresponding to the first target control; wherein, the first control set includes at least a first control, and the first control is used to trigger the first virtual character to perform the defensive action.
[0019] In an optional implementation, the action control further includes a defensive action control, and the method further includes:
[0020] In response to a fifth touch operation applied to the defensive action control, the first virtual character is controlled to perform a defensive action;
[0021] The response to the second touch operation applied to the second attack action control controls the first virtual character to perform a second attack action using the first virtual character's first melee weapon, including:
[0022] In response to a second touch operation applied to the second attack action control, a second set of controls is displayed;
[0023] If the second touch operation is a click operation, then the first virtual character is controlled to perform the second attack action;
[0024] If the second touch operation is a swipe operation, then a second target control is determined from the controls contained in the second control set according to the swipe operation, and the first virtual character is controlled to perform the action corresponding to the second target control; wherein, the second control set contains at least a second control, and the second control is used to trigger the first virtual character to perform the defensive action.
[0025] In an optional implementation, if the first touch operation is a swipe operation, determining a first target control from the controls included in the first control set and controlling the first virtual character to perform the action corresponding to the first target control includes:
[0026] If the first touch operation is a swipe operation, the first target control is determined from the controls included in the first control set, and it is determined whether the action interruption condition is met based on the current action state of the first virtual character and the action corresponding to the first target control.
[0027] If the conditions are met, control the first virtual character to perform the action corresponding to the first target control.
[0028] In an optional implementation, the method includes:
[0029] If the conditions are not met, the first virtual character will not be controlled to perform the action corresponding to the first target control.
[0030] In an optional implementation, the method includes:
[0031] If the conditions are not met, control the first virtual character to continue performing the currently unfinished action.
[0032] Secondly, the present invention provides an apparatus for controlling a virtual character via a touch device, wherein the touch device provides a graphical user interface, and the graphical user interface displays action controls, the action controls including at least a first attack action control and a second attack action control, the apparatus comprising:
[0033] A movement module is used to respond to movement control operations applied to the graphical user interface and control the movement of the first virtual character in the three-dimensional virtual environment.
[0034] The first execution module is used to respond to a first touch operation applied to the first attack action control and control the first virtual character to perform a first attack action using the first virtual character's first melee weapon, wherein the first melee weapon is the weapon currently used by the first virtual character;
[0035] The second execution module is used to respond to a second touch operation applied to the second attack action control and control the first virtual character to perform a second attack action using the first virtual character's first melee weapon, wherein the attack angles of the first attack action and the second attack action are different.
[0036] The switching module is used to respond to weapon switching commands and switch the weapon currently used by the first virtual character from the first melee weapon to the second melee weapon;
[0037] The third execution module is used to respond to the third touch operation applied to the first attack action control and control the first virtual character to perform the first attack action using the second melee weapon;
[0038] The fourth execution module is used to respond to the fourth touch operation applied to the second attack action control and control the first virtual character to perform the second attack action using the second melee weapon.
[0039] In an optional implementation, the graphical user interface further includes a skill control, wherein the first skill corresponding to the skill control is associated with a first virtual character in the three-dimensional virtual environment, and the first skill corresponds to a first skill cooldown time.
[0040] In an optional implementation, the action control further includes a defensive action control, and the device further includes: a control module, configured to respond to a fifth touch operation applied to the defensive action control and control the first virtual character to perform a defensive action;
[0041] The first execution module is specifically used to respond to a first touch operation applied to the first attack action control and display a first set of controls;
[0042] If the first touch operation is a click operation, then the first virtual character is controlled to perform the first attack action; if the first touch operation is a swipe operation, then a first target control is determined from the controls included in the first control set according to the swipe operation, and the first virtual character is controlled to perform the action corresponding to the first target control; wherein, the first control set includes at least a first control, and the first control is used to trigger the first virtual character to perform the defensive action.
[0043] In an optional implementation, the action control further includes a defensive action control, and the device further includes: a control module, configured to respond to a fifth touch operation applied to the defensive action control and control the first virtual character to perform a defensive action;
[0044] The second execution module is specifically used to respond to a second touch operation applied to the second attack action control and display the second control set;
[0045] If the second touch operation is a click operation, then the first virtual character is controlled to perform the second attack action;
[0046] If the second touch operation is a swipe operation, then a second target control is determined from the controls contained in the second control set according to the swipe operation, and the first virtual character is controlled to perform the action corresponding to the second target control; wherein, the second control set contains at least a second control, and the second control is used to trigger the first virtual character to perform the defensive action.
[0047] In an optional implementation, the first execution module is specifically used to determine a first target control from the controls included in the first control set if the first touch operation is a swipe operation, and determine whether the action interruption condition is met based on the current action state of the first virtual character and the action corresponding to the first target control.
[0048] If the conditions are met, control the first virtual character to perform the action corresponding to the first target control.
[0049] In an optional implementation, the first execution module is specifically configured to not control the first virtual character to perform the action corresponding to the first target control if the condition is not met.
[0050] In an optional implementation, the first execution module is specifically used to control the first virtual character to continue performing the currently unfinished action if the condition is not met.
[0051] Thirdly, the present invention provides an electronic device, comprising: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the method for controlling a virtual character via a touch device as described in any of the foregoing embodiments.
[0052] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the method for controlling a virtual character via a touch device as described in any of the foregoing embodiments.
[0053] The beneficial effects of this application are:
[0054] This application provides a method, apparatus, device, and medium for controlling a virtual character via a touch device. The touch device provides a graphical user interface (GUI) displaying action controls, which include at least a first attack action control and a second attack action control. The method includes: responding to a movement control operation applied to the GUI to control a first virtual character to move in a three-dimensional virtual environment; responding to a first touch operation applied to the first attack action control to control the first virtual character to perform a first attack action using a first melee weapon, wherein the first melee weapon is the weapon currently used by the first virtual character; responding to a second touch operation applied to the second attack action control to control the first virtual character to perform a second attack action using the first melee weapon, wherein the attack angles of the first and second attack actions are different; responding to a weapon switching command to switch the weapon currently used by the first virtual character from the first melee weapon to the second melee weapon; responding to a third touch operation applied to the first attack action control to control the first virtual character to perform the first attack action using the second melee weapon; and responding to a fourth touch operation applied to the second attack action control to control the first virtual character to perform the second attack action using the second melee weapon. In this way, on the one hand, users can use different melee weapons to perform the same first attack action (or second attack action) during combat, avoiding errors caused by changes in the attack control logic of the virtual character before and after switching weapons; on the other hand, users can also choose different attack angles according to the changes in the posture of the enemy virtual character (especially in scenarios where physical combat and melee weapons are the main combat methods), thus improving the control efficiency of the virtual character. Attached Figure Description
[0055] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0056] Figure 1 A cloud interaction system architecture diagram provided for an embodiment of this application;
[0057] Figure 2 A flowchart illustrating a method for controlling a virtual character via a touch device, provided as an embodiment of this application;
[0058] Figure 3 A graphical user interface diagram provided for an embodiment of this application;
[0059] Figure 4 An attack diagram of a virtual character provided in an embodiment of this application;
[0060] Figure 5 A flowchart illustrating another method for controlling a virtual character via a touch device, provided as an embodiment of this application;
[0061] Figure 6 Another graphical user interface diagram provided for an embodiment of this application;
[0062] Figure 7 A flowchart illustrating another method for controlling a virtual character via a touch device, provided as an embodiment of this application;
[0063] Figure 8 This is another graphical user interface diagram provided in the embodiments of this application;
[0064] Figure 9 Another graphical user interface diagram provided for an embodiment of this application;
[0065] Figure 10 A flowchart illustrating another method for controlling a virtual character via a touch device, provided as an embodiment of this application;
[0066] Figure 11 This embodiment provides a functional module diagram of a device for controlling virtual characters via a touch device;
[0067] Figure 12 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. Detailed Implementation
[0068] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0069] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0070] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0071] Before introducing the technical solution of this application, the application scenario and the terms involved will be explained first.
[0072] This application's embodiments can be applied to game scenarios, which may include a three-dimensional virtual environment. This three-dimensional virtual environment may include at least one element such as virtual mountains, virtual rivers, virtual trees, virtual buildings, virtual vehicles, and virtual characters. The virtual characters may include non-player characters (NPCs) and player virtual characters; for example, virtual characters may be virtual figures or virtual animals. For player virtual characters, players can control their corresponding virtual characters to perform actions such as movement and interaction with other virtual characters within the three-dimensional virtual environment.
[0073] In one embodiment of this application, the method for controlling a virtual character via a touch device can run on a terminal device or a server. The terminal device can be a local terminal device. When the method runs on a server, it can be implemented and executed based on a cloud interaction system, which can include a server and client devices.
[0074] Figure 1 A cloud interaction system architecture diagram is provided for embodiments of this application, such as... Figure 1 As shown, the system may include: a client device 10 and a server 20, wherein the client device 10 can be connected to the server 20 via a network 30.
[0075] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operation mode, the game program and the game screen presentation are separated. The storage and execution of the game character's transmission method are completed on the cloud gaming server. The client device 10 is used for receiving and sending data and presenting the game screen. For example, the client device 10 can be a display device with data transmission capabilities close to the user, such as a mobile terminal, television, computer, or PDA; however, the terminal device for information processing is the cloud gaming server in the cloud. When playing the game, the player operates the client device 10 to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses the game screen and other data, returns it to the client device 10 through the network, and finally, the client device 10 decodes and outputs the game screen.
[0076] In an alternative implementation, the terminal device can be a local terminal device. Taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, conventionally downloading, installing, and running the game program via an electronic device. The local terminal device can provide the graphical user interface to the player in various ways, such as rendering it on the terminal's display screen, or providing it to the player through holographic projection. For example, the local terminal device can include a display screen for displaying the graphical user interface, which includes game screens, and a processor for running the game, generating the graphical user interface, and controlling the display of the graphical user interface on the display screen.
[0077] Figure 2 This is a flowchart illustrating a method for controlling a virtual character via a touch device, provided in an embodiment of this application. The execution subject of this method can be a terminal device or a client device in a cloud interactive system. This method can provide a graphical user interface via a touch device, displaying action controls on the graphical user interface. The action controls include at least a first attack action control and a second attack action control. Figure 3 This is a schematic diagram of a graphical user interface provided for an embodiment of this application. Figure 2 As shown, the method may include:
[0078] S101, responding to a movement control operation applied to the graphical user interface, controlling the first virtual character to move in the three-dimensional virtual environment.
[0079] The first virtual character can be the first player virtual character that the player can control. The movement control operation can be used to indicate the first virtual character's movement direction, movement distance, movement speed (e.g., jogging, sprinting), movement orientation, etc.
[0080] like Figure 3 As shown, in some embodiments, the graphical user interface 100 may include a motion control, which may include a joystick control 104 and a motion range auxiliary control 105. Both may be circular controls with the same center but different radii, and the radius of the motion range auxiliary control 105 is greater than the radius of the joystick control 104. The joystick control 104 may move within the area corresponding to the motion range auxiliary control 105 according to the touch operation. At the same time, the relative position of the joystick control 104 and the motion range auxiliary control 105 may be used to control the movement of the first virtual character in the three-dimensional virtual environment.
[0081] Optionally, players can generate movement control operations by sliding or dragging the movement control. The touch device responds to these movement control operations, allowing it to control the first virtual character 103 to move within the three-dimensional virtual environment. For example, it can control the first virtual character 103 to sprint to the right in the three-dimensional virtual environment. Of course, the method of generating movement control operations is not limited to this. (Refer to...) Figure 3 As shown, the upper left corner of the graphical user interface 100 can display the identifier (1) of the first virtual character 103 and its vitality information, wherein the vitality information can be identified by its health points. Figure 3 As can be seen, the current health of the first virtual character 103 is 83%.
[0082] S102, responding to the first touch operation applied to the first attack action control, controlling the first virtual character to perform the first attack action using the first virtual character's first melee weapon.
[0083] The first melee weapon is the weapon currently used by the first virtual character. In other words, the first virtual character can be equipped with a first melee weapon. For example, the game system can pre-configure the first melee weapon for the first virtual character, or the player can customize the first melee weapon for the first virtual character.
[0084] The first attack action is a melee attack action where the angle between the virtual attack damage surface, determined by the movement of the melee weapon in the three-dimensional virtual environment, and a specified plane in the three-dimensional virtual environment is less than an angle threshold. During the execution of the first attack action by the first virtual character, target virtual characters that collide with the virtual attack damage surface will suffer attack damage from the first attack action. Optionally, this angle threshold can be 0°, 30°, 60°, etc., and the specified plane in the three-dimensional virtual environment can be a virtual ground surface, virtual wall surface, etc., and is not limited here.
[0085] In some embodiments, if a player clicks the first attack control repeatedly, the first virtual character will attack the enemy virtual character multiple times with the first attack action, or execute a corresponding combo attack based on the number of times the first attack control is clicked and the time interval (for example, if the first attack control is clicked twice in a predetermined time, the first virtual character will be controlled to attack the enemy virtual character with the second attack action).
[0086] In some embodiments, a first attack action control can be used to initiate an attack at a first attack angle, and a second attack action control can be used to initiate an attack at a second attack angle. For example, the first attack action control can be a horizontal attack control, used to initiate an attack at a horizontal attack angle; the second attack action control can be a vertical attack control, used to initiate an attack at a vertical attack angle. Of course, the settings of the first and second attack angles are not limited to these. The virtual attack damage surface corresponding to the first attack angle and the virtual attack damage surface corresponding to the second attack angle can be perpendicular to each other or form any angle. To better understand this application, the following explanation uses the first attack angle as a horizontal attack angle and the second attack angle as a vertical attack angle as an example. It can be understood that during game combat, players can launch an attack on the enemy virtual character by performing the first attack action, so as to cause damage to the enemy virtual character.
[0087] Optionally, players can generate a first touch operation by applying touch operations such as clicking (single or multiple clicks) or swiping to the first attack action control in the action control based on a touch device. In response to this first touch operation, the player can control the first virtual character to perform a first attack action using a first melee weapon. In conjunction with the foregoing, in some embodiments, in response to the first touch operation, the player can control the first virtual character to perform a first attack action using a first melee weapon at a first attack angle (e.g., a horizontal attack angle).
[0088] S103, responding to a second touch operation applied to the second attack action control, controlling the first virtual character to perform a second attack action using the first virtual character's first melee weapon.
[0089] The first and second attack actions have different attack angles. The second attack action is a melee attack action where the angle between the virtual attack damage surface, determined by the movement of the melee weapon in the 3D virtual environment, and a specified plane in the 3D virtual environment is greater than an angle threshold. During the execution of the second attack action by the first virtual character, the target virtual character that collides with the virtual attack damage surface will suffer attack damage from the second attack action. Optionally, the angle threshold can be 0°, 30°, 60°, etc., and the specified plane in the 3D virtual environment can be the virtual ground in the 3D virtual environment, which is not limited here.
[0090] Figure 4 This is an illustration of an attack using a virtual character, provided as an embodiment of this application. Figure 4As shown, the designated plane in the three-dimensional virtual environment can be a virtual ground 42 in the three-dimensional virtual environment, and the angle threshold can be 60°. Optionally, the first attack action can be a melee attack action in which the first virtual attack damage surface 45 (which can be a surface determined by the movement trajectory of the melee weapon 41 in the three-dimensional virtual environment, or a surface determined by the starting and ending positions of the melee weapon in the three-dimensional virtual environment) and the designated plane in the three-dimensional virtual environment have a first angle less than the angle threshold. The virtual attack damage surface can be a plane or a curved surface, and the aforementioned angle can be the angle between two planes or the angle between the tangent of the curved surface and the plane. In some embodiments, the first attack action can also be called a horizontal attack action; correspondingly, the second attack action can be a melee attack action in which the second virtual attack damage surface 46 (which is determined by the movement of the melee weapon 41 in the three-dimensional virtual environment) and the designated plane in the three-dimensional virtual environment have a second angle greater than the angle threshold. In some embodiments, the first attack action can also be called a vertical attack action.
[0091] It should be noted that the descriptions of the first and second attack actions are not limited to the examples above. Optionally, relative to the virtual ground in the three-dimensional virtual environment, the first attack action can also be a melee attack action parallel to the virtual ground, and the second attack action can also be a melee attack action perpendicular to the virtual ground. No limitation is made here.
[0092] In some embodiments, if a player clicks the second attack control repeatedly, the first virtual character will attack the enemy virtual character multiple times with the second attack action, or execute a corresponding combo attack based on the number of times the second attack control is clicked and the time interval (for example, if the second attack control is clicked twice in a predetermined time, the first virtual character will be controlled to attack the enemy virtual character with the first attack action).
[0093] Optionally, players can use touch devices to perform touch operations such as clicking (single or multiple clicks) and swiping to generate a second touch operation on the second attack action control. In response to the second touch operation, players can control the first virtual character to perform a second attack action using a second melee weapon at a second attack angle (e.g., a vertical attack angle).
[0094] S104. In response to the weapon switching command, switch the weapon currently used by the first virtual character from the first melee weapon to the second melee weapon.
[0095] Optionally, the first melee weapon can be any of the following melee weapons: sword, knife, spear, dagger, nunchaku, etc., and the second melee weapon can be another melee weapon different from the first melee weapon, which is not limited here.
[0096] In some embodiments, the graphical user interface 100 may display a weapon switching control 102. Players can interact with the weapon switching control 102 using touch devices through touch methods such as clicking, long-pressing, swiping, and dragging to generate weapon switching commands. In response to the weapon switching command, the weapon currently used by the first virtual character can be switched from a first melee weapon to a second melee weapon, realizing flexible switching of the melee weapon held by the first virtual character. For example, the first melee weapon can be a longsword. Applying the embodiments of this application, the longsword can be switched to a spear (the second melee weapon). Of course, the specific switching method is not limited to this.
[0097] S105, responding to the third touch operation applied to the first attack action control, controlling the first virtual character to perform the first attack action using the second melee weapon.
[0098] The generation method of the third touch operation is the same as that of the first touch operation described above, and will not be repeated here. Based on the above explanation, it can be understood that, in response to the third touch operation, the first virtual character can be controlled to perform a first attack action using the second melee weapon at the first attack angle (e.g., the horizontal attack angle).
[0099] S106. Responding to the fourth touch operation applied to the second attack action control, control the first virtual character to perform the second attack action using the second melee weapon.
[0100] The generation method for the fourth touch operation is the same as that for the second touch operation described above, and will not be repeated here. Based on the above explanation, it can be understood that, in response to this fourth touch operation, the first virtual character can be controlled to perform a second attack action using the second melee weapon at a second attack angle (e.g., a vertical attack angle).
[0101] For example, taking a longsword as the first melee weapon, a horizontal attack angle as the first attack angle, and a vertical attack angle as the second attack angle, the following steps illustrate the control method: In response to a first touch operation, the first virtual character 103 can be controlled to perform a first attack action using the longsword at the horizontal attack angle; in response to a second touch operation, the first virtual character 103 can be controlled to perform a second attack action using the longsword at the vertical attack angle; in response to a weapon switching command, the longsword can be switched to a spear; in response to a third touch operation, the first virtual character 103 can be controlled to perform a first attack action using the spear at the horizontal attack angle; and in response to a fourth touch operation, the first virtual character 103 can be controlled to perform a second attack action using the spear at the vertical attack angle. It can be seen that the control method provided in this embodiment is simple, avoids player misoperation, improves control efficiency, and offers diverse attack methods.
[0102] In summary, this application provides a method for controlling a virtual character via a touch device. The touch device provides a graphical user interface (GUI) that displays action controls, including at least a first attack action control and a second attack action control. The method includes: responding to a movement control operation applied to the GUI to control a first virtual character to move in a three-dimensional virtual environment; responding to a first touch operation applied to the first attack action control to control the first virtual character to perform a first attack action using a first melee weapon, wherein the first melee weapon is the weapon currently used by the first virtual character; responding to a second touch operation applied to the second attack action control to control the first virtual character to perform a second attack action using the first melee weapon, wherein the attack angles of the first and second attack actions are different; and responding to a weapon switching command to switch the weapon currently used by the first virtual character from the first melee weapon to the second melee weapon. The system employs a weapon system; responding to a third touch operation on the first attack action control, it controls the first virtual character to perform a first attack action using a second melee weapon; responding to a fourth touch operation on the second attack action control, it controls the first virtual character to perform a second attack action using the second melee weapon. This allows users to perform the same first (or second) attack action using different melee weapons during combat, avoiding errors caused by changes in the virtual character's attack control logic before and after weapon switching. Furthermore, users can choose different attack angles based on the enemy virtual character's posture (especially in scenarios where physical combat and melee weapons are the primary fighting methods), improving the control efficiency of the virtual character. For example, when an enemy character is down or crouching, a horizontal attack is difficult to land, requiring the user to quickly control the character to perform a vertical attack. However, existing solutions may struggle to make such timely controls, resulting in low efficiency.
[0103] Optionally, refer to Figure 3 As shown, the graphical user interface 100 also includes a skill control 105, wherein the first skill corresponding to the skill control 105 is associated with the first virtual character 103 in the three-dimensional virtual environment, and the first skill corresponds to the first skill cooldown time.
[0104] In some embodiments, the cooldown time of the first skill can be 3 seconds, 5 seconds, 10 seconds, etc., without limitation, such as Figure 3 As shown, the corresponding cooldown time for the first skill is 10 seconds. If the first skill is on cooldown, it is unavailable; if the cooldown timer expires, the first skill becomes available.
[0105] Optionally, players can interact with the skill control 105 via touch devices using touch operations such as clicking, long-pressing, and swiping. In response to these touch operations, players can control the first virtual character 103 to release its associated skill. The first skill associated with the first virtual character can be specific to that virtual character; that is, different skills can be associated with different virtual characters. In some embodiments, if the 3D virtual environment also includes a second virtual character, the second skill associated with the second virtual character can be different from the first skill associated with the first virtual character.
[0106] For example, the first skill associated with the first virtual character 103, whose profession is mage, can be casting spells; the second skill associated with the second virtual character, whose profession is assassin, can be invisibility. Of course, the specific way of setting skills is not limited to this.
[0107] It is worth noting that the actions corresponding to the above action controls have no cooldown time. In other words, the above action controls are always available.
[0108] Figure 5 This is a flowchart illustrating another method for controlling a virtual character via a touch device, provided as an embodiment of this application. Figure 6 This is a schematic diagram of another graphical user interface provided for an embodiment of this application. Optionally, as shown... Figure 6 As shown, the above-mentioned action controls also include defensive action controls, which may include: a sword-swinging control 113, a dodge control 114, etc., and are not limited here. Figure 5 As shown, the above method also includes:
[0109] S201, responding to the fifth touch operation applied to the defensive action control, controlling the first virtual character to perform a defensive action.
[0110] In some embodiments, players can interact with defensive action controls via touch devices by tapping, long-pressing, swiping, or other touch operations. In response to these touch operations, players can control a first virtual character to perform defensive actions.
[0111] Optionally, the defensive action corresponding to each defensive action control can include: a slashing action, where a slashing action refers to the ability to knock away an enemy's weapon through blocking. For example, when the first virtual character is fighting against an enemy virtual character, if the first virtual character performs a slashing action, it can knock away the enemy virtual character's virtual weapon by blocking. Of course, the type of defensive action is not limited to this and can vary depending on the actual application scenario.
[0112] Accordingly, the above response acts on the first touch operation of the first attack action control, controlling the first virtual character to perform a first attack action using the first virtual character's first melee weapon, including:
[0113] S202, In response to the first touch operation applied to the first attack action control, display the first control set.
[0114] The first set of controls includes at least one first control, which is used to trigger the first virtual character to perform a defensive action. In other words, the first set of controls may include at least one first control that can trigger the first virtual character to perform a defensive action.
[0115] like Figure 6 As shown, taking the horizontal attack control 111 as the first attack action control and the vertical attack control 112 as the second attack action control as an example, optionally, a first set of controls can be displayed around the horizontal attack control 111. This first set of controls may include: a sword swing control 113, and may also include a dodge control 114. Of course, the specific display method is not limited to this.
[0116] In some embodiments, a first wheel containing a first set of controls can be displayed around the horizontal tap control 111, centered on the horizontal tap control 111, in the form of a wheel. The first wheel contains controls from the first set of controls. Of course, in some embodiments, the first wheel can be set at a preset position in a blank area of the graphical user interface, such as the lower right corner, upper right corner, upper left corner, etc., which is not limited here.
[0117] In addition, the touch operation corresponding to the first touch operation can be a click operation (single click or multiple clicks) or a swipe operation. Depending on the different touch operation methods, the first virtual character can be controlled to perform different attack actions.
[0118] S203. If the first touch operation is a click operation, then control the first virtual character to perform the first attack action.
[0119] If the first touch operation is a click operation, the first virtual character can be controlled to perform the first attack action as described above, and will not be repeated here.
[0120] S204. If the first touch operation is a swipe operation, then determine the first target control from the controls contained in the first control set according to the swipe operation, and control the first virtual character to perform the action corresponding to the first target control.
[0121] Optionally, the operation parameters corresponding to the sliding operation may include sliding parameters such as sliding direction, sliding speed, and sliding trajectory. Different sliding parameters may correspond to different first controls in the first control set. Of course, in some embodiments, the control in the first control set that is closest to the end point of the sliding trajectory of the sliding operation may be used as the first target control, so that the first target control can be quickly and accurately determined from the first control set.
[0122] Based on the above explanation, if the first touch operation is a swipe operation, then after displaying the first set of controls, it is necessary to determine the first target control from the controls included in the first set of controls according to at least one of the swipe parameters of the swipe operation, and control the first virtual character to perform the action corresponding to the first target control. For example, if the first target control can be a slashing control, then the first virtual character can be controlled to perform a slashing action.
[0123] Referring to the above Figure 6 As shown in the example, if the sliding parameters include the sliding direction, and if the sliding direction is a first direction (e.g., right sliding), then the step of determining the first target control from the controls contained in the first control set based on the sliding operation can include: determining the first control corresponding to the first direction from the controls contained in the first control set as the first target control. For example, the slashing control can be determined as the first target control. In this case, the first virtual character 103 will be controlled to perform the slashing action. Of course, the specific determination method is not limited to this.
[0124] Optionally, in some embodiments, depending on the actual application scenario, after controlling the first virtual character to perform the action corresponding to the first target control, the display of the first control set may be canceled, or the display of the first control set may be canceled in response to the end of the first touch operation, which is not limited here.
[0125] Taking the first attack action control as an example, in some embodiments, the first virtual character can also be controlled to perform a third attack action through the first touch operation. The third attack action deals different damage to the enemy virtual character than the first attack action. For example, the attack intensity and / or duration of the third attack action differ from the first attack action. Specifically, the first attack action is a normal attack, while the third attack action is a charged attack.
[0126] The following explanation is based on the touch method corresponding to the first touch operation.
[0127] In some embodiments, if the first touch operation is a long press operation and the press duration is greater than or equal to a first time threshold, the first virtual character is controlled to perform a third attack action.
[0128] In some embodiments, if the first touch operation is a long press, the system controls the first virtual character to perform a preparatory action for the third attack action, and after the press duration is greater than or equal to a first time threshold, the system controls the first virtual character to perform the third attack action. The preparatory action for the third attack action may be controlling the posture of the first virtual character or controlling the action of the first virtual character holding a weapon, etc. The specific preparatory action is related to the melee weapon currently held by the first virtual character and the current combat scenario of the virtual character.
[0129] In some embodiments, if the first touch operation is a long press operation and the press duration of the long press operation is greater than or equal to a first time threshold and less than a second time threshold at the end of the long press operation, then the first virtual character is triggered to perform a third attack action at the end of the long press operation, wherein the second time threshold is greater than the first time threshold. Optionally, the first time threshold and the second time threshold can be pre-configured according to the actual game, and this embodiment does not limit this.
[0130] Optionally, the above method further includes: if the first touch operation is a long press operation and the press duration of the long press operation is equal to the second time threshold, automatically triggering the first virtual character to perform a third attack action.
[0131] The aforementioned methods for triggering the first virtual character to execute the third attack action can be selected in one or more ways depending on the specific game, and this application embodiment does not limit this. Taking the third attack action as a charged attack of the first attack action as an example, if the player long-presses the first attack action control, it indicates that a charged attack is to be performed. When the long-press duration is between the first time threshold and the second time threshold, if the player lifts their finger to end the long-press operation, the first virtual character is controlled to perform a charged attack (i.e., the third attack action); or when the player long-presses for more than the second time threshold, the first virtual character is automatically controlled to perform a charged attack.
[0132] By applying the embodiments of this application, the functionality of the first attack action control can be expanded, allowing players to sample different operation methods on the first attack action control in different combat scenarios to trigger the virtual character to perform different attack actions, thereby achieving different attack effects.
[0133] Optionally, the above method further includes: if the first touch operation is a long press operation and the press duration of the long press operation is greater than or equal to a first time threshold and less than a second time threshold, in response to the continuous sliding operation of the long press operation, determining a first target control from the first control set, and controlling the first virtual character to perform the action corresponding to the first target control.
[0134] For example, by triggering the action corresponding to the first target control as described above, taking the attack action corresponding to the first touch operation as a charged attack as an example, if the player wants to interrupt the current charged attack and quickly enter the slashing action, then at this time the player does not need to lift the finger, but only needs to slide the finger to the first target control in the first control set, and can directly control the virtual character to interrupt the current charged attack and execute the action corresponding to the first target control. In this way, the player can quickly defend against the attack of the enemy virtual character, gain a greater combat advantage, improve the continuity of virtual character control, and reduce the possibility of misoperation.
[0135] By applying the embodiments of this application, if a player wants the first virtual character to abandon the execution of the third attack action due to combat needs, during the process of triggering the third attack action by long-pressing the first attack action control, the player can slide their finger on the basis of the long-press operation, determine the first target control from the first control set according to the direction of the finger slide operation, and then trigger the virtual character to execute the action corresponding to the first target control. This realizes timely adjustment of combat strategy, improves the continuity of virtual character control, and reduces the possibility of misoperation.
[0136] It should be noted that if the second touch operation is a long press and the press duration is greater than or equal to the first time threshold, the first virtual character will also be controlled to perform the third attack action. For an explanation of this part, please refer to the explanation of the first touch operation above, which will not be repeated here.
[0137] Figure 7 This is a flowchart illustrating another method for controlling a virtual character via a touch device, provided as an embodiment of this application. Optionally, as... Figure 7 As shown, the above action controls also include defensive action controls, and the above method further includes:
[0138] S301, responding to the fifth touch operation applied to the defensive action control, controlling the first virtual character to perform a defensive action.
[0139] For an explanation of this part, please refer to the relevant part of step S201 above, which will not be repeated here.
[0140] The above response acts on the second touch operation of the second attack action control, controlling the first virtual character to perform a second attack action using the first virtual character's first melee weapon, including:
[0141] S302, In response to a second touch operation applied to the second attack action control, display the second control set.
[0142] The second set of controls includes at least one second control, which is used to trigger the first virtual character to perform a defensive action. In other words, the second set of controls may include at least one second control that can trigger the first virtual character to perform a defensive action.
[0143] In addition, the second touch operation can be a click operation (single or multiple clicks) or a swipe operation. Depending on the different touch operation methods, the first virtual character can be controlled to perform different attack actions.
[0144] S303. If the second touch operation is a click operation, then control the first virtual character to perform the second attack action.
[0145] If the second touch operation is a click operation, the method described above can be used to control the first virtual character to perform the second attack action, which will not be repeated here.
[0146] S304. If the second touch operation is a swipe operation, then determine the second target control from the controls contained in the second control set according to the swipe operation, and control the first virtual character to perform the action corresponding to the second target control.
[0147] Optionally, the operation parameters corresponding to the sliding operation may include sliding parameters such as sliding direction and sliding speed, wherein different sliding parameters may correspond to different second controls in the second control set.
[0148] Based on the above explanation, if the second touch operation is a swipe operation, then after displaying the second set of controls, it is necessary to determine the second target control from the controls included in the second set of controls according to the swipe parameters of the swipe operation, and then control the first virtual character to perform the action corresponding to the second target control. For example, if the second target control can be a dodge control, then the first virtual character can be controlled to perform a dodge action. For further explanation of this part, please refer to the relevant section of S204 above.
[0149] Optionally, in some embodiments, depending on the actual application scenario, after controlling the first virtual character to perform the action corresponding to the second target control, the display of the second control set can also be cancelled, which is not limited here.
[0150] Figure 8 This application provides another graphical user interface schematic diagram. In some embodiments, such as... Figure 8 As shown, the second set of controls can be centered on the horizontal attack control 111, with two defensive action controls, the dodge control 114 and the sword-striking control 113, displayed around it. In addition, in order to allow players to flexibly switch attack methods during control, the horizontal attack control 111 can also include two combined controls, the jump horizontal attack control 115 and the crouch horizontal attack control 116. The jump horizontal attack control 115 is used to trigger the first virtual character to perform the jump action and the horizontal attack action in sequence, and the crouch horizontal attack control 116 is used to trigger the first virtual character to perform the crouch action and the horizontal attack action in sequence.
[0151] Of course, it should be noted that, depending on the actual application scenario, the horizontal attack control 111 can also include any type of control such as vertical attack control, jump vertical attack control, and crouch vertical attack control. There are no restrictions here. Depending on the actual application scenario, players can also customize the number of the second control set and the arrangement order of each second control in the second control set.
[0152] Applying the embodiments of this application, refer to Figure 8As shown, taking the horizontal attack control 111 as an example, it can be seen that during the game, the player can perform a first touch operation on the horizontal attack control 111 using touch devices through tapping (single or multiple taps), long pressing, etc. In response to this first touch operation, the player can control the first virtual character 103 to perform a horizontal attack using the first melee weapon. Furthermore, the player can also perform a first touch operation on the horizontal attack control 111 using swiping, for example, swiping left to the display area where the dodge control 114 is located. In response to this first touch operation, the player can identify the dodge control 114 as the second target control and control the first virtual character 103 to perform a dodge. That is, by switching the touch method applied to the horizontal attack control 111, a continuous operation of horizontal attack and dodge can be achieved, ensuring the continuity of the first virtual character's control actions.
[0153] It is worth noting that, for example, the sliding operation can be an upward swipe. In response to the first touch operation, the jump and horizontal attack control 115 can be identified as the second target control, and the first virtual character 103 can be controlled to perform a jump and horizontal attack action.
[0154] Based on the above explanation, it is understandable that in practical applications, players can use touch devices and the combination of motion controls and second control sets to achieve continuous operation of attack and defense actions, thereby improving control efficiency.
[0155] It should be noted that, depending on the actual application scenario, such as Figure 8 As shown, the graphical user interface 100 may also include separately configured (i.e., permanently displayed) blade control 113 and dodge control 114, so that players can flexibly use each defensive action control according to the actual application scenario. Optionally, when each defensive action control is set separately, players can operate on each defensive action control through touch screen via tapping, long-pressing, or other touch methods, which is not limited here. In addition, in some embodiments, refer to Figure 8 As shown, the graphical user interface may further include a posture adjustment control, which may include a jump control 117, wherein, in response to a touch operation on the jump control 117, the first virtual character 103 may be controlled to perform a jump action.
[0156] Optionally, in some embodiments, the above method includes: in response to a click operation on the jump control, controlling a first virtual character to perform a first jump action; in response to a long press operation on the jump control, controlling the first virtual character to perform a second jump action, wherein the first jump action and the second jump action have different jump postures and / or jump heights.
[0157] Figure 9 This is a schematic diagram of another graphical user interface provided for an embodiment of this application. For example... Figure 9 The diagram shows the specific representations of the horizontal attack control 111, vertical attack control 112, sword swing control 113, dodge control 114, and jump control 115. As you can see, the diagrams clearly illustrate the meaning of each control, making it easier for players to distinguish them. However, it should be noted that the specific diagrams for each control are not limited to this one and can be flexibly set according to the actual application scenario.
[0158] Figure 10 This is a flowchart illustrating another method for controlling a virtual character via a touch device, provided as an embodiment of this application. Optionally, as... Figure 10 As shown, if the first touch operation is a swipe operation, the steps of determining the first target control from the controls included in the first control set and controlling the first virtual character to perform the action corresponding to the first target control may include:
[0159] S401. If the first touch operation is a swipe operation, determine the first target control from the controls contained in the first control set, and determine whether the action interruption condition is met based on the current action state of the virtual character and the action corresponding to the first target control.
[0160] The virtual character's action state can include: standing, running, jumping, crouching, crawling, etc., without limitation. It is worth noting that the various action states mentioned in this application embodiment all represent a set of actions. Taking the jumping action as an example, the set of actions corresponding to the jumping action can include: jumping on a beam, jumping on flat ground, jumping forward, running and jumping, etc., without limitation.
[0161] Depending on the specific first target control, it can correspond to different defensive actions. For example, it can correspond to a sword-wielding action or a dodge action, or it can be other defensive actions. It is worth noting that the various defensive actions mentioned in this embodiment represent a set of actions. Taking the dodge action as an example, the combination of actions corresponding to this dodge action can include: short dodge, long dodge, double dodge, etc., and is not limited here.
[0162] An action interruption condition can indicate whether a virtual character can perform the action corresponding to the first target control in its current action state. The action interruption condition can be set according to the type of action state and the type of action corresponding to the first target control. For example, a virtual character can perform a dodge action when it is in a crouching state, but cannot perform a dodge action when it is in a jumping state. Of course, the specific setting method is not limited to this. Alternatively, the action interruption condition can be set according to the type of action state and the trigger time corresponding to the first target control. For example, if a swipe-type first touch operation is received within N seconds (e.g., 2 seconds, 3 seconds, etc.) after the first virtual character enters a crouching state, the first virtual character will not be controlled to perform a dodge action. Of course, in some embodiments, the first virtual character can be further controlled to continue performing the crouching action to prevent the crouching action from being completed normally.
[0163] Based on the above description, after determining the first target control from the controls contained in the first control set, it is also possible to determine whether the action interruption condition is met based on the current action state of the virtual character and the action corresponding to the first target control. Different actions can be executed based on different determination results.
[0164] S402. If satisfied, control the first virtual character to execute the action corresponding to the first target control.
[0165] S403. If not satisfied, do not control the first virtual character to execute the action corresponding to the first target control, or control the first virtual character to continue executing the currently unfinished action.
[0166] If the condition is met, it means that the action corresponding to the first target control can be executed in a timely manner in the current state. In this case, the first virtual character can be controlled to execute the action corresponding to the first target control. If the condition is not met, it means that the action corresponding to the first target control cannot be executed in the current state. In this case, the first touch operation of the sliding type can be ignored, and no operation is performed, that is, the first virtual character is not controlled to execute the action corresponding to the first target control. Of course, in some embodiments, if the condition is not met, the first virtual character can be controlled to continue to execute the currently unfinished action to ensure the continuity of the action currently being performed by the first virtual character.
[0167] Figure 11 This embodiment provides a functional module diagram of a device for controlling a virtual character via a touch device. The device can provide a graphical user interface (GUI) through the touch device, displaying action controls. These action controls include at least a first attack action control and a second attack action control. The basic principle and technical effects of this device are the same as those in the aforementioned corresponding method embodiment. For brevity, parts not mentioned in this embodiment can be referred to the corresponding content in the method embodiment. Figure 11As shown, the device 200 may include:
[0168] The movement module 210 is used to respond to movement control operations applied to the graphical user interface and control the first virtual character to move in the three-dimensional virtual environment.
[0169] The first execution module 220 is used to respond to a first touch operation applied to the first attack action control and control the first virtual character to perform a first attack action using the first melee weapon of the first virtual character, wherein the first melee weapon is the weapon currently used by the first virtual character;
[0170] The second execution module 230 is used to respond to a second touch operation applied to the second attack action control and control the first virtual character to perform a second attack action using the first virtual character's first melee weapon, wherein the attack angles of the first attack action and the second attack action are different.
[0171] The switching module 240 is used to respond to a weapon switching command and switch the weapon currently used by the first virtual character from the first melee weapon to the second melee weapon;
[0172] The third execution module 250 is used to respond to the third touch operation applied to the first attack action control and control the first virtual character to perform the first attack action using the second melee weapon;
[0173] The fourth execution module 260 is used to respond to the fourth touch operation applied to the second attack action control and control the first virtual character to perform the second attack action using the second melee weapon.
[0174] In an optional implementation, the graphical user interface further includes a skill control, wherein the first skill corresponding to the skill control is associated with a first virtual character in the three-dimensional virtual environment, and the first skill corresponds to a first skill cooldown time.
[0175] In an optional implementation, the action control further includes a defensive action control, and the device further includes: a control module, configured to respond to a fifth touch operation applied to the defensive action control and control the first virtual character to perform a defensive action;
[0176] The first execution module 220 is specifically used to respond to the first touch operation applied to the first attack action control and display the first control set;
[0177] If the first touch operation is a click operation, then the first virtual character is controlled to perform the first attack action; if the first touch operation is a swipe operation, then a first target control is determined from the controls included in the first control set according to the swipe operation, and the first virtual character is controlled to perform the action corresponding to the first target control; wherein, the first control set includes at least a first control, and the first control is used to trigger the first virtual character to perform the defensive action.
[0178] In an optional implementation, the action control further includes a defensive action control, and the device further includes: a control module, configured to respond to a fifth touch operation applied to the defensive action control and control the first virtual character to perform a defensive action;
[0179] The second execution module 230 is specifically used to respond to the second touch operation applied to the second attack action control and display the second control set;
[0180] If the second touch operation is a click operation, then the first virtual character is controlled to perform the second attack action;
[0181] If the second touch operation is a swipe operation, then a second target control is determined from the controls contained in the second control set according to the swipe operation, and the first virtual character is controlled to perform the action corresponding to the second target control; wherein, the second control set contains at least a second control, and the second control is used to trigger the first virtual character to perform the defensive action.
[0182] In an optional implementation, the first execution module 220 is specifically used to determine a first target control from the controls included in the first control set if the first touch operation is a swipe operation, and determine whether the action interruption condition is met based on the current action state of the first virtual character and the action corresponding to the first target control.
[0183] If the conditions are met, control the first virtual character to perform the action corresponding to the first target control.
[0184] In an optional implementation, the first execution module 220 is specifically configured to not control the first virtual character to perform the action corresponding to the first target control if the condition is not met.
[0185] In an optional implementation, the first execution module 220 is specifically used to control the first virtual character to continue performing the currently unfinished action if the condition is not met.
[0186] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.
[0187] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).
[0188] Figure 12 This is a schematic diagram of an electronic device structure provided as an embodiment of this application. Figure 12 As shown, the electronic device may include a processor 310, a storage medium 320, and a bus 330. The storage medium 320 stores machine-readable instructions executable by the processor 310. When the electronic device is running, the processor 310 communicates with the storage medium 320 via the bus 330, and the processor 310 executes the machine-readable instructions to perform the steps of the above method embodiment. The specific implementation and technical effects are similar and will not be described in detail here.
[0189] Optionally, this application also provides a computer-readable storage medium storing a computer program, which, when run by a processor, executes the steps of the above-described method embodiments. The specific implementation and technical effects are similar and will not be repeated here.
[0190] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0191] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0192] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0193] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0194] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0195] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need further definition and explanation in subsequent figures. The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for controlling a virtual character via a touch device, wherein the touch device provides a graphical user interface, characterized in that, Displaying action controls in the graphical user interface, the action controls including at least a first attack action control and a second attack action control, the method comprising: In response to a movement control operation applied to the graphical user interface, the first virtual character is controlled to move in the three-dimensional virtual environment; In response to a first touch operation applied to the first attack action control, the first virtual character is controlled to perform a first attack action using the first melee weapon of the first virtual character, wherein the first melee weapon is the weapon currently used by the first virtual character; In response to a second touch operation applied to the second attack action control, the first virtual character is controlled to perform a second attack action using the first virtual character's first melee weapon, wherein the attack angles of the first attack action and the second attack action are different; In response to a weapon switching command, the weapon currently used by the first virtual character is switched from the first melee weapon to the second melee weapon; In response to a third touch operation applied to the first attack action control, the first virtual character is controlled to perform a first attack action using the second melee weapon; In response to a fourth touch operation applied to the second attack action control, the first virtual character is controlled to perform a second attack action using the second melee weapon.
2. The method according to claim 1, characterized in that, The graphical user interface also includes skill controls, wherein the first skill corresponding to the skill control is associated with a first virtual character in the three-dimensional virtual environment, and the first skill corresponds to a first skill cooldown time.
3. The method according to claim 1, characterized in that, The action control also includes a defensive action control, and the method further includes: In response to a fifth touch operation applied to the defensive action control, the first virtual character is controlled to perform a defensive action; The response to the first touch operation applied to the first attack action control controls the first virtual character to perform a first attack action using the first virtual character's first melee weapon, including: In response to a first touch operation applied to the first attack action control, the first set of controls is displayed; If the first touch operation is a click operation, then the first virtual character is controlled to perform the first attack action; if the first touch operation is a swipe operation, then a first target control is determined from the controls included in the first control set according to the swipe operation, and the first virtual character is controlled to perform the action corresponding to the first target control; wherein, the first control set includes at least a first control, and the first control is used to trigger the first virtual character to perform the defensive action.
4. The method according to claim 1, characterized in that, The action control also includes a defensive action control, and the method further includes: In response to a fifth touch operation applied to the defensive action control, the first virtual character is controlled to perform a defensive action; The response to the second touch operation applied to the second attack action control controls the first virtual character to perform a second attack action using the first virtual character's first melee weapon, including: In response to a second touch operation applied to the second attack action control, a second set of controls is displayed; If the second touch operation is a click operation, then the first virtual character is controlled to perform the second attack action; If the second touch operation is a swipe operation, then a second target control is determined from the controls contained in the second control set according to the swipe operation, and the first virtual character is controlled to perform the action corresponding to the second target control; wherein, the second control set contains at least a second control, and the second control is used to trigger the first virtual character to perform the defensive action.
5. The method according to claim 3, characterized in that, If the first touch operation is a swipe operation, determining a first target control from the controls included in the first control set and controlling the first virtual character to perform the action corresponding to the first target control includes: If the first touch operation is a swipe operation, the first target control is determined from the controls included in the first control set, and whether the action interruption condition is met is determined based on the current action state of the first virtual character and the action corresponding to the first target control. If the conditions are met, control the first virtual character to perform the action corresponding to the first target control.
6. The method according to claim 5, characterized in that, The method includes: If the conditions are not met, the first virtual character will not be controlled to perform the action corresponding to the first target control.
7. The method according to claim 5, characterized in that, The method includes: If the conditions are not met, control the first virtual character to continue performing the currently unfinished action.
8. An apparatus for controlling a virtual character via a touch device, wherein the touch device provides a graphical user interface, characterized in that, The graphical user interface displays action controls, the action controls including at least a first attack action control and a second attack action control, and the device includes: A movement module is used to respond to movement control operations applied to the graphical user interface and control the movement of the first virtual character in the three-dimensional virtual environment. The first execution module is used to respond to a first touch operation applied to the first attack action control and control the first virtual character to perform a first attack action using the first melee weapon of the first virtual character, wherein the first melee weapon is the weapon currently used by the first virtual character; The second execution module is used to respond to a second touch operation applied to the second attack action control and control the first virtual character to perform a second attack action using the first virtual character's first melee weapon, wherein the attack angles of the first attack action and the second attack action are different. The switching module is used to respond to weapon switching commands and switch the weapon currently used by the first virtual character from the first melee weapon to the second melee weapon; The third execution module is used to respond to the third touch operation applied to the first attack action control and control the first virtual character to perform the first attack action using the second melee weapon; The fourth execution module is used to respond to the fourth touch operation applied to the second attack action control and control the first virtual character to perform the second attack action using the second melee weapon.
9. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the method for controlling a virtual character via a touch device as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the method for controlling a virtual character via a touch device as described in any one of claims 1-7.
Citation Information
Patent Citations
Aerial stable attacking method and device for game
CN109568949A
Display control method of game virtual weapon control, electronic equipment and storage medium
CN111388998A