CN111359214B - Virtual item control method and device, storage medium and electronic device - Google Patents

Virtual item control method and device, storage medium and electronic device Download PDF

Info

Publication number
CN111359214B
CN111359214B CN202010148164.4A CN202010148164A CN111359214B CN 111359214 B CN111359214 B CN 111359214B CN 202010148164 A CN202010148164 A CN 202010148164A CN 111359214 B CN111359214 B CN 111359214B
Authority
CN
China
Prior art keywords
shooting
state
prop
target
target virtual
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010148164.4A
Other languages
Chinese (zh)
Other versions
CN111359214A (en
Inventor
姚丽
刘智洪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010148164.4A priority Critical patent/CN111359214B/en
Publication of CN111359214A publication Critical patent/CN111359214A/en
Application granted granted Critical
Publication of CN111359214B publication Critical patent/CN111359214B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/57Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/837Shooting of targets
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/64Methods for processing data by generating or executing the game program for computing dynamical parameters of game objects, e.g. motion determination or computation of frictional forces for a virtual car
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/8076Shooting

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Studio Devices (AREA)

Abstract

The invention discloses a virtual prop control method and device, a storage medium and an electronic device. Wherein, the method comprises the following steps: in the process of running one game in the client, obtaining the running state of a target virtual shooting prop controlled by the client; determining the shooting mode after the target virtual shooting prop is switched to be the target shooting mode under the condition that the obtained running state indicates that the target virtual shooting prop is in the shooting state and is in the shooting mode switching state at the same time; and controlling the target virtual shooting prop to keep a shooting state in the process of switching the target virtual shooting prop to the target shooting mode. The invention solves the technical problem of higher complexity of the control operation of the virtual prop in the related technology.

Description

Virtual item control method and device, storage medium and electronic device
Technical Field
The invention relates to the field of computers, in particular to a virtual item control method and device, a storage medium and an electronic device.
Background
In the shooting game application, different control operations on the same virtual prop are often executed respectively and independently. For example, in the process of controlling the virtual shooting prop to execute the shooting operation, if the shooting mode (waist shooting mode or mirror shooting mode) of the virtual shooting prop is to be switched, the shooting process can only be stopped first, and the shooting operation can only be continued after the switching of the shooting mode is completed.
That is to say, in the solutions provided in the related art, different control operations for the same virtual item can only be executed independently, so that the problem of increasing complexity of the control operations for the virtual item is caused.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for controlling a virtual item, a storage medium and an electronic device, which are used for at least solving the technical problem that the complexity of control operation on the virtual item is higher in the related technology.
According to an aspect of an embodiment of the present invention, a method for controlling a virtual item is provided, including: in the process of running a game in a client, obtaining the running state of a target virtual shooting prop controlled by the client; determining the shooting mode after the target virtual shooting prop is switched to be the target shooting mode under the condition that the acquired running state indicates that the target virtual shooting prop is in the shooting state and is in the shooting mode switching state at the same time; and controlling the target virtual shooting prop to keep the shooting state in the process of switching the target virtual shooting prop to the target shooting mode.
According to another aspect of the embodiments of the present invention, there is also provided a virtual item control device, including: the first acquisition unit is used for acquiring the running state of the target virtual shooting prop controlled by the client in the process of running one game in the client; a first determining unit, configured to determine, when the obtained running state indicates that the target virtual shooting prop is in a shooting state and is in a shooting mode switching state at the same time, that a shooting mode after the target virtual shooting prop is switched is a target shooting mode; and the first control unit is used for controlling the target virtual shooting prop to keep the shooting state in the process of switching the target virtual shooting prop to the target shooting mode.
According to another aspect of the embodiment of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the above virtual prop control method when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the virtual prop control method through the computer program.
In the embodiment of the invention, in the process of running one game, the running state of the target virtual shooting prop controlled by the client is obtained. And determining the shooting mode after the target virtual shooting prop is switched to be the target shooting mode under the condition that the acquired running state indicates that the target virtual shooting prop is in the shooting state and is in the shooting mode switching state at the same time. And then controlling the target virtual shooting prop to keep a shooting state in the process of switching the target virtual shooting prop to the target shooting mode. That is, in the case that the target virtual shooting prop is in the shooting state and is in the shooting mode switching state at the same time, the target virtual shooting prop can execute the switching operation of the shooting mode while executing the shooting operation, without suspending one of the operations to complete the other operation. Therefore, the problem of high operation complexity caused by the fact that different control operations need to be executed in sequence in the related art is solved, the purpose of reducing the operation complexity of the control operation on the target virtual shooting prop is achieved, and the effect of improving the operation efficiency of the control operation is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic diagram of a hardware environment of an alternative virtual item control method according to an embodiment of the present invention;
FIG. 2 is a flow chart of an alternative virtual item control method according to an embodiment of the present invention;
FIG. 3 is a flow chart of another alternative virtual prop control method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an alternative virtual item control method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of another alternative virtual item control method according to an embodiment of the invention;
FIG. 6 is a schematic diagram of another alternative virtual item control method according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of another alternative virtual item control method according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an alternative virtual item control device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of another alternative virtual prop control device according to an embodiment of the invention;
fig. 10 is a schematic structural diagram of another alternative virtual prop control device according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiment of the present invention, a virtual item control method is provided, optionally, as an optional implementation manner, the virtual item control method may be but is not limited to be applied to a virtual item control system in an environment as shown in fig. 1, where the virtual item control system may include but is not limited to a terminal device 102, a network 104, and a server 106. The terminal device 102 has a client (a shooting game application client shown in fig. 1) running therein, which logs in a user account (e.g., ID-1). The terminal device 102 includes a human-machine interaction screen 1022, a processor 1024, and a memory 1026. The man-machine interaction screen 1022 is configured to present scene pictures in a virtual scene in the shooting game application client, and is further configured to provide a man-machine interaction interface to detect a man-machine interaction operation performed on the man-machine interaction interface, so as to trigger an operation instruction for controlling the target virtual shooting prop to perform the operation; the processor 1024 is configured to respond to the operation instruction to control the target virtual shooting prop to execute a corresponding operation, and is further configured to detect an operation state of the target virtual shooting prop according to a result of the operation. The memory 108 is used for storing the state information and the related attribute information of the running state of the target virtual item.
In addition, the server 106 includes a database 1062 and a processing engine 1064, and the database 1062 is used for storing various shooting modes and various operating states of the virtual shooting props. Processing engine 1064 is configured to determine a target shooting mode according to the shooting mode switching status of the virtual shooting prop, and feed it back to terminal device 102.
The specific process comprises the following steps: in steps S102 to S104, in the process of running one game task in the terminal device 102, the running state of the target virtual shooting item controlled by the client is obtained. The operational status is then transmitted to the server 106 via the network 104. In the case that the running state received by the server 106 indicates that the target virtual shooting item is in the shooting state and is in the shooting mode switching state at the same time, as in steps S106 to S108, the target shooting mode after the target virtual shooting item is switched is determined, and the target shooting mode is sent to the terminal device 102 through the network 104. Then, in step S110, the terminal device 102 will control the target virtual shooting prop to keep shooting status while the target virtual shooting prop is switched to the target shooting mode.
It should be noted that, in this embodiment, in the process of running one game, the running state of the target virtual shooting item controlled by the client is obtained. And determining the shooting mode after the target virtual shooting prop is switched to be the target shooting mode under the condition that the acquired running state indicates that the target virtual shooting prop is in the shooting state and is in the shooting mode switching state at the same time. And then controlling the target virtual shooting prop to keep a shooting state in the process of switching the target virtual shooting prop to the target shooting mode. That is, in the case that the target virtual shooting prop is in the shooting state and is in the shooting mode switching state at the same time, the target virtual shooting prop can execute the switching operation of the shooting mode while executing the shooting operation, without suspending one of the operations to complete the other operation. Therefore, the problem of high operation complexity caused by the fact that different control operations need to be executed in sequence in the related art is solved, the purpose of reducing the operation complexity of the control operation on the target virtual shooting prop is achieved, and the effect of improving the operation efficiency of the control operation is achieved.
Optionally, in this embodiment, the virtual item control method may be, but is not limited to, applied to a terminal device, and the terminal device may be, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a PC, and other terminal devices that support running of an application client. The server and the terminal device may implement data interaction through a network, which may include but is not limited to a wireless network or a wired network. Wherein, this wireless network includes: bluetooth, WIFI, and other networks that enable wireless communication. Such wired networks may include, but are not limited to: wide area networks, metropolitan area networks, and local area networks. The above is merely an example, and this is not limited in this embodiment.
Optionally, as an optional implementation manner, as shown in fig. 2, the virtual item control method includes:
s202, in the process of running one game in the client, obtaining the running state of the target virtual shooting prop controlled by the client;
s204, determining the shooting mode after the target virtual shooting prop is switched to be the target shooting mode under the condition that the obtained running state indicates that the target virtual shooting prop is in the shooting state and is in the shooting mode switching state at the same time;
and S206, controlling the target virtual shooting prop to keep a shooting state in the process of switching the target virtual shooting prop to the target shooting mode.
Optionally, in this embodiment, the virtual item control method may be, but not limited to, applied to a shooting Game application, where the Game application may be a Multiplayer Online tactical sports Game (MOBA) application, or may also be a Single-Player Game (SPG) application. The types of gaming applications described above may include, but are not limited to, at least one of: two-dimensional (2D) game applications, Three-dimensional (3D) game applications, Virtual Reality (VR) game applications, Augmented Reality (AR) game applications, Mixed Reality (MR) game applications. The above is merely an example, and the present embodiment is not limited to this.
Furthermore, the virtual character in the Shooting-type Game application may be, but is not limited to, a character object controlled by a current player logged in the client of the Shooting Game application, where the Shooting Game application may be a Third Person Shooting Game (TPS) application, such as running the Shooting Game application from the perspective of a Third-party character object other than the virtual character controlled by the current player, or a First Person Shooting Game (FPS) application, such as running the Shooting Game application from the perspective of a virtual character controlled by the current player. The virtual character can control the virtual shooting prop to execute shooting operation, so as to complete a shooting game task. Here, the virtual shooting prop may be, but is not limited to: shooting properties of attacks such as virtual guns, virtual shells and the like, such as pistols, submachine guns, light machine guns, sniper guns, mortars and the like. Further, the above-described shooting game tasks may include, but are not limited to: a shooting game task of a task winning is obtained by killing all the enemy virtual characters, a shooting game task of a task winning is obtained by the number of the killed virtual objects generated in the target area reaching a target threshold, and the like. The above is an example, and this is not limited in this embodiment.
Optionally, in this embodiment, the shooting mode of the shooting prop may include, but is not limited to: a waist shoot mode (hereinafter, also referred to as an off-mirror shooting mode, simply referred to as an "off-mirror mode"), and a top-mirror shooting mode (hereinafter, also referred to as an on-mirror shooting mode, simply referred to as an "on-mirror mode"). In the open mirror mode, the virtual shooting prop for presenting the target is aimed at the enlarged object in the client, but the observation field of view becomes smaller. Conversely, in the off-mirror mode, a larger field of view will be presented in the client, but the object to be shot cannot be accurately aimed.
Correspondingly, in the present embodiment, the switching of the shooting mode may be, but is not limited to, switching between the waist shooting mode and the mirror shooting mode. For example, suppose that a shooting mode switching key is displayed in a man-machine interaction screen of a terminal device where a client is located, after detecting that a click operation is performed on the shooting mode switching key, a shooting mode switching instruction is triggered for switching a current shooting mode to a target shooting mode. When the current shooting mode is a waist shooting mode, the target shooting mode is a mirror shooting mode; and when the current shooting mode is the mirror shot shooting mode, the target shooting mode is the waist shooting mode.
Optionally, in this embodiment, the scene of detecting that the running state indicates that the target virtual shooting prop is in the shooting state and is simultaneously in the shooting mode switching state may include, but is not limited to:
1) the method comprises the steps of detecting that a target virtual shooting prop is in a shooting state (namely, a shooting operation is being executed), and then detecting a switching trigger instruction for requesting to switch a shooting mode of the target virtual shooting prop in the shooting process. And under the condition that the switching trigger instruction is detected, determining that the target virtual shooting prop enters a shooting mode switching state, and determining that the running state of the target virtual shooting prop is that the target virtual shooting prop is in the shooting state and the shooting mode switching state at the same time.
2) And under the condition that a switching trigger instruction for requesting switching of the shooting mode of the target virtual shooting prop is detected, determining that the target virtual shooting prop enters a shooting mode switching state. And in the process of switching to the target shooting mode, detecting a shooting instruction for requesting to control the target virtual shooting prop to execute the shooting operation. And under the condition that the shooting instruction is detected, determining that the target virtual shooting prop enters a shooting state, and determining that the running state of the target virtual shooting prop is that the target virtual shooting prop is in a shooting state and a shooting mode switching state at the same time.
That is to say, in this embodiment, the entering sequence is not limited for the shooting state and the shooting mode switching state, and when it is detected that the target virtual shooting prop is in the above two operation states at the same time, the target virtual shooting prop keeps the shooting operation while executing the switching operation of the shooting mode, without interrupting any one of the operations, so that the two control operations can be simultaneously implemented in parallel, and the animations corresponding to the two control operations are simultaneously played in the client, so as to ensure the efficiency of the control operation.
It should be noted that, the above-mentioned control target virtual shooting prop maintaining the shooting state may include, but is not limited to: under the condition that the target virtual shooting prop is not switched to the target shooting mode, whether the shooting state of the target virtual shooting prop is kept or not can be determined according to whether the target virtual shooting prop executes the shooting operation or not. That is, in this embodiment, the target virtual shooting prop is authorized to have the ability to implement two control operations simultaneously: and if the target virtual shooting prop is detected to be always executing the shooting operation and not quitting the shooting state before being completely switched to the target shooting mode, keeping the target virtual shooting prop in the shooting state. However, if the target virtual shooting prop stops executing the shooting operation before the target shooting mode is completely switched, the target virtual shooting prop exits from the shooting state, and the target virtual shooting prop is not affected by the switching process of the shooting mode.
Optionally, in this embodiment, in the process of switching the target virtual shooting prop to the target shooting mode, controlling the target virtual shooting prop to maintain the shooting state may include, but is not limited to: and controlling to realize the simultaneous parallelism of the two control operations by a state machine corresponding to the running state. The state machine in the running state may include a two-layer structure, such as a first sub-state machine and a second sub-state machine, where the first sub-state machine is used to control to implement a shooting operation and to control to play a shooting animation corresponding to the shooting operation; and the second sub-state machine is used for controlling the realization of the switching operation of the shooting mode and controlling the playing of the switching animation corresponding to the switching operation.
It should be noted that, in the related art, a structure is often included in a state machine for controlling and implementing an operation state. In this embodiment, a new layer of structure is added to the state machine to enable the shooting operation and the shooting mode switching operation to be processed and played synchronously, so as to overcome the problem of higher complexity of the control operation caused by only sequentially executing different control operations in the related art, and enable the two control operations to be simultaneously implemented, so as to simplify the control operation and achieve the effect of improving the efficiency of the control operation.
Optionally, in this embodiment, after the target virtual shooting prop has been switched to the target shooting mode and does not exit from the shooting state, the method may further include, but is not limited to:
1) controlling the first sub-state machine and the second sub-state machine to stop running, and determining a shooting state machine independently corresponding to a shooting state so as to independently control subsequent independent shooting operation through the shooting state machine;
2) and controlling the first sub-state machine to stop running and controlling the second sub-state machine to continue running until the target virtual shooting prop exits from the shooting state.
Optionally, in this embodiment, when the target virtual shooting prop has exited the shooting status but has not been switched to the target shooting mode, the method may further include, but is not limited to:
1) controlling the first sub-state machine and the second sub-state machine to stop running, and determining a switching state machine independently corresponding to the switching state of the shooting mode so as to independently control subsequent independent switching operation through the switching state machine;
2) and controlling the second sub-state machine to stop running, and controlling the first sub-state machine to continue running until the target virtual shooting prop is switched to the target shooting mode.
The description is made with reference to the example shown in fig. 3:
assume that the target virtual shooting prop is currently in a shooting state as by step S302. Then as step S304, determining whether a switching trigger instruction for requesting switching of a shooting mode (such as a mirror switching mode) is detected, if the switching trigger instruction is not detected, returning to step S302, and if the switching trigger instruction is detected, executing step S306, determining whether the shooting mode is in a mirror opening mode (also referred to as a mirror lifting shooting mode), if the shooting mode is currently in the mirror opening mode, determining that the switching trigger instruction is used for requesting to switch off the mirror, executing step S308-1, controlling the target virtual shooting item to keep shooting operation, and executing mirror switching operation; and if the target virtual shooting prop is in the mirror-off mode, determining that a switching trigger instruction is used for requesting to open the mirror, executing the step S308-2, controlling the target virtual shooting prop to keep shooting operation, and executing the mirror-on operation.
Further, after the switching of the switch mirrors is completed, in step S310, it is determined whether the auxiliary prop (e.g., bullet) of the target virtual shooting prop is exhausted, and if it is exhausted, in step S312-1, it is determined that the target virtual shooting prop has stopped the shooting operation, and exits the shooting state. If not, in step S312-2, it is determined that the target virtual shooting item is still performing the shooting operation, and the shooting status is continuously maintained.
The sequence and content of the steps shown in fig. 3 are examples, and this embodiment is not limited in any way.
Through the embodiment that this application provided, be in the shooting state and be in the condition of shooting mode switch state simultaneously at the virtual shooting stage property of target, the virtual shooting stage property of control target can also carry out the switch operation of shooting mode when carrying out the shooting operation, and need not to suspend one of them operation to accomplish another kind of operation. Therefore, the problem of high operation complexity caused by the fact that different control operations need to be executed in sequence in the related art is solved, the purpose of reducing the operation complexity of the control operation on the target virtual shooting prop is achieved, and the effect of improving the operation efficiency of the control operation is achieved.
As an optional scheme, before determining that the shooting mode after the switching of the target virtual shooting prop is the target shooting mode, the method further includes:
s1, detecting a switching trigger instruction under the condition that the target virtual shooting prop is determined to be in a shooting state, wherein the switching trigger instruction is used for requesting to switch the shooting mode of the target virtual shooting prop;
and S2, determining that the target virtual shooting prop enters a shooting mode switching state under the condition that a switching trigger instruction is detected, wherein the operation state is that the target virtual shooting prop is in a shooting state and is in the shooting mode switching state at the same time.
It should be noted that, the entering sequence is not limited to the shooting state and the shooting mode switching state, and in the case that the target virtual shooting prop is detected to be in the two operating states at the same time, the target virtual shooting prop is controlled to perform the switching operation of the shooting mode and maintain the shooting operation. In this embodiment, if it is detected that the target virtual shooting prop is already in the shooting state, a switching trigger instruction for requesting switching of a shooting mode of the target virtual shooting prop is detected through a human-computer interaction screen corresponding to the client. So as to determine that the target virtual shooting props simultaneously enter a shooting mode switching state under the condition that the switching trigger instruction is detected.
The description is made with reference to the example shown in fig. 4: assuming that a shooting key (i.e., a key corresponding to a bullet icon) 402 in the man-machine interaction screen corresponding to the client has been clicked as shown in fig. 4, it is determined that a target virtual item (e.g., a virtual gun) controlled by the client is currently in a shooting state. Further, in the shooting process, it is detected whether the switching key 404 in the man-machine interaction screen corresponding to the client is clicked. If it is detected that the switching key 404 is also clicked, it is determined that a switching trigger instruction for requesting switching of the shooting mode of the target virtual shooting prop is detected, and the target virtual shooting prop enters a shooting mode switching state. Further assuming that the current shooting mode is the off-mirror mode, it may be determined that the switched target shooting mode is the on-mirror mode.
In the above situation, in the case that it is determined that the operation state of the target virtual shooting item indicates that the target virtual shooting item is in the shooting state and the shooting mode switching state at the same time, the process of switching from the off-mirror mode to the on-mirror mode can be completed in the process that the target virtual shooting item performs the shooting operation, and the result interface after switching can be switched to the on-mirror mode 400 at the same time as the shooting, as shown in the area inside the dotted circle in fig. 4, so that the switching operation and the shooting operation can be performed at the same time without interrupting the shooting operation being performed.
Through the embodiment that this application provided, under the condition that has been in the shooting state, whether detection target virtual shooting stage property is in shooting mode switching state. And under the condition that a switching trigger instruction is detected, the target virtual shooting prop is determined to enter a shooting mode switching state, and the running state is in the shooting state and the shooting mode switching state at the same time, so that the target virtual shooting prop is controlled to simultaneously process the shooting process and the switching process, the shooting operation executed in advance is not required to be interrupted, the processing process of simultaneously executing various control operations is simplified, and the complexity of the control operation is reduced.
As an optional scheme, before determining that the shooting mode after the switching of the target virtual shooting prop is the target shooting mode, the method further includes:
s1, determining that the target virtual shooting prop enters a shooting mode switching state under the condition that a switching trigger instruction is detected through a human-computer interaction screen corresponding to the client, wherein the switching trigger instruction is used for requesting to switch the shooting mode of the target virtual shooting prop;
s2, detecting a shooting instruction through the man-machine interaction screen in the process that the target virtual shooting prop is switched to the target shooting mode, wherein the shooting instruction is used for requesting to control the target virtual shooting prop to execute shooting operation;
and S3, determining that the target virtual shooting prop enters a shooting state under the condition that the shooting instruction is detected, and operating the target virtual shooting prop in the shooting state and in a shooting mode switching state at the same time.
It should be noted that, the entering sequence is not limited to the shooting state and the shooting mode switching state, and in the case that the target virtual shooting prop is detected to be in the two operating states at the same time, the target virtual shooting prop is controlled to perform the switching operation of the shooting mode and maintain the shooting operation. In this embodiment, if it is detected that the target virtual shooting prop is already in the shooting mode switching state, a shooting instruction for requesting to control the target virtual shooting prop to execute a shooting operation is detected through a human-computer interaction screen corresponding to the client. So as to determine that the target virtual shooting props simultaneously enter a shooting state under the condition that the shooting instruction is detected.
The description is made with reference to the example shown in fig. 5: assuming that a click operation is performed on a switching key 404 in a human-computer interaction screen corresponding to the client as shown in fig. 5, it is determined that a switching trigger instruction for requesting to switch a shooting mode of the target virtual shooting prop is detected, and the target virtual shooting prop enters a shooting mode switching state. In the process that the target virtual shooting prop is switched to the target shooting mode, whether the shooting key (i.e. the key corresponding to one bullet icon) 402 is clicked or not is detected through the man-machine interaction screen. If it is detected that the shooting key 402 is also clicked during the switching process of the shooting mode, it is determined that a shooting instruction for requesting to control the target virtual shooting prop to execute the shooting operation is detected, and the target virtual shooting prop enters a shooting state. Further assuming that the current shooting mode is the on-mirror mode, it may be determined that the switched target shooting mode is the off-mirror mode.
In the above situation, in the case that it is determined that the operating state of the target virtual shooting prop indicates that the target virtual shooting prop is in the shooting state and the shooting mode switching state at the same time, the target virtual shooting prop may be controlled to simultaneously perform the shooting operation during the switching of the target virtual shooting prop from the mirror-open mode to the mirror-close mode, and as a result, the interface may be as shown in the area inside the dotted circle in fig. 5, and the shooting process may be maintained while switching to the mirror-close mode 500, so that the shooting operation and the switching operation may be simultaneously performed without interrupting the shooting mode switching operation being performed.
Through the embodiment that this application provided, under the condition that has been in shooting mode switching state, whether detection target virtual shooting stage property is in the shooting state. And under the condition that a shooting instruction is detected, the target virtual shooting prop is determined to enter a shooting state, and the running state is in the shooting state and the shooting mode switching state at the same time, so that the target virtual shooting prop simultaneously processes the switching process and the shooting process, the shooting mode switching operation executed in advance is not required to be interrupted, the processing process of simultaneously executing various control operations is simplified, and the complexity of the control operation is reduced.
As an alternative, controlling the target virtual shooting prop to maintain a shooting state during the target virtual shooting prop being switched to the target shooting mode includes:
1) when the target virtual shooting prop is not switched to the target shooting mode and the target virtual shooting prop is detected not to exit from the shooting state, controlling the target virtual shooting prop to keep the shooting state;
2) and when the target virtual shooting prop is not switched to the target shooting mode and the target virtual shooting prop is detected to exit from the shooting state, controlling the target virtual shooting prop to exit from the shooting state.
Optionally, in this embodiment, the method further includes: and after the target virtual shooting prop is switched to the target shooting mode and the target virtual shooting prop is detected not to exit from the shooting state, controlling the target virtual shooting prop to continuously keep the shooting state.
It should be noted that, in this embodiment, in the process that the target virtual shooting prop is switched to the target shooting mode, the target virtual shooting prop is controlled to keep a shooting state, that is, the target virtual shooting prop can be authorized to have the capability of simultaneously implementing two control operations: when the target virtual shooting prop is not switched to the target shooting mode, whether the shooting state is kept or not can be determined according to whether the target virtual shooting prop exits from the shooting state or not. In other words, if it is detected that the target virtual shooting prop is always performing the shooting operation and does not exit the shooting status before completely switching to the target shooting mode, the target virtual shooting prop is enabled to continue to maintain the shooting status. However, if the target virtual shooting prop stops executing the shooting operation before the target shooting mode is completely switched, the target virtual shooting prop exits from the shooting state, and the target virtual shooting prop is not affected by the switching process of the shooting mode.
Through the embodiment provided by the application, in the process that the target virtual shooting prop is switched to the target shooting mode, whether the target virtual shooting prop is controlled to continuously keep the shooting state can be determined according to whether the target virtual shooting prop exits from the shooting state. That is to say, the authority of the target virtual shooting prop for simultaneously realizing two control operations is provided, so that the target virtual shooting prop has the capability of simultaneously executing the two control operations, the aim of parallel processing of various control operations is fulfilled, each control operation does not need to be linearly executed in sequence, and the operation efficiency of the control operations is improved.
As an alternative, controlling the target virtual shooting prop to maintain a shooting state during the target virtual shooting prop being switched to the target shooting mode includes:
and in the process of switching the target virtual shooting prop to the target shooting mode, controlling the client to play the switching animation switched to the target shooting mode through a first sub-state machine in the state machines corresponding to the running state, and simultaneously controlling the client to play the shooting animation corresponding to the shooting state through a second sub-state machine in the state machines corresponding to the running state.
Optionally, in this embodiment, before obtaining the running state of the target virtual shooting prop controlled by the client, the method further includes: and constructing a first sub-state machine and a second sub-state machine for the state machines corresponding to the running states in the client, wherein the first sub-state machine is used for controlling playing of the switching animation, and the second sub-state machine is used for controlling playing of the shooting animation.
It should be noted that, in this embodiment, the purpose of parallel processing for the above two control operations is achieved by constructing a two-layer structure for the state machine corresponding to the running state, such as the first sub-state machine and the second sub-state machine. The first sub-state machine is used for controlling and realizing shooting operation and controlling and playing shooting animation corresponding to the shooting operation; and the second sub-state machine is used for controlling the realization of the switching operation of the shooting mode and controlling the playing of the switching animation corresponding to the switching operation.
For example, as shown in fig. 6, in a state machine system in a game engine, different state machines are generally configured for different control operations, and as shown in fig. 6, an independent state machine is configured for a shooting operation through an independent configuration item 604 for controlling the playing of a shooting animation (as shown in fig. 6, a firing animation); an independent state machine is configured for the shooting mode switching operation through an independent configuration item 602 for controlling the playing of the switching animation (shown in fig. 6 as an open animation switched to an open mode). In the present embodiment, as shown in fig. 7, the purpose of parallel processing of two control operations is achieved by constructing a two-layer structure for the state machine corresponding to the configuration item 702, i.e. the first sub-state machine and the second sub-state machine. The first sub-state machine is used for controlling and realizing shooting operation and controlling and playing shooting animation corresponding to the shooting operation; and the second sub-state machine is used for controlling the realization of the switching operation of the shooting mode and controlling the playing of the switching animation corresponding to the switching operation.
Through the embodiment provided by the application, the shooting operation and the shooting mode switching operation can be processed and the animation can be played synchronously by adding a layer of structure to the state machine corresponding to the running state, so that the problem that the complexity of the control operation is high due to the fact that different control operations can only be executed in sequence in the related art is solved, the two control operations can be simultaneously realized, and the effect of improving the efficiency of the control operation is achieved.
As an alternative, the method comprises the following steps:
1) after the target virtual shooting prop is switched to the target shooting mode, and the target virtual shooting prop is detected not to exit from the shooting state, controlling the first sub-state machine and the second sub-state machine to stop running, and determining a shooting state machine which corresponds to the shooting state and runs independently so as to control the client to play the target shooting animation independently through the shooting state machine; or
2) And when the target virtual shooting prop exits the shooting state but is not switched to the target shooting mode, controlling the first sub-state machine and the second sub-state machine to stop running, and determining a switching state machine which corresponds to the shooting mode switching state and runs independently so as to control the client to play the target switching animation independently through the switching state machine.
It should be noted that, in this embodiment, the first sub state machine and the second sub state machine may be, but are not limited to, simultaneously start to operate, and simultaneously stop to operate. That is, when the target virtual item stops shooting (i.e. exits the shooting state), or has completed switching to the target shooting mode (i.e. exits the shooting mode switching state), the first sub-state machine and the second sub-state machine may be controlled to stop operating at the same time. And if one control operation is detected to be still running, jumping to an independent state machine corresponding to the operation state which is still running independently, so that the client controls to continue to independently execute the corresponding operation state and play the corresponding animation.
For example, when the target virtual shooting prop exits from the shooting mode switching state but does not exit from the shooting state, a shooting state machine corresponding to the shooting state and running independently is determined, so that the client is controlled by the shooting state machine to play the target shooting animation independently. For another example, when the target virtual shooting prop exits from the shooting state but does not exit from the shooting mode switching state, a switching state machine which corresponds to the shooting mode switching state and operates independently is determined, so that the switching state machine controls the client to play the target switching animation independently.
Through the real-time configuration that this application provided, through for first substate machine and second substate machine configuration synchronous operation logic to be convenient for the virtual shooting stage property of target can directly switch to other independent operating condition after withdrawing from the parallel running state that this embodiment provided, simplifies the control logic to the state machine, has guaranteed the flexibility of control.
As an alternative, the method comprises the following steps:
1) after the target virtual shooting prop is switched to the target shooting mode, and the target virtual shooting prop is detected not to exit from the shooting state, controlling the first sub-state machine to stop running, and controlling the second sub-state machine to continue running until the target virtual shooting prop exits from the shooting state; or
2) And when the target virtual shooting prop exits the shooting state but is not switched to the target shooting mode, controlling the second sub-state machine to stop running and controlling the first sub-state machine to continue running until the target virtual shooting prop is switched to the target shooting mode.
It should be noted that, in this embodiment, the first sub-state machine and the second sub-state machine may, but are not limited to, operate independently. That is, when the target virtual item stops shooting (i.e. exits the shooting state), the first sub-state machine may be controlled to stop running, and the second sub-state machine may continue running. Or, when the target virtual prop has completed switching to the target shooting mode (i.e. exits from the shooting mode switching state), the second sub-state machine may be controlled to stop operating, and the first sub-state machine may continue operating.
For example, when the target virtual shooting prop exits from the shooting mode switching state but does not exit from the shooting state, the first sub-state machine is controlled to stop running, the second sub-state machine is controlled to continue running, and the shooting animation is continuously played until the target virtual shooting prop exits from the shooting state. For another example, when the target virtual shooting prop exits from the shooting state but does not exit from the shooting mode switching state, the second sub-state machine is controlled to stop running, the first sub-state machine is controlled to continue running, and the switching animation is continuously played until the target virtual shooting prop is switched to the target shooting mode.
By configuring asynchronous operation logic for the first sub-state machine and the second sub-state machine in real time, the current sub-state machine can be continuously used after any one state is exited, other state machines do not need to be jumped to, the repeated setting of the state machines is reduced, and the processing load of a client is reduced.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to another aspect of the embodiment of the invention, a virtual item control device for implementing the virtual item control method is also provided. As shown in fig. 8, the apparatus includes:
1) a first obtaining unit 802, configured to obtain, in a process of running a game in a client, a running state of a target virtual shooting prop controlled by the client;
2) a first determining unit 804, configured to determine, when the obtained running state indicates that the target virtual shooting prop is in a shooting state and is in a shooting mode switching state at the same time, that the shooting mode after the target virtual shooting prop is switched is a target shooting mode;
3) the first control unit 806 is configured to control the target virtual shooting prop to keep a shooting state in the process that the target virtual shooting prop is switched to the target shooting mode.
Optionally, in this embodiment, the virtual item control device may be applied, but not limited to, a shooting Game application, where the Game application may be a Multiplayer Online Battle sports Game (MOBA) application, or may also be a Single-Player Game (SPG) application. The types of gaming applications described above may include, but are not limited to, at least one of: two-dimensional (2D) game applications, Three-dimensional (3D) game applications, Virtual Reality (VR) game applications, Augmented Reality (AR) game applications, Mixed Reality (MR) game applications. The above is merely an example, and the present embodiment is not limited to this.
Furthermore, the virtual character in the Shooting-type Game application may be, but is not limited to, a character object controlled by a current player logged in the client of the Shooting Game application, where the Shooting Game application may be a Third Person Shooting Game (TPS) application, such as running the Shooting Game application from the perspective of a Third-party character object other than the virtual character controlled by the current player, or a First Person Shooting Game (FPS) application, such as running the Shooting Game application from the perspective of a virtual character controlled by the current player. The virtual character can control the virtual shooting prop to execute shooting operation, so as to complete a shooting game task. Here, the virtual shooting prop may be, but is not limited to: shooting properties of attacks such as virtual guns, virtual shells and the like, such as pistols, submachine guns, light machine guns, sniper guns, mortars and the like. Further, the above-described shooting game tasks may include, but are not limited to: a shooting game task of a task winning is obtained by killing all the enemy virtual characters, a shooting game task of a task winning is obtained by the number of the killed virtual objects generated in the target area reaching a target threshold, and the like. The above is an example, and this is not limited in this embodiment.
Optionally, in this embodiment, the shooting mode of the shooting prop may include, but is not limited to: a waist shoot mode (hereinafter, also referred to as an off-mirror shooting mode, simply referred to as "off-mirror"), and a top-mirror shooting mode (hereinafter, also referred to as an on-mirror shooting mode, simply referred to as "on-mirror"). When the mirror is opened, the virtual shooting prop for presenting the target is aimed at the enlarged object in the client, but the observation field of view becomes smaller. Conversely, when the mirror is closed, a larger field of view will be presented in the client, but the object to be shot cannot be accurately aimed.
The embodiments in this embodiment may refer to the above method embodiments, but are not limited thereto.
As an optional scheme, the method further comprises the following steps:
1) the first detection unit is used for detecting a switching trigger instruction under the condition that the target virtual shooting prop is determined to be in a shooting state before the shooting mode after the switching of the target virtual shooting prop is determined to be the target shooting mode, wherein the switching trigger instruction is used for requesting the switching of the shooting mode of the target virtual shooting prop;
2) and the second determining unit is used for determining that the target virtual shooting prop enters a shooting mode switching state under the condition that the switching triggering instruction is detected, and the running state is that the target virtual shooting prop is in a shooting state and is simultaneously in the shooting mode switching state.
The embodiments in this embodiment may refer to the above method embodiments, but are not limited thereto.
As an optional scheme, the method further comprises the following steps:
1) the third determining unit is used for determining that the target virtual shooting prop enters a shooting mode switching state under the condition that a switching trigger instruction is detected before the shooting mode after the switching of the target virtual shooting prop is determined to be the target shooting mode, wherein the switching trigger instruction is used for requesting to switch the shooting mode of the target virtual shooting prop;
2) the second detection unit is used for detecting a shooting instruction in the process that the target virtual shooting prop is switched to the target shooting mode, wherein the shooting instruction is used for requesting to control the target virtual shooting prop to execute shooting operation;
3) and the third determining unit is used for determining that the target virtual shooting prop enters a shooting state under the condition that the shooting instruction is detected, and the running state is that the target virtual shooting prop is in the shooting state and is in a shooting mode switching state at the same time.
The embodiments in this embodiment may refer to the above method embodiments, but are not limited thereto.
As an alternative, as shown in fig. 9, the first control unit 806 includes:
1) a first control module 902, configured to control the target virtual shooting prop to keep in a shooting state when the target virtual shooting prop is not switched to the target shooting mode and it is detected that the target virtual shooting prop does not exit the shooting state;
2) a second control module 904, configured to control the target virtual shooting prop to exit the shooting state when the target virtual shooting prop is not switched to the target shooting mode and the target virtual shooting prop is detected to exit the shooting state.
Optionally, in this embodiment, the method further includes: and after the target virtual shooting prop is switched to the target shooting mode and the target virtual shooting prop is detected not to exit from the shooting state, controlling the target virtual shooting prop to continuously keep the shooting state.
The embodiments in this embodiment may refer to the above method embodiments, but are not limited thereto.
As an alternative, as shown in fig. 10, the first control unit 806 includes:
1) and a third control module 1002, configured to, in the process that the target virtual shooting prop is switched to the target shooting mode, control the client to play the switching animation switched to the target shooting mode through a first sub-state machine in the state machines corresponding to the running state, and control the client to play the shooting animation corresponding to the shooting state through a second sub-state machine in the state machines corresponding to the running state.
The embodiments in this embodiment may refer to the above method embodiments, but are not limited thereto.
As an alternative, the method comprises the following steps:
1) the fourth control module is used for controlling the first sub-state machine and the second sub-state machine to stop running and determining the shooting state machine which corresponds to the shooting state and runs independently so as to control the client to play the target shooting animation independently through the shooting state machine after the target virtual shooting prop is switched to the target shooting mode and the target virtual shooting prop is detected not to exit the shooting state; or
2) And the fifth control module is used for controlling the first sub-state machine and the second sub-state machine to stop running when the target virtual shooting prop exits the shooting state but is not switched to the target shooting mode, determining a switching state machine which corresponds to the shooting mode switching state and runs independently, and controlling the client to play the target switching animation independently through the switching state machine.
The embodiments in this embodiment may refer to the above method embodiments, but are not limited thereto.
As an alternative, the method comprises the following steps:
1) the second control unit is used for controlling the first sub-state machine to stop running and controlling the second sub-state machine to continue running until the target virtual shooting prop exits the shooting state after the target virtual shooting prop is switched to the target shooting mode and the target virtual shooting prop is detected not to exit the shooting state; or
2) And the third control unit is used for controlling the second sub-state machine to stop running and controlling the first sub-state machine to continue running until the target virtual shooting prop is switched to the target shooting mode when the target virtual shooting prop exits the shooting state but the target virtual shooting prop is not switched to the target shooting mode.
As an optional scheme, the method further comprises the following steps:
and the construction unit is used for constructing a first sub-state machine and a second sub-state machine for the state machines corresponding to the running states in the client before the running states of the target virtual shooting props controlled by the client are obtained, wherein the first sub-state machine is used for controlling playing of the switching animation, and the second sub-state machine is used for controlling playing of the shooting animation.
The embodiments in this embodiment may refer to the above method embodiments, but are not limited thereto.
According to another aspect of the embodiment of the present invention, there is also provided an electronic device for implementing the above virtual prop control method, as shown in fig. 11, the electronic device includes a memory 1102 and a processor 1104, the memory 1102 stores therein a computer program, and the processor 1104 is configured to execute the steps in any one of the above method embodiments through the computer program.
Optionally, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, in the process of running one game in the client, obtaining the running state of the target virtual shooting prop controlled by the client;
s2, determining the shooting mode after the target virtual shooting prop is switched to be the target shooting mode under the condition that the obtained running state indicates that the target virtual shooting prop is in the shooting state and is in the shooting mode switching state at the same time;
and S3, controlling the target virtual shooting prop to keep a shooting state in the process of switching the target virtual shooting prop to the target shooting mode.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 11 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 11 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 11, or have a different configuration than shown in FIG. 11.
The memory 1102 may be configured to store software programs and modules, such as program instructions/modules corresponding to the virtual item control method and apparatus in the embodiments of the present invention, and the processor 1104 executes various functional applications and data processing by running the software programs and modules stored in the memory 1102, that is, implements the virtual item control method. The memory 1102 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 1102 can further include memory located remotely from the processor 1104 and such remote memory can be coupled to the terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 1102 may be specifically, but not limited to, used to store information such as the operating state and shooting mode of the target virtual shooting prop. As an example, as shown in fig. 11, the memory 1102 may include, but is not limited to, a first obtaining unit 802, a first determining unit 804, and a first control unit 806 in the virtual item control device. In addition, the virtual item control device may further include, but is not limited to, other module units in the virtual item control device, which is not described in detail in this example.
Optionally, the transmitting device 1106 is used for receiving or transmitting data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 1106 includes a Network adapter (NIC) that can be connected to a router via a Network cable to communicate with the internet or a local area Network. In one example, the transmission device 1106 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In addition, the electronic device further includes: a display 1108 for displaying the operation animation corresponding to the target virtual shooting prop; and a connection bus 1110 for connecting the respective module parts in the above-described electronic apparatus.
According to a further aspect of an embodiment of the present invention, there is also provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, in the process of running one game in the client, obtaining the running state of the target virtual shooting prop controlled by the client;
s2, determining the shooting mode after the target virtual shooting prop is switched to be the target shooting mode under the condition that the obtained running state indicates that the target virtual shooting prop is in the shooting state and is in the shooting mode switching state at the same time;
and S3, controlling the target virtual shooting prop to keep a shooting state in the process of switching the target virtual shooting prop to the target shooting mode.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (12)

