A method and apparatus for controlling a virtual weapon in a game
By using virtual weapon control, users can set the number of shots per burst through parameter settings, which solves the problems of wasted time and missed opportunities caused by long-press operations, thus improving the gaming experience and win rate.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2022-10-10
- Publication Date
- 2026-05-19
AI Technical Summary
In existing virtual games, users need to hold down the launch control to fire multiple bullets at once, which wastes time and causes missed opportunities, thus reducing the gaming experience.
A virtual weapon control method is provided, which sets the number of projectiles to be launched in a single firing operation through parameter setting controls, and automatically controls the firing in response to firing operations, including determining the number of projectiles to be launched by combining single-click or long-press operations with preset relationships.
Users can quickly set the number of launchers, avoiding long-press operations, improving their ability to seize opportunities, and increasing their chances of winning the game and enhancing their overall experience.
Smart Images

Figure CN115779449B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to a method, device, electronic device, and computer-readable storage medium for controlling virtual weapons in a game. Background Technology
[0002] In virtual games, users can control virtual objects to attack enemy virtual objects using shooting-type virtual weapons. To quickly hit enemy virtual objects, virtual weapons capable of firing multiple bullets simultaneously are highly popular among users.
[0003] In existing virtual games, the methods for using virtual weapons that can fire multiple bullets simultaneously include at least the following two: First, the user presses and releases the fire control, which fires one bullet; Second, the user presses and holds the fire control, and the number of bullets loaded is determined based on the length of time the user holds the fire control (the length of time is positively correlated with the number of bullets) until the number of bullets loaded into the virtual weapon reaches its maximum limit, and the virtual weapon fires all loaded bullets simultaneously the moment the user releases the fire control.
[0004] However, if users want to fire multiple bullets at once, they have to long-press the fire control each time. This long-press operation every time is time-consuming and may even cause them to miss opportunities, thus reducing the user's gaming experience. Summary of the Invention
[0005] This application provides a virtual weapon control method, device, electronic device, and computer-readable storage medium in a game to solve the problem in the prior art that in order to achieve the simultaneous firing of multiple bullets in a single operation, it is necessary to press and hold the fire control each time, which can easily lead to missed opportunities and cause great inconvenience to the user.
[0006] In a first aspect, embodiments of this application provide a method for controlling virtual weapons in a game, the method comprising:
[0007] In response to a parameter setting trigger command for a target virtual weapon, a parameter setting control corresponding to the target virtual weapon is displayed in the display interface. The parameter setting control is used to set the number of projectiles fired by the target virtual weapon after a single trigger firing.
[0008] In response to a setting operation on the parameter setting control, a first quantity is determined based on the quantity corresponding to the setting operation;
[0009] In response to a firing operation against the target virtual weapon, the number of projectiles fired by the target virtual weapon in a single firing is controlled according to the first quantity.
[0010] Optionally, the target virtual weapon includes a virtual cavity for accommodating the projectile to be launched by the target virtual weapon;
[0011] Before controlling the number of projectiles fired in a single burst by the target virtual weapon in response to a firing operation against the target virtual weapon, based on the first quantity, the following steps are included:
[0012] The first number of projectiles are filled into the virtual cavity of the target virtual weapon;
[0013] The step of controlling the number of projectiles launched in a single firing of the target virtual weapon according to the first quantity includes:
[0014] The number of projectiles fired in a single launch by the target virtual weapon is controlled based on the number of projectiles filled in the virtual cavity.
[0015] Optionally, the step of controlling the number of projectiles fired by the target virtual weapon in a single firing, in response to a firing operation against the target virtual weapon, according to the first quantity, includes:
[0016] In response to a click operation of the firing control for the target virtual weapon, the target virtual weapon is controlled to fire the first number of projectiles in a single burst.
[0017] Optionally, the step of controlling the number of projectiles fired by the target virtual weapon in a single firing, in response to a firing operation against the target virtual weapon, according to the first quantity, includes:
[0018] In response to a long press operation on the firing control of the target virtual weapon, a second quantity is determined based on the press duration of the long press operation and a preset correspondence, and the second quantity is determined as the number of newly added projectiles when the target virtual weapon fires in a single firing. The preset correspondence is used to indicate the correspondence between the press duration and the number of newly added projectiles.
[0019] In response to the end of the long press operation on the shooting control, the target virtual weapon is controlled to fire a third number of projectiles in a single operation, the third number being determined based on the sum of the first number and the second number.
[0020] Optionally, the method further includes:
[0021] In response to the completion of the single launch by the target virtual weapon, the first number of projectiles are filled into the virtual container of the target virtual weapon.
[0022] Optionally, the parameter setting control includes a preset number of indicator icons, and the setting operation is to select at least one of the preset number of indicator icons;
[0023] The step of determining a first quantity based on the quantity corresponding to the setting operation in response to a setting operation of the parameter setting control includes:
[0024] In response to the selection operation of the indicator in the parameter setting control, the number of selected indicator is determined as a first quantity.
[0025] Optionally, the preset number of indicator icons are placed sequentially along a preset direction. When the indicator icon is not selected, it is in a first form, and when the indicator icon is selected, it switches from the first form to a second form.
[0026] The step of responding to a selection operation of an indicator in the parameter setting control, determining the number of selected indicators as a first quantity, includes:
[0027] In response to a first sliding operation performed on the parameter setting control along the preset direction, the form of the indicator traced by the sliding trajectory formed by the first sliding operation is switched from the first form to the second form.
[0028] In response to stopping the sliding operation for the parameter setting control, the number of indicator icons in the second form is determined as a first number.
[0029] Optionally, before determining the number of indicator icons in the second form as a first number in response to stopping the sliding operation for the parameter setting control, the method further includes:
[0030] In response to a second sliding operation performed on the parameter setting control in the opposite direction of the preset direction, the form of the indicator traced by the sliding trajectory formed by the second sliding operation is switched from the second form to the first form.
[0031] Optionally, the parameter setting control includes a maximum number of transmissions setting control;
[0032] The response to ending the long press operation on the firing control and before controlling the target virtual weapon to fire a third number of projectiles in a single burst also includes:
[0033] In response to the setting operation of the maximum number of launches setting control in the parameter setting control, the maximum number of launches fired by the target virtual weapon after a single trigger firing is determined;
[0034] The control of the target virtual weapon to fire a third number of projectiles in a single launch includes:
[0035] If the sum of the first quantity and the second quantity is less than the maximum quantity, the sum of the first quantity and the second quantity shall be determined as the third quantity;
[0036] If the sum of the first quantity and the second quantity is greater than or equal to the maximum quantity, the maximum quantity is determined as the third quantity;
[0037] Control the target virtual weapon to fire the third number of projectiles in a single launch.
[0038] Optionally, the parameter setting control includes a minimum number of emitters setting control;
[0039] Before controlling the target virtual weapon to fire the first number of projectiles in a single burst in response to a click operation of the firing control for the target virtual weapon, the method further includes:
[0040] In response to the setting operation of the minimum firing quantity setting control in the parameter setting control, the minimum number of projectiles fired by the target virtual weapon after a single trigger firing is determined;
[0041] The step of determining a first quantity based on the quantity corresponding to the setting operation in response to a setting operation of the parameter setting control includes:
[0042] If the quantity corresponding to the setting operation is greater than the minimum quantity, the quantity corresponding to the setting operation is determined as the first quantity;
[0043] If the quantity corresponding to the setting operation is less than or equal to the minimum quantity, the minimum quantity is determined as the first quantity.
[0044] Optionally, the game includes at least one type of virtual weapon, and each type of virtual weapon is set with a preset maximum number of shots per shot and a preset minimum number of shots per shot;
[0045] The first quantity is greater than or equal to the preset minimum single-fire quantity corresponding to the target virtual weapon, and less than or equal to the preset maximum single-fire quantity corresponding to the target virtual weapon, and the third quantity is less than or equal to the preset maximum single-fire quantity corresponding to the target virtual weapon.
[0046] Secondly, embodiments of this application provide a virtual weapon control device for games, the device comprising:
[0047] The display module is used to respond to a parameter setting trigger command for a target virtual weapon and display the parameter setting control corresponding to the target virtual weapon in the display interface. The parameter setting control is used to set the number of projectiles fired by the target virtual weapon after a single trigger firing.
[0048] A determining module is configured to, in response to a setting operation on the parameter setting control, determine a first quantity based on the quantity corresponding to the setting operation;
[0049] The processing module is configured to, in response to a firing operation against the target virtual weapon, control the number of projectiles fired by the target virtual weapon in a single firing based on the first quantity.
[0050] Optionally, the target virtual weapon includes a virtual cavity for accommodating the projectile to be launched by the target virtual weapon;
[0051] The device further includes a filling module, which is specifically used for:
[0052] The first number of projectiles are filled into the virtual cavity of the target virtual weapon;
[0053] The processing module is specifically used for:
[0054] The number of projectiles fired in a single launch by the target virtual weapon is controlled based on the number of projectiles filled in the virtual cavity.
[0055] Optionally, the processing module is specifically used for:
[0056] In response to a click operation of the firing control for the target virtual weapon, the target virtual weapon is controlled to fire the first number of projectiles in a single burst.
[0057] Optionally, the processing module is specifically used for:
[0058] In response to a long press operation on the firing control of the target virtual weapon, a second quantity is determined based on the press duration of the long press operation and a preset correspondence, and the second quantity is determined as the number of newly added projectiles when the target virtual weapon fires in a single firing. The preset correspondence is used to indicate the correspondence between the press duration and the number of newly added projectiles.
[0059] In response to the end of the long press operation on the shooting control, the target virtual weapon is controlled to fire a third number of projectiles in a single operation, the third number being determined based on the sum of the first number and the second number.
[0060] Optionally, the filling module is further configured to:
[0061] In response to the completion of the single launch by the target virtual weapon, the first number of projectiles are filled into the virtual container of the target virtual weapon.
[0062] Optionally, the parameter setting control includes a preset number of indicator icons, and the setting operation is to select at least one of the preset number of indicator icons;
[0063] The determining module is specifically used for:
[0064] In response to the selection operation of the indicator in the parameter setting control, the number of selected indicator is determined as a first quantity.
[0065] Optionally, the preset number of indicator icons are placed sequentially along a preset direction. When the indicator icon is not selected, it is in a first form, and when the indicator icon is selected, it switches from the first form to a second form.
[0066] The display module is specifically used for:
[0067] In response to a first sliding operation performed on the parameter setting control along the preset direction, the form of the indicator traced by the sliding trajectory formed by the first sliding operation is switched from the first form to the second form.
[0068] In response to stopping the sliding operation for the parameter setting control, the number of indicator icons in the second form is determined as a first number.
[0069] Optionally, the display module is further configured to:
[0070] In response to a second sliding operation performed on the parameter setting control in the opposite direction of the preset direction, the form of the indicator traced by the sliding trajectory formed by the second sliding operation is switched from the second form to the first form.
[0071] Optionally, the parameter setting control includes a maximum number of transmissions setting control;
[0072] The determining module is also used for:
[0073] In response to the setting operation of the maximum number of launches setting control in the parameter setting control, the maximum number of launches fired by the target virtual weapon after a single trigger firing is determined;
[0074] The processing module is specifically used for:
[0075] If the sum of the first quantity and the second quantity is less than the maximum quantity, the sum of the first quantity and the second quantity shall be determined as the third quantity;
[0076] If the sum of the first quantity and the second quantity is greater than or equal to the maximum quantity, the maximum quantity is determined as the third quantity;
[0077] Control the target virtual weapon to fire the third number of projectiles in a single launch.
[0078] Optionally, the parameter setting control includes a minimum number of emitters setting control;
[0079] The determining module is also used for:
[0080] In response to the setting operation of the minimum firing quantity setting control in the parameter setting control, the minimum number of projectiles fired by the target virtual weapon after a single trigger firing is determined;
[0081] The determining module is also used for:
[0082] If the quantity corresponding to the setting operation is greater than the minimum quantity, the quantity corresponding to the setting operation is determined as the first quantity;
[0083] If the quantity corresponding to the setting operation is less than or equal to the minimum quantity, the minimum quantity is determined as the first quantity.
[0084] Optionally, the game includes at least one type of virtual weapon, and each type of virtual weapon is set with a preset maximum number of shots per shot and a preset minimum number of shots per shot;
[0085] The first quantity is greater than or equal to the preset minimum single-fire quantity corresponding to the target virtual weapon, and less than or equal to the preset maximum single-fire quantity corresponding to the target virtual weapon, and the third quantity is less than or equal to the preset maximum single-fire quantity corresponding to the target virtual weapon.
[0086] Thirdly, embodiments of this application provide an electronic device, the electronic device comprising:
[0087] The memory and the processor are coupled;
[0088] The memory is used to store one or more computer instructions;
[0089] The processor is used to execute one or more computer instructions to implement the virtual weapon control method in the game as described in any of the first aspects above.
[0090] Fourthly, embodiments of this application provide a computer-readable storage medium storing one or more computer instructions, characterized in that the instructions are executed by a processor to implement the virtual weapon control method in a game as described in any of the first aspects above.
[0091] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the virtual weapon control method in a game as described in any of the first aspects above.
[0092] Compared with the prior art, this application has the following advantages:
[0093] The virtual weapon control method in this application, in response to a parameter setting trigger command for a target virtual weapon, displays a parameter setting control for the target virtual weapon on a display interface. This parameter setting control is used to set the number of projectiles fired by the target virtual weapon in a single firing sequence. In response to a setting operation on the parameter setting control, a first quantity is determined based on the quantity corresponding to the setting operation. In response to a firing operation on the target virtual weapon, the number of projectiles fired by the target virtual weapon in a single firing sequence is controlled based on the first quantity. Users can quickly set the number of projectiles fired by the target virtual weapon in a single firing sequence through the parameter setting control, avoiding the need for long-press operations to fire multiple projectiles simultaneously, which could lead to missed opportunities. This allows users to better seize opportunities and fire projectiles at enemy virtual objects in a timely manner, increasing the user's win rate and improving the user's gaming experience. Attached Figure Description
[0094] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0095] Figure 1 This is a schematic diagram illustrating an application scenario of a virtual weapon control method in a game, as provided in the first embodiment of this application.
[0096] Figure 2 One of the flowcharts for the virtual weapon control method in a game provided in the second embodiment of this application;
[0097] Figure 3 The second flowchart illustrating the virtual weapon control method in a game provided in the second embodiment of this application;
[0098] Figure 4 One of the schematic diagrams illustrating the generation of parameter setting trigger commands for a target virtual weapon provided in the second embodiment of this application;
[0099] Figure 5 This is a second schematic diagram illustrating the generation of parameter setting trigger commands for a target virtual weapon, as provided in the second embodiment of this application.
[0100] Figure 6 This is one of the schematic diagrams provided in the second embodiment of this application for determining the first quantity based on the quantity corresponding to the setting operation;
[0101] Figure 7 This is a second schematic diagram illustrating the determination of the first quantity based on the quantity corresponding to the setting operation, as provided in the second embodiment of this application.
[0102] Figure 8 A schematic diagram illustrating the first number of projectiles launched in a single launch by a virtual weapon controlling a target, as provided in the second embodiment of this application;
[0103] Figure 9 A schematic diagram illustrating the control of a target virtual weapon to fire a projectile in a single operation after a long press operation on the firing control has ended, as provided in the second embodiment of this application;
[0104] Figure 10 The third flowchart illustrating the virtual weapon control method in a game provided in the second embodiment of this application;
[0105] Figure 11 This is a schematic diagram illustrating the operation of setting the maximum number of launches, provided in the second embodiment of this application.
[0106] Figure 12 This is a schematic diagram of the structure of a virtual weapon control device in a game provided in the third embodiment of this application;
[0107] Figure 13 This is a schematic diagram of the hardware structure of the electronic device provided in the fourth embodiment of this application.
[0108] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation
[0109] To make the objectives, advantages, and features of this application clearer, the application will be described clearly and completely below in conjunction with the accompanying drawings and specific embodiments. In the following description, many specific details are set forth to provide a full understanding of this application. However, the described embodiments are only some, not all, of the embodiments of this application, and all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this application.
[0110] It should be noted that in the description of this application, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance, or a specific order or sequence. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances. Furthermore, in the description of this application, unless otherwise stated, the term "multiple" refers to two or more. The term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. The terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.
[0111] To facilitate understanding of the technical solution of this application, the relevant concepts involved in this application will be introduced first.
[0112] Virtual environment: This refers to the virtual environment provided by the game application when running on an electronic device. It can be displayed on a screen for users to view. A virtual environment can be a simulation of the real world, a semi-simulated / semi-fictional environment, or a purely fictional environment. Examples include fictional game environments, fictional movie environments, and virtual reality environments formed by overlaying fictional game environments with real environments. This virtual environment can be two-dimensional or three-dimensional.
[0113] Virtual objects refer to three-dimensional models provided in a virtual environment, including virtual objects manipulated by the user. User-manipulated virtual objects, also known as virtual objects controlled by the user (player), in this embodiment refer to objects that can be selected and controlled by the user and can represent the user's image. Users can control the virtual objects they manipulate to perform operations in the virtual environment, such as walking, jumping, running, and attacking. Multiple users can control their chosen virtual objects to interact in the virtual environment, simulating the effect of multiple users interacting face-to-face. There are numerous virtual objects in the virtual environment; different virtual objects typically have the same or different appearances and can perform the same or different operations.
[0114] Virtual weapons refer to tools used by virtual objects in a virtual game scene to attack enemy virtual objects. A single virtual object can possess at least one virtual weapon in the game scene. The content presented in the graphical user interface can be a partial or complete representation of the virtual weapon model. Virtual weapons include, but are not limited to, virtual firearms and virtual crossbows. Types of virtual firearms include, but are not limited to, virtual pistols, virtual sniper rifles, virtual marksman rifles, virtual submachine guns, virtual light machine guns, virtual shotguns, and virtual rifles.
[0115] The prior art involved in this application and the problems existing in the prior art are described below:
[0116] In existing virtual games, there are two methods for using virtual weapons that can fire multiple bullets simultaneously: First, the user presses and releases the fire control, which fires one bullet; Second, the user presses and holds the fire control, and the number of bullets loaded is determined by the length of time the user holds the fire control (the length of time is positively correlated with the number of bullets) until the virtual weapon has reached its maximum capacity of bullets, and the virtual weapon fires all loaded bullets simultaneously the moment the user releases the fire control.
[0117] However, if users want to fire multiple bullets at once, they have to long-press the fire control each time. This long-press operation every time is time-consuming and may even cause them to miss opportunities, thus reducing the user's gaming experience.
[0118] To address the aforementioned problems and avoid the significant inconvenience to users caused by the need to hold down the fire control button each time to fire multiple bullets simultaneously, which could easily lead to missed opportunities and disrupt gameplay, this application provides a virtual weapon control method in a game, a corresponding virtual weapon control device in a game, an electronic device for implementing the virtual weapon control method in the game, and a computer-readable storage medium. The following embodiments provide a detailed description of the above method, device, electronic device, and computer-readable storage medium.
[0119] To make the objectives and technical solutions of this application clearer and more intuitive, the methods provided by the embodiments of this application will be described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely for explaining this application and are not intended to limit this application. It is understood that the following embodiments may exist independently, and the embodiments and features described below may be combined with each other where there is no conflict between the various embodiments provided in this application. For the same or similar content, it will not be repeated in different embodiments. Furthermore, the timing of the steps in the following method embodiments is merely an example and not a strict limitation. In some cases, the steps shown or described may be performed in a different order.
[0120] This application provides a method, apparatus, electronic device, and computer storage medium for controlling virtual weapons in a game. Specifically, the virtual weapon control method in a game according to one embodiment of this application can be executed by a computer device, which can be a terminal or a server. The terminal can be a smartphone, tablet, laptop, touch screen, game console, personal computer (PC), personal digital assistant (PDA), or other terminal device. The terminal can also include a client, which can be a game application client, a browser client carrying the game program, or an instant messaging client. The server can be an independent 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, and big data and artificial intelligence platforms.
[0121] It should be noted that the following description of the technical solution provided in this application uses a terminal as the execution subject. In other possible implementations, a server may also be used as the execution subject to execute the technical solution provided in this application. The embodiments of this application do not limit the type of execution subject.
[0122] The following is combined with Figure 1 This paper introduces an application scenario of a virtual weapon control method in a game provided by the first embodiment of this application. Figure 1 This is a schematic diagram illustrating an application scenario of a virtual weapon control method in a game, as provided in the first embodiment of this application.
[0123] like Figure 1As shown, the user's terminal can establish a connection with the server (cluster) via a network. The terminal is any device with computing hardware capable of supporting and executing software applications corresponding to the game. Game software applications include, but are not limited to, any of the following: first-person shooter applications, third-person shooter applications, single-player applications, and multiplayer online battle arena (MOBA) applications. The types of games mentioned above can include, but are not limited to, at least one of the following: two-dimensional (2D) game applications, three-dimensional (3D) game applications, virtual reality (VR) game applications, augmented reality (AR) game applications, and mixed reality (MR) game applications. This is merely an example, and this embodiment does not impose any limitations. The server (cluster) can provide services (such as game services, application services, etc.) to the user terminal or clients installed on the user terminal.
[0124] One of the at least one terminals is referred to as the first terminal, which may be the terminal currently used by the user. The first terminal has one or more multi-touch screens for sensing and obtaining input from the user through touch or swipe operations performed at multiple points on one or more touch displays. A graphical user interface containing a virtual scene is displayed on the first terminal's screen. The current user manipulates virtual objects located in the virtual scene to perform activities, including but not limited to: movement and crawling, walking, running, jumping, driving, picking up items, shooting, attacking, and throwing virtual weapons. Additionally, a database can be set up on a server (cluster) or a standalone server for the server to provide data storage services. For example, information related to the virtual scene can be continuously stored in the database while different users are playing multiplayer games online. The aforementioned network can be a wireless network or a wired network, such as a wireless local area network (WLAN), local area network (LAN), cellular network, 2G network, 3G network, 4G network, 5G network, etc. Different terminals can also connect to the server using their own Bluetooth network or hotspot network, or they can communicate with each other through the server and communication network.
[0125] The aforementioned Graphical User Interface (GUI) is a user display interface shown on a terminal device. It is a user interface that uses graphics to display operations on a terminal device, and it is a form of interface display for human-computer communication. Users interact with electronic devices through icons and visual indicators.
[0126] Optionally, the virtual game screen displayed on the graphical user interface of the terminal may be rendered by the terminal based on the game application data sent by the server, or may be rendered by the terminal based on the stored data of the game application.
[0127] Below, in conjunction with Figure 2 The second embodiment of this application provides a description of the virtual weapon control method in a game. Figure 2 This is one of the flowcharts illustrating the virtual weapon control method in a game provided in the second embodiment of this application.
[0128] like Figure 2 As shown, the virtual weapon control methods in this game include:
[0129] S201. In response to the parameter setting trigger command for the target virtual weapon, the parameter setting control corresponding to the target virtual weapon is displayed in the display interface. The parameter setting control is used to set the number of projectiles fired by the target virtual weapon after a single trigger firing.
[0130] In this embodiment, the display interface can be displayed on the display (or display screen) of the terminal device.
[0131] Optionally, a virtual object is displayed on the interface, which possesses at least one virtual weapon in the virtual game scene. This virtual object is controlled by the current user through the terminal. During gameplay, the virtual object can simultaneously use at least one virtual weapon to attack enemy objects. The unused virtual weapon among the virtual object's at least one virtual weapon is referred to as the "pending virtual weapon." The user can set the number of projectiles fired by each virtual weapon in a single firing sequence.
[0132] In this context, the target virtual weapon refers to the virtual weapon for which the user is currently configuring parameters. For example, if the user's virtual object, controlled through the terminal, currently possesses three virtual weapons: a virtual rifle, a virtual pistol, and a virtual shotgun, then when the user configures parameters for the virtual rifle, that virtual rifle becomes the target virtual weapon.
[0133] Below, we will provide illustrative examples of two possible implementations for generating parameter setting trigger commands for virtual weapons targeting a target.
[0134] One possible implementation is to display a parameter setting trigger control for virtual weapons on the display interface. After the user selects the target virtual weapon, the parameter setting trigger control is operated on first to generate the parameter setting trigger command.
[0135] Another possible implementation is that users can trigger the generation of parameter setting trigger commands for the target virtual weapon by performing a second operation on the terminal device or by inputting text or voice.
[0136] The aforementioned parameter setting trigger control can receive different first operations depending on the type of terminal device. For example, when the terminal device is a touchscreen device such as a mobile phone, tablet, or game console, the first operation can be an operation performed by the user using their hand or fingers. For example, the first operation can be a swipe up, swipe down, swipe left, swipe right, a long press, a click, a double click, etc., but is not limited to these. When the terminal device is a non-touchscreen terminal device such as a desktop computer or laptop, the first operation can be performed through a mouse, keyboard, or other control device, but is not limited to these. The second operation can perform preset actions on the terminal device, such as shaking the phone left or right, shaking the phone up or down, etc., without any restrictions.
[0137] S202. In response to a setting operation on the parameter setting control, determine the first quantity based on the quantity corresponding to the setting operation.
[0138] Optionally, the parameter setting controls displayed on the display interface include operation controls for setting the number of projectiles fired after a single trigger shot by the target virtual weapon.
[0139] Optionally, the number of user settings performed on the parameter setting control is determined as the first quantity.
[0140] Optionally, the target virtual weapon includes a virtual cavity for accommodating projectiles to be fired by the target virtual weapon. For example, when the target virtual weapon is a virtual rifle, the virtual cavity is the virtual chamber in the virtual rifle used to store pre-fired bullets; as another example, when the target virtual weapon is a virtual crossbow, the virtual cavity is the virtual arrow slot in the virtual crossbow used to store pre-fired arrows.
[0141] Optionally, after determining the first quantity according to the quantity corresponding to the setting operation, the first quantity of projectiles is filled into the virtual cavity of the target virtual weapon.
[0142] S203, In response to a firing operation against a target virtual weapon, the number of projectiles fired by the target virtual weapon in a single firing is controlled according to a first quantity.
[0143] Optionally, a firing control corresponding to the target virtual weapon is displayed on the interface. When the user performs a third operation on the firing control, the target virtual weapon can be triggered to fire a single shot.
[0144] The aforementioned shooting control can receive different third operations depending on the type of terminal device. For example, when the terminal device is a touchscreen device such as a mobile phone, tablet, or game console, the third operation can be an operation performed by the user using their hand or finger. For example, the third operation can be a swipe up, swipe down, swipe left, swipe right, a long press, a click, a double click, etc., but is not limited to these. When the terminal device is a non-touchscreen terminal device such as a desktop computer or laptop, the third operation can be performed through a control device such as a mouse or keyboard, but is not limited to these.
[0145] The following examples illustrate different scenarios of controlling a virtual weapon to fire a projectile in a single operation, using two different touch or press methods for the firing controls.
[0146] In one possible implementation, in response to a click on the firing control of the target virtual weapon, the target virtual weapon is controlled to fire a first number of projectiles in a single burst. In other words, as long as the user clicks on the firing control of the target virtual weapon, the target virtual weapon can fire the first number of projectiles in a single burst, without requiring the user to long-press the firing button each time. This saves the user more time, allowing them to seize opportunities and fire multiple projectiles at the enemy virtual object in a timely manner. It also greatly simplifies the user's operation, increases the user's win rate, and improves the user's gaming experience.
[0147] In another possible implementation, in response to a long press operation on the firing control of the target virtual weapon, a second quantity is determined based on the press duration and a preset correspondence. This second quantity is then defined as the number of new projectiles added during a single firing of the target virtual weapon. The preset correspondence indicates the relationship between the press duration and the number of new projectiles. In response to the end of the long press operation on the firing control, the target virtual weapon is controlled to fire a third quantity of projectiles in a single firing. This third quantity is determined based on the sum of the first and second quantities. It should be emphasized that the relationship between the press duration and the number of new projectiles in the preset correspondence can be linear and positively correlated, or it can be non-linear and positively correlated, such as exponential growth. This application does not impose any limitations on this.
[0148] Below, taking the virtual rifle as an example, the preset correspondence between the pressing time of the shooting control and the number of newly added projectiles in the virtual rifle can be referred to in Table 1.
[0149] Table 1
[0150] Pressing time Number of new launches 1 second 2 2 seconds 4 3 seconds 6 … … N seconds (N*2) items
[0151] As shown in Table 1, when the user presses the fire control for 1 second, the number of new projectiles added in a single firing of the virtual rifle is determined to be 2; when the user presses the fire control for 2 seconds, the number of new projectiles added in a single firing of the virtual rifle is determined to be 4; the number of new projectiles added for other pressing durations is determined in the same way, and will not be elaborated here.
[0152] For example, if the virtual rifle fires 4 projectiles in a single shot, and if the user holds down the fire control for 3 seconds, then according to the preset correspondence in Table 1, when the press duration is 3 seconds, the number of additional projectiles is 6. If the third number is the sum of the first number and the number of additional projectiles, then the sum of the first number and the number of additional projectiles is 3 + 6 = 9. Therefore, when the game system responds to the end of the long press operation on the fire control, it controls the virtual rifle to fire 9 bullets simultaneously in a single shot.
[0153] The virtual weapon control method in this application includes: in response to a parameter setting trigger command for a target virtual weapon, displaying a parameter setting control corresponding to the target virtual weapon on a display interface. The parameter setting control is used to set the number of projectiles fired by the target virtual weapon in a single firing trigger. In response to a setting operation on the parameter setting control, determining a first quantity based on the quantity corresponding to the setting operation. In response to a firing operation on the target virtual weapon, controlling the number of projectiles fired by the target virtual weapon in a single firing based on the first quantity. Users can quickly set the number of projectiles fired by the target virtual weapon in a single firing through the parameter setting control, avoiding the need for long-press operations to fire multiple bullets simultaneously, which could lead to missed opportunities. This allows users to better seize opportunities and fire multiple projectiles at enemy virtual objects in a timely manner, increasing the user's win rate and improving the user's gaming experience.
[0154] Below, in conjunction with Figure 3 The second embodiment of this application provides a further description of the virtual weapon control method in the game. Figure 3 This is the second flowchart illustrating the virtual weapon control method in a game provided in the second embodiment of this application.
[0155] like Figure 3 As shown, the virtual weapon control methods in this game include:
[0156] S301. In response to a parameter setting trigger command for a target virtual weapon, a parameter setting control corresponding to the target virtual weapon is displayed in the display interface. The parameter setting control is used to set the number of projectiles fired by the target virtual weapon after a single trigger firing.
[0157] Optionally, the explanation and description of step S301 can refer to the explanation and description of step S201 above, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0158] Optionally, the parameter setting control includes a preset number of indicators, and the setting operation is to select at least one of the preset number of indicators. For example, the indicators can be circles, bullet icons, or bow and arrow icons, etc., to illustrate the indicators. As long as the preset number of indicators can be used by the user to determine the number of indicators selected by the user, there are no restrictions on this.
[0159] Optionally, a preset number of indicators are placed sequentially along a preset direction. When an indicator is not selected, it is in a first form; when an indicator is selected, it switches from the first form to a second form. Taking a circle as an example, the first form can refer to the circle being hollow, that is, the indicator is a hollow circle when not selected by the user; the second form can refer to the circle being solid, that is, the indicator changes from a hollow circle to a solid circle when selected by the user.
[0160] Below, in conjunction with Figure 4 and one A specific example is provided to illustrate one possible implementation of generating parameter setting trigger commands for a target virtual weapon. Figure 4 This is one of the schematic diagrams illustrating the generation of parameter setting trigger commands for a target virtual weapon provided in the second embodiment of this application.
[0161] like Figure 4As shown, this includes interfaces (a), (b), and (c). It should be noted that the current interface is the game interface viewed from the perspective of the current user holding the terminal device. Virtual object 4014 is the virtual object currently controlled by the user through the terminal. As shown in interface (a), there is virtual object 4014 in the game's virtual scene. Virtual object 4014 currently holds three virtual weapons: a rifle 4011, a shotgun 4012, and a sniper rifle 4013. As shown in interface (a), the user touches the shotgun 4012, meaning the user selects the shotgun 4012 as the target virtual weapon 4012 for attacking enemy virtual objects. As shown in interface (b), the shotgun 4012 is displayed in black, indicating that the virtual weapon currently used by the user-controlled virtual object is the shotgun 4012. The user is holding the target virtual weapon 4012 and controls the position of the crosshair 4018 of the target virtual weapon 4012 by touching the directional movement control 4017. For example, when a user sees an enemy virtual object 4016 within their field of vision, they can use the touch-sensitive movement control 4017 to control the crosshair 4018 of the target virtual weapon 4012 to aim at the enemy virtual object 4016. When the user is holding the virtual weapon, a parameter setting trigger control 4015 corresponding to the held virtual weapon will be displayed on the interface of the user's terminal device. As shown in interface (b), the user can generate a parameter setting trigger command for the target virtual weapon (i.e., shotgun) by touching the parameter setting trigger control 4015. As shown in interface (c), in response to the parameter setting trigger command for the target virtual weapon, a parameter setting control 4019 corresponding to the target virtual weapon 4012 is displayed on the display interface, and the crosshair 4018 corresponding to the virtual weapon is also displayed in the parameter setting control 4019. The parameter setting control includes five hollow circles 4020 (i.e., indicator marks). It should be noted that the five hollow circles are used by the user to set the number of projectiles fired by the target virtual weapon 4012 after a single trigger shot, and to show the user the number of projectiles fired by the target virtual weapon 4012 after a single trigger shot. That is, when the circle is hollow, it means that it is not selected, and when the circle is solid, it means that it has been selected. The number of projectiles fired in a single shot is determined by the number of solid circles.
[0162] Below, in conjunction with Figure 5 and one A specific example is provided to illustrate another possible implementation of generating parameter setting trigger commands for a target virtual weapon. Figure 5 This is the second schematic diagram of generating parameter setting trigger commands for a target virtual weapon, as provided in the second embodiment of this application.
[0163] like Figure 5As shown, the interfaces include (a), (b), (c), and (d). As shown in interface (a), the shotgun 4012 identifier is displayed in black, indicating that the virtual weapon currently used by the user-controlled virtual object is shotgun 4012. Simultaneously, the user slides their finger around the outer edge of the crosshair 4018 in directions 4030 and 4029 to generate a parameter setting trigger command for the target virtual weapon. In response to the parameter setting trigger command for the target virtual weapon, a parameter setting control 4019 is displayed as shown in interface (b). The parameter setting control 4019 includes the crosshair 4018 and five indicator icons 4020. As shown in interface (c), the user slides their finger around the outer edge of the crosshair 4018 in directions 4031 and 4032 to end the parameter setting for the target virtual weapon. As shown in interface (d), the parameter setting control 4019 is no longer displayed.
[0164] It should be emphasized that the circle in this application is only one possible form of the indicator. The form of the indicator can be set according to actual needs. The circle in this application is only an exemplary illustration of the indicator and does not limit it in any way.
[0165] S302. In response to a setting operation on the parameter setting control, determine the first quantity based on the quantity corresponding to the setting operation.
[0166] Optionally, a possible implementation of "in response to a setting operation on the parameter setting control, in response to a selection operation on the indicator in the parameter setting control, determining the number of selected indicator icons as a first quantity" may include steps S3021-S3022, wherein:
[0167] S3021. In response to a first sliding operation performed on the parameter setting control along a preset direction, the form of the indicator mark traversed by the sliding trajectory formed by the first sliding operation is switched from a first form to a second form.
[0168] S3022, In response to stopping the sliding operation on the parameter setting control, the number of the indicator in the second form is determined as the first number.
[0169] Below, in conjunction with Figure 6 and one This example illustrates one possible implementation for determining the first quantity based on the quantity corresponding to the setting operation. Figure 6 This is one of the schematic diagrams provided in the second embodiment of this application for determining the first quantity based on the quantity corresponding to the setting operation.
[0170] like Figure 6As shown, the interface includes interfaces (a), (b), and (c). As shown in interface (a), the user slides the parameter setting control 4019 along a preset direction 4021 to sequentially select multiple indicator markers 4020. As shown in interface (b), when the user ends the sliding operation on the parameter setting control 4019, the shape of the indicator markers traversed by the sliding trajectory changes from hollow circles to solid circles. As shown in interface (b), the three indicator markers from left to right change from hollow circles to solid circles, thus setting the first quantity to 3. Simultaneously, the user clicks the parameter setting trigger control 4015 again to end the quantity setting. As shown in interface (c), the parameter setting control 4019 is de-displayed.
[0171] Optionally, in response to stopping the sliding operation on the parameter setting control, before determining the number of indicators in the second form as the first number, the method further includes: in response to performing a second sliding operation on the parameter setting control in the opposite direction of a preset direction, switching the form of the indicators traversed by the sliding trajectory formed by the second sliding operation from the second form to the first form.
[0172] Below, in conjunction with Figure 7 and one A specific example is provided to illustrate this optional implementation method. Figure 7 This is a second schematic diagram illustrating the determination of the first quantity based on the quantity corresponding to the setting operation, as provided in the second embodiment of this application.
[0173] like Figure 7 As shown, interfaces (a) and (b) are included. In interface (a), after the three circles from left to right in the parameter setting control 4019 are all solid circles (i.e., selected), the user slides the parameter setting control 4019 along direction 4022 to sequentially cancel the indicators 4020. In interface (b), when the user finishes sliding the parameter setting control 4019, the shape of the indicators traversed by the sliding path changes from hollow circles to solid circles. Compared to interface (a), in interface (b), the third indicator from left to right changes from a solid circle to a hollow circle, and the number of solid circles changes from 3 to 2. Therefore, the first quantity is determined to be 2.
[0174] S303. Fill the virtual cavity of the target virtual weapon with the first number of projectiles.
[0175] Optionally, the target virtual weapon includes a virtual cavity for accommodating the projectile to be launched by the target virtual weapon.
[0176] After determining the first quantity based on the above step S302, the first quantity of projectiles is filled into the virtual cavity of the target virtual weapon. For example, taking a virtual shotgun as the target virtual weapon, when the first quantity for the virtual shotgun is determined to be 5, then 5 virtual bullets are filled into the virtual chamber of the virtual shotgun.
[0177] S304. In response to a click operation of the firing control of the target virtual weapon, control the target virtual weapon to fire a first number of projectiles in a single operation.
[0178] Below, in conjunction with Figure 8 and one A specific example illustrates one possible implementation of "controlling the target virtual weapon to fire a first number of projectiles in a single burst in response to a click operation of the firing control for the target virtual weapon." Figure 8 This is a schematic diagram of a virtual weapon for controlling a target, provided in the second embodiment of this application, firing a first number of projectiles in a single launch.
[0179] like Figure 8 As shown, the interface includes interface (a) and interface (b). As shown in interface (a), when the user sees an enemy virtual object 4016 appearing in the field of view, they control the crosshair 4018 of the target virtual weapon 4012 to aim at the enemy virtual object 4016 by moving the touch control 4017 in the direction of touch and clicking the fire control 4023. As shown in interface (b), two bullets 4024 are fired simultaneously from the virtual shotgun 4012 held by the virtual object 4014.
[0180] S305. In response to the completion of a single launch by the target virtual weapon, a first number of projectiles are filled into the virtual container of the target virtual weapon.
[0181] It should be noted that, based on the above step S304 where the target virtual weapon fires a first number of projectiles from the virtual cavity in a single firing, the number of projectiles filling the virtual cavity decreases by the first number. Therefore, in order to ensure timely replenishment of projectiles into the virtual cavity of the target virtual weapon, the first number of projectiles is immediately filled into the virtual cavity of the target virtual weapon after the target virtual weapon completes a single firing.
[0182] S306. In response to a long press operation of the firing control for the target virtual weapon, a second quantity is determined based on the press duration of the long press operation and a preset correspondence, and the second quantity is determined as the number of newly launched objects when the target virtual weapon fires in a single firing.
[0183] The preset correspondence is used to indicate the relationship between the pressing time and the number of newly launched objects.
[0184] S307. In response to the end of the long press operation on the firing control, control the target virtual weapon to fire a third number of projectiles in a single operation, the third number being determined based on the sum of the first and second numbers.
[0185] Below, in conjunction with Figure 9 and one A specific example illustrates one possible implementation of "controlling a virtual weapon to fire a projectile in a single burst in response to a long press of the firing control for a target virtual weapon." Figure 9 This is a schematic diagram illustrating the control of a target virtual weapon to fire a projectile in a single operation after a long press operation on the firing control has ended, as provided in the second embodiment of this application.
[0186] Optionally, the sum of the first quantity and the second quantity can be determined as the third quantity.
[0187] It should be noted that, in Figure 7 Based on the determination that the first quantity is 2, combined with Figure 9 An example is provided.
[0188] like Figure 9 As shown, interfaces (a), (b), and (c) are included. As shown in interfaces (a) and (b), the user long-presses the firing control 4023, and a display indicator 4025 appears on the interface. The display indicator 4025 shows the duration the user presses the firing control 4023 and the maximum number of projectiles the target virtual weapon can fire during the current long-press duration. Specifically, as shown in interface (b), the user presses the firing control 4023 for 2 seconds, and the target virtual weapon (virtual shotgun) can fire a maximum of 6 bullets during this 2-second long-press duration. After the user ends the long-press of the firing control 4023, as shown in interface (c), 6 bullets 4024 are simultaneously fired from the virtual shotgun 4012 held by the virtual object 4014. It should be emphasized that, taking the preset correspondence as an example, when the press duration is 2 seconds, the number of newly launched projectiles is 4. Then, the total number of virtual shotguns fired after the long press ends = the first number + the number of newly launched projectiles = 2 + 4 = 6.
[0189] Optionally, in response to the target virtual weapon completing a single firing, a first number of projectiles are filled into the virtual container of the target virtual weapon. It is important to emphasize that the first number of projectiles, rather than a third number, is filled when the long-press operation on the firing control ends. This is because it is considered that firing the first number of projectiles with a single click can be set as the normal mode, meaning the minimum number of projectiles fired by the target virtual weapon in a single firing is the first number; the actual number of projectiles fired by the target virtual weapon in a single firing should be determined based on the user's specific operation on the firing control (e.g., single click, long press).
[0190] The virtual weapon control method in the game provided in this application includes: responding to a parameter setting trigger command for a target virtual weapon, displaying a parameter setting control corresponding to the target virtual weapon in a display interface, the parameter setting control being used to set the number of projectiles fired by the target virtual weapon in a single firing. Responding to a setting operation on the parameter setting control, determining a first quantity based on the quantity corresponding to the setting operation. Filling the virtual cavity of the target virtual weapon with the first quantity of projectiles. Responding to a click operation on the firing control of the target virtual weapon, controlling the target virtual weapon to fire the first quantity of projectiles in a single firing. Responding to the target virtual weapon completing a single firing, filling the virtual container of the target virtual weapon with the first quantity of projectiles. Responding to a long press operation on the firing control of the target virtual weapon, determining a second quantity based on the press duration and a preset correspondence, and setting the second quantity as the number of projectiles added during a single firing of the target virtual weapon. Responding to the end of the long press operation on the firing control, controlling the target virtual weapon to fire a third quantity of projectiles in a single firing, the third quantity being determined based on the sum of the first and second quantities. Specifically, the system immediately fills the virtual cavity of the target virtual weapon with a first quantity of projectiles after each firing. This ensures timely replenishment of the virtual cavity with the first quantity of projectiles, improving the efficiency of projectile filling and avoiding delays in responding to user clicks or long presses on the firing control. Furthermore, when the user long presses the firing control, the determined number of projectiles for a single firing is increased based on the first quantity, further reducing the duration of long presses required for larger firing quantities.
[0191] Below, in conjunction with Figure 10 The second embodiment of this application provides a further description of the virtual weapon control method in the game. Figure 10 The third flowchart illustrates the virtual weapon control method in a game provided in the second embodiment of this application.
[0192] like Figure 10 As shown, the virtual weapon control methods in this game include:
[0193] S1001. In response to a parameter setting trigger command for a target virtual weapon, a parameter setting control corresponding to the target virtual weapon is displayed in the display interface. The parameter setting control also includes at least one of the following: a maximum firing quantity setting control and a minimum firing quantity setting control.
[0194] Optionally, the parameter setting controls include a maximum number of transmits setting control and a minimum number of transmits setting control.
[0195] Optionally, in response to a setting operation on the maximum number of launches setting control in the parameter setting control, the maximum number of launches fired by the target virtual weapon after a single trigger firing is determined.
[0196] Optionally, in response to a setting operation on the minimum number of launches setting control in the parameter setting control, the minimum number of launches fired by the target virtual weapon after a single trigger firing is determined.
[0197] Below, in conjunction with Figure 11 and one A specific example is provided to illustrate one possible implementation of setting the maximum number of transmissions. Figure 11 This is a schematic diagram illustrating the operation of setting the maximum number of transmissions, provided in the second embodiment of this application.
[0198] like Figure 11 As shown, the interface includes interfaces (a), (b), and (c). As shown in interface (a), the user can generate a parameter setting trigger command for the target virtual weapon (i.e., a shotgun) by touching the parameter setting trigger control 4015. As shown in interface (b), in response to the parameter setting trigger command for the target virtual weapon, three setting controls corresponding to the target virtual weapon 4012 are displayed on the display interface: maximum firing quantity setting control 4026, minimum firing quantity setting control 4027, and current firing quantity setting control 4028. It should be emphasized that the firing quantity set through the current firing quantity setting control 4028 is the single firing quantity corresponding to the user's click operation. As shown in interface (b), the user presses the maximum firing quantity setting control 4026. As shown in interface (c), a quantity setting display control 4029 appears on the display interface, and it shows the user pressing "+" to increase the firing quantity. As shown in interface (c), the user sets the maximum single firing quantity of the target virtual weapon to 10. Understandably, users can reduce the number of launches by pressing "-".
[0199] It should be noted that, Figure 11The quantity setting display control 4029 in the middle interface (c) is only an example of one possible implementation of setting the maximum number of transmissions. This application embodiment does not limit the implementation of setting the maximum number of transmissions or the minimum number of transmissions.
[0200] In this embodiment of the application, a similar setting method can be used to set the minimum number of transmissions, which will not be described in detail here.
[0201] For users familiar with the performance or characteristics of various types of virtual weapons, they can use their experience to set appropriate maximum and minimum quantities for the target virtual weapon. This helps to accurately control the number of bullets fired in a single launch, keeping it between the maximum and minimum quantities. This avoids firing extra bullets due to the user's lack of understanding of the relationship between the pressing time and the number of bullets fired, or the inability to accurately control the pressing time. As a result, it helps to delay the wear and tear of the virtual weapon and improve its durability.
[0202] S1002. In response to a setting operation on the parameter setting control, determine the first quantity based on the relationship between the quantity corresponding to the setting operation and the minimum quantity.
[0203] It should be noted that the setting operation for the parameter setting control refers to... Figure 11 The current launch quantity setting control 4028 determines the number of launches per launch. The minimum number refers to the number of launches per launch determined by the minimum number of launches per launch. Figure 11 The minimum number of transmissions per transmission is determined by the minimum transmission quantity setting control 4026. The maximum number refers to the number of transmissions per transmission. Figure 11 The maximum number of launches in a single launch is determined by the maximum launch quantity setting control 4026.
[0204] Optionally, if the quantity corresponding to the setting operation is greater than the minimum quantity, the quantity corresponding to the setting operation is determined as the first quantity.
[0205] Optionally, if the quantity corresponding to the setting operation is less than or equal to the minimum quantity, the minimum quantity is determined as the first quantity.
[0206] S1003. Fill the virtual cavity of the target virtual weapon with the first number of projectiles.
[0207] S1004. In response to a click operation of the firing control of the target virtual weapon, control the target virtual weapon to fire a first number of projectiles in a single operation.
[0208] Optionally, in response to the completion of a single launch by the target virtual weapon, a first number of projectiles are filled into the virtual container of the target virtual weapon.
[0209] Optionally, the game includes at least one type of virtual weapon, and each type of virtual weapon is set with a preset maximum number of shots per shot and a preset minimum number of shots per shot;
[0210] Optionally, the first quantity is greater than or equal to the preset minimum single-fire quantity corresponding to the target virtual weapon, and less than or equal to the preset maximum single-fire quantity corresponding to the target virtual weapon.
[0211] For users unfamiliar with the performance or characteristics of various types of virtual weapons, by setting preset maximum and minimum firing counts for each type of virtual weapon, the user's firing count can fall between the preset minimum and maximum firing counts, ensuring that the firing count set by the user is appropriate.
[0212] S1005. In response to a long press operation of the firing control for the target virtual weapon, a second quantity is determined based on the press duration of the long press operation and a preset correspondence.
[0213] S1006. Determine the third number of single launches of the target virtual weapon based on the relationship between the sum of the first and second numbers and the maximum number.
[0214] Optionally, the specific implementation of "determining the third number of single launches of the target virtual weapon based on the relationship between the sum of the first number and the second number and the maximum number" includes steps S10061-S10062.
[0215] S10061. If the sum of the first quantity and the second quantity is less than the maximum quantity, the sum of the first quantity and the second quantity shall be determined as the third quantity.
[0216] S10062. If the sum of the first quantity and the second quantity is greater than or equal to the maximum quantity, the maximum quantity shall be determined as the third quantity.
[0217] S1007, Control the target virtual weapon to fire the third number of projectiles in a single launch.
[0218] Optionally, in response to the target virtual weapon completing a single launch of a third number of projectiles, a first number of projectiles is filled into the virtual container of the target virtual weapon.
[0219] The virtual weapon control method in a game provided in this application includes: responding to a parameter setting trigger command for a target virtual weapon, displaying a parameter setting control corresponding to the target virtual weapon in a display interface. The parameter setting control includes at least one of the following: a maximum firing quantity setting control and a minimum firing quantity setting control. Responding to a setting operation on the parameter setting control, and responding to a selection operation on an indicator in the parameter setting control, determining the quantity of the selected indicator as a first quantity. Filling the virtual cavity of the target virtual weapon with the first quantity of projectiles. Responding to a click operation on the firing control of the target virtual weapon, controlling the target virtual weapon to fire the first quantity of projectiles in a single burst. Responding to a long press operation on the firing control of the target virtual weapon, determining a third quantity of projectiles to be fired in a single burst by the target virtual weapon based on the relationship between the sum of the first quantity and the second quantity and the maximum quantity. Controlling the target virtual weapon to fire the third quantity of projectiles in a single burst.
[0220] The virtual weapon control device in the game provided in this application is described below. The virtual weapon control device in the game described below can be referred to in correspondence with the virtual weapon control method in the game described above.
[0221] Figure 12 This is a schematic diagram of the structure of a virtual weapon control device in a game provided in the third embodiment of this application. Figure 12 As shown, the virtual weapon control device in the game includes: a display module 1201, a determination module 1202, and a processing module 1203.
[0222] Display module 1201 is used to display the parameter setting control corresponding to the target virtual weapon in the display interface in response to the parameter setting trigger command for the target virtual weapon. The parameter setting control is used to set the number of projectiles fired by the target virtual weapon after a single trigger firing.
[0223] The determining module 1202 is configured to determine a first quantity based on the quantity corresponding to the setting operation in response to a setting operation of the parameter setting control;
[0224] The processing module 1203 is configured to control the number of projectiles fired by the target virtual weapon in a single firing operation in response to the firing operation against the target virtual weapon, based on the first quantity.
[0225] Optionally, the target virtual weapon includes a virtual cavity for accommodating the projectile to be launched by the target virtual weapon;
[0226] The device further includes a filling module, which is specifically used for:
[0227] The first number of projectiles are filled into the virtual cavity of the target virtual weapon;
[0228] The processing module 1203 is specifically used for:
[0229] The number of projectiles fired in a single launch by the target virtual weapon is controlled based on the number of projectiles filled in the virtual cavity.
[0230] Optionally, the processing module 1203 is specifically used for:
[0231] In response to a click operation of the firing control for the target virtual weapon, the target virtual weapon is controlled to fire the first number of projectiles in a single burst.
[0232] Optionally, the processing module 1203 is specifically used for:
[0233] In response to a long press operation on the firing control of the target virtual weapon, a second quantity is determined based on the press duration of the long press operation and a preset correspondence, and the second quantity is determined as the number of newly added projectiles when the target virtual weapon fires in a single firing. The preset correspondence is used to indicate the correspondence between the press duration and the number of newly added projectiles.
[0234] In response to the end of the long press operation on the shooting control, the target virtual weapon is controlled to fire a third number of projectiles in a single operation, the third number being determined based on the sum of the first number and the second number.
[0235] Optionally, the filling module is further configured to:
[0236] In response to the completion of the single launch by the target virtual weapon, the first number of projectiles are filled into the virtual container of the target virtual weapon.
[0237] Optionally, the parameter setting control includes a preset number of indicator icons, and the setting operation is to select at least one of the preset number of indicator icons;
[0238] The determining module 1202 is specifically used for:
[0239] In response to the selection operation of the indicator in the parameter setting control, the number of selected indicator is determined as a first quantity.
[0240] Optionally, the preset number of indicator icons are placed sequentially along a preset direction. When the indicator icon is not selected, it is in a first form, and when the indicator icon is selected, it switches from the first form to a second form.
[0241] The display module 1201 is specifically used for:
[0242] In response to a first sliding operation performed on the parameter setting control along the preset direction, the form of the indicator traced by the sliding trajectory formed by the first sliding operation is switched from the first form to the second form.
[0243] In response to stopping the sliding operation for the parameter setting control, the number of indicator icons in the second form is determined as a first number.
[0244] Optionally, the display module 1201 is further configured to:
[0245] In response to a second sliding operation performed on the parameter setting control in the opposite direction of the preset direction, the form of the indicator traced by the sliding trajectory formed by the second sliding operation is switched from the second form to the first form.
[0246] Optionally, the parameter setting control includes a maximum number of transmissions setting control;
[0247] The determining module 1202 is further configured to:
[0248] In response to the setting operation of the maximum number of launches setting control in the parameter setting control, the maximum number of launches fired by the target virtual weapon after a single trigger firing is determined;
[0249] The processing module 1203 is specifically used for:
[0250] If the sum of the first quantity and the second quantity is less than the maximum quantity, the sum of the first quantity and the second quantity shall be determined as the third quantity;
[0251] If the sum of the first quantity and the second quantity is greater than or equal to the maximum quantity, the maximum quantity is determined as the third quantity;
[0252] Control the target virtual weapon to fire the third number of projectiles in a single launch.
[0253] Optionally, the parameter setting control includes a minimum number of emitters setting control;
[0254] The determining module 1202 is further configured to:
[0255] In response to the setting operation of the minimum firing quantity setting control in the parameter setting control, the minimum number of projectiles fired by the target virtual weapon after a single trigger firing is determined;
[0256] The determining module 1202 is further configured to:
[0257] If the quantity corresponding to the setting operation is greater than the minimum quantity, the quantity corresponding to the setting operation is determined as the first quantity;
[0258] If the quantity corresponding to the setting operation is less than or equal to the minimum quantity, the minimum quantity is determined as the first quantity.
[0259] Optionally, the game includes at least one type of virtual weapon, and each type of virtual weapon is set with a preset maximum number of shots per shot and a preset minimum number of shots per shot;
[0260] The first quantity is greater than or equal to the preset minimum single-fire quantity corresponding to the target virtual weapon, and less than or equal to the preset maximum single-fire quantity corresponding to the target virtual weapon, and the third quantity is less than or equal to the preset maximum single-fire quantity corresponding to the target virtual weapon.
[0261] The virtual weapon control device in the game provided in this embodiment can be used to execute the technical solution of the above-described virtual weapon control method embodiment in the game. Its implementation principle and technical effect are similar, and will not be described again in this embodiment.
[0262] Figure 13 This is a schematic diagram of the hardware structure of the electronic device provided in the fourth embodiment of this application, as shown below. Figure 13 As shown, the electronic device 1300 of this embodiment includes: a processor 1301 and a memory 1302; wherein
[0263] Memory 1302 is used to store computer-executed instructions;
[0264] The processor 1301 is used to execute computer execution instructions stored in the memory to implement the various steps performed by the virtual weapon control method in the game in the above embodiments. For details, please refer to the relevant descriptions in the foregoing method embodiments.
[0265] Alternatively, the memory 1302 can be either standalone or integrated with the processor 1301.
[0266] When the memory 1302 is set up independently, the electronic device also includes a bus 1303 for connecting the memory 1302 and the processor 1301.
[0267] The fifth embodiment of this application also provides a computer-readable storage medium storing computer-executable instructions. When a processor executes the computer-executable instructions, it implements the solution provided in any embodiment of the virtual weapon control method in the game executed by the above-mentioned electronic device.
[0268] The sixth embodiment of this application also provides a computer program product, which includes: a computer program stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program to cause the electronic device to perform the solution or method provided in any of the above embodiments.
[0269] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules 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 indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.
[0270] The integrated modules implemented as software functional modules described above can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) or a processor to execute some steps of the methods described in the various embodiments of this application.
[0271] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0272] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk or optical disc, etc.
[0273] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0274] The aforementioned storage medium can be implemented from any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium accessible to general-purpose or special-purpose computers.
[0275] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0276] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for controlling virtual weapons in a game, characterized in that, The method includes: In response to a parameter setting trigger command for a target virtual weapon, a parameter setting control corresponding to the target virtual weapon is displayed in the display interface. The parameter setting control is used to set the number of projectiles fired by the target virtual weapon after a single trigger firing. In response to a setting operation on the parameter setting control, a first quantity is determined based on the quantity corresponding to the setting operation; In response to a firing operation against the target virtual weapon, controlling the number of projectiles fired in a single burst by the target virtual weapon according to the first quantity includes: In response to a long press operation on the firing control of the target virtual weapon, a second quantity is determined based on the press duration of the long press operation and a preset correspondence, and the second quantity is determined as the number of newly added projectiles when the target virtual weapon fires in a single firing. The preset correspondence is used to indicate the correspondence between the press duration and the number of newly added projectiles. In response to the end of the long press operation on the shooting control, the target virtual weapon is controlled to fire a third number of projectiles in a single operation, the third number being determined based on the sum of the first number and the second number.
2. The method according to claim 1, characterized in that, The target virtual weapon includes a virtual cavity for accommodating the projectile to be launched by the target virtual weapon; Before controlling the number of projectiles fired in a single burst by the target virtual weapon in response to a firing operation against the target virtual weapon, based on the first quantity, the following steps are included: The first number of projectiles are filled into the virtual cavity of the target virtual weapon; The step of controlling the number of projectiles launched in a single firing of the target virtual weapon according to the first quantity includes: The number of projectiles fired in a single launch by the target virtual weapon is controlled based on the number of projectiles filled in the virtual cavity.
3. The method according to claim 1, characterized in that, The step of controlling the number of projectiles fired in a single burst by the target virtual weapon in response to a firing operation against the target virtual weapon, based on the first quantity, includes: In response to a click operation of the firing control for the target virtual weapon, the target virtual weapon is controlled to fire the first number of projectiles in a single burst.
4. The method according to claim 2, characterized in that, The method further includes: In response to the completion of the single launch by the target virtual weapon, the first number of projectiles are filled into the virtual container of the target virtual weapon.
5. The method according to claim 1, characterized in that, The parameter setting control includes a preset number of indicator icons, and the setting operation is to select at least one of the preset number of indicator icons; The step of determining a first quantity based on the quantity corresponding to the setting operation in response to a setting operation of the parameter setting control includes: In response to the selection operation of the indicator in the parameter setting control, the number of selected indicator is determined as a first quantity.
6. The method according to claim 5, characterized in that, The preset number of indicator icons are placed sequentially along a preset direction. When the indicator icon is not selected, it is in a first form. When the indicator icon is selected, it switches from the first form to a second form. The step of responding to a selection operation of an indicator in the parameter setting control, determining the number of selected indicators as a first quantity, includes: In response to a first sliding operation performed on the parameter setting control along the preset direction, the form of the indicator traced by the sliding trajectory formed by the first sliding operation is switched from the first form to the second form. In response to stopping the sliding operation for the parameter setting control, the number of indicator icons in the second form is determined as a first number.
7. The method according to claim 6, characterized in that, Before determining the number of indicator icons in the second form as a first number in response to stopping the sliding operation for the parameter setting control, the method further includes: In response to a second sliding operation performed on the parameter setting control in the opposite direction of the preset direction, the form of the indicator traced by the sliding trajectory formed by the second sliding operation is switched from the second form to the first form.
8. The method according to claim 1, characterized in that, The parameter setting control includes a maximum number of transmissions setting control; The response to ending the long press operation on the firing control and before controlling the target virtual weapon to fire a third number of projectiles in a single burst also includes: In response to the setting operation of the maximum number of launches setting control in the parameter setting control, the maximum number of launches fired by the target virtual weapon after a single trigger firing is determined; The control of the target virtual weapon to fire a third number of projectiles in a single launch includes: If the sum of the first quantity and the second quantity is less than the maximum quantity, the sum of the first quantity and the second quantity shall be determined as the third quantity; If the sum of the first quantity and the second quantity is greater than or equal to the maximum quantity, the maximum quantity is determined as the third quantity; Control the target virtual weapon to fire the third number of projectiles in a single launch.
9. The method according to claim 3, characterized in that, The parameter setting control includes a minimum number of launches setting control; Before controlling the target virtual weapon to fire the first number of projectiles in a single burst in response to a click operation of the firing control for the target virtual weapon, the method further includes: In response to the setting operation of the minimum firing quantity setting control in the parameter setting control, the minimum number of projectiles fired by the target virtual weapon after a single trigger firing is determined; The step of determining a first quantity based on the quantity corresponding to the setting operation in response to a setting operation of the parameter setting control includes: If the quantity corresponding to the setting operation is greater than the minimum quantity, the quantity corresponding to the setting operation is determined as the first quantity; If the quantity corresponding to the setting operation is less than or equal to the minimum quantity, the minimum quantity is determined as the first quantity.
10. The method according to claim 1, characterized in that, The game includes at least one type of virtual weapon, and each type of virtual weapon is set with a preset maximum number of shots per shot and a preset minimum number of shots per shot. The first quantity is greater than or equal to the preset minimum single-fire quantity corresponding to the target virtual weapon, and less than or equal to the preset maximum single-fire quantity corresponding to the target virtual weapon, and the third quantity is less than or equal to the preset maximum single-fire quantity corresponding to the target virtual weapon.
11. A virtual weapon control device for a game, characterized in that, The device includes: The display module is used to respond to a parameter setting trigger command for a target virtual weapon and display the parameter setting control corresponding to the target virtual weapon in the display interface. The parameter setting control is used to set the number of projectiles fired by the target virtual weapon after a single trigger firing. A determining module is configured to, in response to a setting operation on the parameter setting control, determine a first quantity based on the quantity corresponding to the setting operation; A processing module is configured to, in response to a firing operation against the target virtual weapon, control the number of projectiles fired by the target virtual weapon in a single firing based on the first quantity; The step of controlling the number of projectiles fired in a single burst by the target virtual weapon in response to a firing operation against the target virtual weapon, based on the first quantity, includes: In response to a long press operation on the firing control of the target virtual weapon, a second quantity is determined based on the press duration of the long press operation and a preset correspondence, and the second quantity is determined as the number of newly added projectiles when the target virtual weapon fires in a single firing. The preset correspondence is used to indicate the correspondence between the press duration and the number of newly added projectiles. In response to the end of the long press operation on the shooting control, the target virtual weapon is controlled to fire a third number of projectiles in a single operation, the third number being determined based on the sum of the first number and the second number.
12. An electronic device, characterized in that, The electronic device includes: Processor; and A memory for storing a data processing program, which, when powered on and run by the processor, executes the virtual weapon control method in the game as described in any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, It stores a data processing program, which is run by a processor to perform the virtual weapon control method in the game as described in any one of claims 1-10.