1. A virtual item control method is characterized by comprising the following steps:
the method comprises the steps that in the process of running a game in a client, the running state of a target virtual shooting prop controlled by the client is obtained;
determining that the shooting mode after the target virtual shooting prop is switched is a target shooting mode under the condition that the acquired running state indicates that the target virtual shooting prop is in a shooting state and is in a shooting mode switching state at the same time;
and in the process that the target virtual shooting prop is switched to the target shooting mode, controlling the target virtual shooting prop to keep the shooting state.
2. The method of claim 1, wherein prior to determining that the switched firing mode of the target virtual firing prop is the target firing mode, further comprising:
under the condition that the target virtual shooting prop is determined to be in the shooting state, detecting a switching trigger instruction, wherein the switching trigger instruction is used for requesting to switch the shooting mode of the target virtual shooting prop;
and under the condition that the switching trigger instruction is detected, determining that the target virtual shooting prop enters the shooting mode switching state, wherein the running state is that the target virtual shooting prop is in the shooting state and simultaneously in the shooting mode switching state.
3. The method of claim 1, wherein prior to determining that the switched firing mode of the target virtual firing prop is the target firing mode, further comprising:
under the condition that a switching trigger instruction is detected, determining that the target virtual shooting prop enters a shooting mode switching state, wherein the switching trigger instruction is used for requesting to switch the shooting mode of the target virtual shooting prop;
detecting a shooting instruction in the process that the target virtual shooting prop is switched to the target shooting mode, wherein the shooting instruction is used for requesting to control the target virtual shooting prop to execute shooting operation;
detecting under the condition of shooting instruction, confirm the virtual shooting stage property of target gets into the shooting state, just the running state is the virtual shooting stage property of target is in the shooting state and be in simultaneously shooting mode switching state.
4. The method of claim 1, wherein controlling the target virtual shooting prop to maintain the shooting state during the target virtual shooting prop being switched to the target shooting mode comprises:
when the target virtual shooting prop is not switched to the target shooting mode and the target virtual shooting prop is detected not to exit the shooting state, controlling the target virtual shooting prop to keep the shooting state;
the target virtual shooting prop is not switched to the target shooting mode, and the target virtual shooting prop is detected to exit from the shooting state, and then the target virtual shooting prop is controlled to exit from the shooting state.
5. The method of claim 4, further comprising:
and after the target virtual shooting prop is switched to the target shooting mode and the target virtual shooting prop is detected not to exit the shooting state, controlling the target virtual shooting prop to continuously keep the shooting state.
6. The method of claim 1, wherein controlling the target virtual shooting prop to maintain the shooting state during the target virtual shooting prop being switched to the target shooting mode comprises:
and in the process that the target virtual shooting prop is switched to the target shooting mode, controlling the client to play the switching animation switched to the target shooting mode through a first sub-state machine in the state machines corresponding to the running state, and simultaneously controlling the client to play the shooting animation corresponding to the shooting state through a second sub-state machine in the state machines corresponding to the running state.
7. The method of claim 6, comprising:
after the target virtual shooting prop is switched to the target shooting mode and the target virtual shooting prop is detected not to exit the shooting state, controlling the first sub-state machine and the second sub-state machine to stop running, and determining a shooting state machine which corresponds to the shooting state and runs independently so as to control the client to play a target shooting animation independently through the shooting state machine; or
And when the target virtual shooting prop exits the shooting state but is not switched to the target shooting mode, controlling the first sub-state machine and the second sub-state machine to stop running, and determining a switching state machine which corresponds to the shooting mode switching state and runs independently so as to control the client to independently play the target switching animation through the switching state machine.
8. The method of claim 6, comprising:
after the target virtual shooting prop is switched to the target shooting mode and the target virtual shooting prop is detected not to exit the shooting state, controlling the first sub-state machine to stop running and controlling the second sub-state machine to continue running until the target virtual shooting prop exits the shooting state; or
And when the target virtual shooting prop exits the shooting state but is not switched to the target shooting mode, controlling the second sub-state machine to stop running and controlling the first sub-state machine to continue running until the target virtual shooting prop is switched to the target shooting mode.
9. The method according to any one of claims 6 to 8, further comprising, prior to the obtaining the operational state of the target virtual shooting prop controlled by the client:
and constructing the first sub-state machine and the second sub-state machine for the state machine corresponding to the running state in the client, wherein the first sub-state machine is used for controlling the playing of the switching animation, and the second sub-state machine is used for controlling the playing of the shooting animation.
10. A virtual prop control apparatus, comprising:
the system comprises a first acquisition unit, a second acquisition unit and a control unit, wherein the first acquisition unit is used for acquiring the running state of a target virtual shooting prop controlled by a client in the process of running a game in the client;
the first determining unit is used for determining that the shooting mode after the target virtual shooting prop is switched is the target shooting mode under the condition that the acquired running state indicates that the target virtual shooting prop is in the shooting state and is in the shooting mode switching state at the same time;
and the first control unit is used for controlling the target virtual shooting prop to keep the shooting state in the process of switching the target virtual shooting prop to the target shooting mode.
11. A computer-readable storage medium comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 9.
12. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 9 by means of the computer program.
CN202010148164.4A 2020-03-05 2020-03-05 Virtual item control method and device, storage medium and electronic device Active CN111359214B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010148164.4A CN111359214B (en) 2020-03-05 2020-03-05 Virtual item control method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010148164.4A CN111359214B (en) 2020-03-05 2020-03-05 Virtual item control method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN111359214A CN111359214A (en) 2020-07-03
CN111359214B true CN111359214B (en) 2021-05-11

Family

ID=71200326

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010148164.4A Active CN111359214B (en) 2020-03-05 2020-03-05 Virtual item control method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN111359214B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111921188B (en) * 2020-08-21 2024-07-02 腾讯科技(深圳)有限公司 Virtual object control method, device, terminal and storage medium
CN115944920A (en) * 2022-12-27 2023-04-11 网易(杭州)网络有限公司 Method and device for controlling shooting in game, storage medium and electronic equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8834245B2 (en) * 2007-08-17 2014-09-16 Nintendo Co., Ltd. System and method for lock on target tracking with free targeting capability
CN108339272A (en) * 2018-02-12 2018-07-31 网易(杭州)网络有限公司 Virtual shooting main body control method and device, electronic equipment, storage medium
CN109589601B (en) * 2018-12-10 2022-04-08 网易(杭州)网络有限公司 Virtual sighting telescope control method and device, electronic equipment and storage medium
CN110141869A (en) * 2019-04-11 2019-08-20 腾讯科技(深圳)有限公司 Method of controlling operation thereof, device, electronic equipment and storage medium
CN110339562B (en) * 2019-08-01 2023-09-15 腾讯科技(深圳)有限公司 Virtual object control method, device, terminal and storage medium
CN110597449B (en) * 2019-09-12 2021-10-29 腾讯科技(深圳)有限公司 Prop using method, device, terminal and storage medium based on virtual environment

Also Published As

Publication number Publication date
CN111359214A (en) 2020-07-03

Similar Documents

Publication Publication Date Title
KR102629359B1 (en) Virtual object attack prompt method and device, and terminal and storage medium
CN111589148B (en) User interface display method, device, terminal and storage medium
CN111298430A (en) Virtual item control method and device, storage medium and electronic device
CN111111191B (en) Virtual skill activation method and device, storage medium and electronic device
CN110975289B (en) Shooting mode switching control method and device, storage medium and electronic device
CN110075522A (en) The control method of virtual weapons, device and terminal in shooting game
KR102684175B1 (en) Virtual manipulation object control method and device, storage medium, and electronic device
CN111359214B (en) Virtual item control method and device, storage medium and electronic device
CN111265870A (en) Control method and device of virtual operation object and storage medium
CN111054065A (en) Control method and device of virtual prop, storage medium and electronic device
CN110898425B (en) Information synchronization method and device, storage medium and electronic device
CN112107856B (en) Hit feedback method and device, storage medium and electronic equipment
CN112107861A (en) Control method and device of virtual prop, storage medium and electronic equipment
WO2023029828A9 (en) Method and apparatus for controlling avatar, and terminal and storage medium
US12042737B2 (en) Image display method and apparatus, storage medium, and electronic device
CN111068306B (en) Automatic operation method and device of virtual prop, storage medium and electronic device
CN113893540B (en) Information prompting method and device, storage medium and electronic equipment
CN111167124A (en) Virtual prop obtaining method and device, storage medium and electronic device
CN111258489B (en) Operation method and device of virtual prop and storage medium
CN111249732A (en) Virtual object acquisition method and device, storage medium and electronic device
CN113694515B (en) Interface display method, device, terminal and storage medium
CN112370782B (en) Auxiliary resource display method and device, storage medium and electronic equipment
CN111265868A (en) Display control method, display control device, storage medium, and electronic device
CN112473139A (en) Object form switching method and device, storage medium and electronic device
CN113713379B (en) Object matching method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40025840

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant