Object form switching method and device, storage medium, and electronic device
By responding to hidden instructions and detection instructions in the game scene and switching the form of virtual objects, the problem of not being able to switch the form of virtual objects in the prior art is solved, and the diversity and authenticity of the game experience is improved.
Patent Information
- Application Number
- CN202011363389.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-27
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2040-11-27
AI Technical Summary
In the prior art, players cannot switch the form of virtual objects in game scenes, resulting in a single game experience.
By selecting the object set based on the scene information of the virtual scene and responding to hidden instructions and detection instructions, the virtual object is switched from one form to another.
It realizes flexible switching of virtual objects in virtual scenes, improving the degree of anthropomorphism and authenticity of the game.
Smart Images

Figure CN112473139B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for switching object forms, a storage medium, and an electronic device. Background Art
[0002] In the related technologies, with the development of computer technology and the diversification of terminal functions, more and more virtual scenes can be realized on terminals and other devices, such as virtual games including racing, sandbox, role-playing games (RPG) and shooting games, etc. Among them, in all role-playing games of MMORPG (Massive Multiplayer Online Role-Playing Game), players have to play a fictional character and control the character to complete various tasks in the game, and interact with NPCs in the game (NPC is the abbreviation of Non-Player Character, which is a type of role in the game, meaning non-player character, which refers to the game character that is not controlled by the player).
[0003] In the related art, the PCC or NPC that appears in the game scene has a character form. For example, the character form of the NPC is a virtual image based on a certain character prototype, such as a dinosaur, the form of a certain animal, etc. In the related art, the player selects the character form of the PCC (Player-Controlled Character) and cannot switch it, but can only follow the system settings. If the player wants to switch the character form, he needs to re-select the PCC or wear a skin. If the PCC is not changed or additional kits are added, the character form cannot be switched in the game scene in the related art.
[0004] With respect to the above-mentioned problems existing in the related technologies, no effective solutions have been found so far. Summary of the invention
[0005] The embodiments of the present invention provide a method and device for switching object forms, a storage medium, and an electronic device.
[0006] According to one embodiment of the present invention, a method for switching object forms is provided, comprising: selecting a first object set and a second object set according to scene information of a virtual scene, wherein the first object set and the second object set respectively include a first number of first operation objects and a second number of second operation objects; in response to a hiding instruction for the first operation object, switching the first operation object from a first form to a second form, and adding the first operation object in the second form to the virtual scene; detecting a detection instruction for the second operation object in the virtual scene, and switching the first operation object from the second form to the third form according to the detection result, wherein the detection instruction is used to detect whether the detection object is the first operation object.
[0007] Optionally, before switching the first operation object from a first form to a second form, the method further includes: switching the first operation object from a first preset form to the first form, and switching the second operation object from a second preset form to a third form, wherein the first preset form and the second preset form respectively correspond to the initial forms of the first operation object and the second operation object in the virtual scene.
[0008] Optionally, switching the first operation object from a first form to a second form includes one of the following: randomly assigning a form in a preset form library as the second form, and switching the first operation object from the first form to the second form; responding to a first selection instruction of the first operation object, and switching the first operation object from the first form to the second form based on the first selection instruction, wherein the first selection instruction is used to select identification information of the second form in a preset form list; detecting a second selection instruction of the first operation object in the virtual scene, determining the form of the scene object selected by the second selection instruction as the second form, and switching the first operation object from the first form to the second form.
[0009] Optionally, randomly allocating a form in the preset form library as the second form includes one of the following: before the switching duration ends, responding to a switching instruction of the first operation object, and randomly allocating a form in the preset form library as the second form; after the switching duration ends, generating a switching instruction, and randomly allocating a form in the preset form library as the second form.
[0010] Optionally, after selecting the first object set and the second object set according to scene information of the virtual scene, the method further includes: within a first time, responding to a move instruction for the second operation object, moving the second operation object to a specified position in the virtual map, and displaying scene elements around the specified position in the virtual scene; within a second time after the first time, controlling the second operation object to be in a stationary state, and controlling the first operation object to be in a movable state, wherein the first operation object can trigger the hiding instruction in the movable state; within a third time after the second time, controlling the second operation object to be in a movable state, wherein the second operation object can trigger the detection instruction in the movable state.
[0011] Optionally, after adding the first operation object in the second form to the virtual scene, the method further includes: counting the number of objects designated as the first operation object within a preset time, wherein the designated first operation object is the first operation object whose current form is the third form; if the number of objects is equal to the first number, allocating the first virtual resource to the second operation object; if the number of objects is less than the first number, allocating the second virtual resource to the first operation object.
[0012] Optionally, after adding the first operation object in the second form to the virtual scene, the method further includes: receiving in-site information uploaded by any first operation object on a first private channel; after the first number of first operation objects have reviewed and agreed, publishing the in-site message to the public channel of the virtual scene, wherein all the first operation objects and the second operation objects can receive the in-site message through the public channel.
[0013] Optionally, detecting the detection instruction of the second operation object in the virtual scene includes: calculating the time interval between the current time and the preset end time; generating a cycle duration of the detection cycle based on the time interval, wherein the cycle duration is positively correlated with the time interval; and detecting the detection instruction of the second operation object in the virtual scene according to the cycle duration.
[0014] Optionally, detecting the detection instruction of the second operation object in the virtual scene includes: allocating a third number of detection times for the second operation object; starting from the third number, if a detection instruction of the second operation object in the virtual scene is detected, subtracting the current number of detection times by 1 until the current number of detection times is 0.
[0015] Optionally, detecting the detection instruction of the second operation object in the virtual scene includes: allocating a first activation cycle of the detection instruction to the second operation object; if the detection instruction of the second operation object in the virtual scene is detected, after a corresponding duration of the first activation cycle, continuing to detect the detection instruction of the second operation object in the virtual scene until a preset termination time.
[0016] Optionally, detecting the detection instruction of the second operation object in the virtual scene includes: calculating the time interval between the current time and the preset end time; when the time interval is less than a preset duration, allocating a fourth number of detection times to the second operation object or allocating a second activation period of the detection instruction to the second operation object; and detecting the detection instruction of the second operation object in the virtual scene based on the detection times and / or the second activation period.
[0017] Optionally, detecting a detection instruction of the second operation object in the virtual scene, and switching the first operation object from the second form to the third form according to the detection result includes: activating a detection function of the second operation object, wherein the detection function is used to trigger a detection instruction through an external device operation; detecting the detection instruction of the second operation object, and obtaining a detection object pointed to by the detection instruction; determining whether the detection object is the first operation object; if the detection object is the first operation object, switching the first operation object from the second form to the third form.
[0018] According to another embodiment of the present invention, there is provided an object form switching device, comprising: a selection module, for selecting a first object set and a second object set according to scene information of a virtual scene, wherein the first object set and the second object set respectively include a first number of first operation objects and a second number of second operation objects; a first switching module, for responding to a hiding instruction for the first operation object, switching the first operation object from a first form to a second form, and adding the first operation object in the second form to the virtual scene; a second switching module, for detecting a detection instruction for the second operation object in the virtual scene, and switching the first operation object from the second form to the third form according to the detection result, wherein the detection instruction is used to detect whether the detection object is the first operation object.
[0019] Optionally, the device also includes: a third switching module, used to switch the first operation object from a first preset form to the first form, and switch the second operation object from a second preset form to a third form before the first switching module switches the first operation object from the first character form to the second character form, wherein the first preset form and the second preset form respectively correspond to the initial forms of the first operation object and the second operation object in the virtual scene.
[0020] Optionally, the first switching module includes one of the following: a first switching unit, used to randomly assign a form in a preset form library as the second form, and switch the first operation object from the first form to the second form; a second switching unit, used to respond to a first selection instruction of the first operation object, and switch the first operation object from the first form to the second form based on the first selection instruction, wherein the first selection instruction is used to select identification information of the second form in the preset form list; a third switching unit, used to detect a second selection instruction of the first operation object in the virtual scene, determine the form of the scene object selected by the second selection instruction as the second form, and switch the first operation object from the first form to the second form.
[0021] Optionally, the first switching unit includes one of the following: a first switching sub-unit, used to respond to a switching instruction of the first operation object before the switching duration ends, and randomly assign a form in a preset form library as the second form; a second switching sub-unit, used to generate a switching instruction after the switching duration ends, and randomly assign a form in a preset form library as the second form.
[0022] Optionally, the device also includes: a display module, which is used for responding to a move instruction for the second operation object within a first time after the selection module selects the first object set and the second object set according to the scene information of the virtual scene, and moving the second operation object to a specified position in the virtual map, and displaying scene elements around the specified position in the virtual scene; a first control module, which controls the second operation object to be in a stationary state and the first operation object to be in a movable state within a second time after the first time, wherein the first operation object can trigger the hiding instruction in the movable state; and a second control module, which controls the second operation object to be in a movable state within a third time after the second time, wherein the second operation object can trigger the detection instruction in the movable state.
[0023] Optionally, the device also includes: a statistical module, used to count the number of objects of the designated first operation object within a preset time after the first switching module adds the first operation object in the second form to the virtual scene, wherein the designated first operation object is the first operation object whose current form is the third form; an allocation module, used to allocate the first virtual resource to the second operation object if the number of objects is equal to the first number; and allocate the second virtual resource to the first operation object if the number of objects is less than the first number.
[0024] Optionally, the device also includes: a receiving module, used to receive in-site information uploaded by any first operation object in the first private channel after the first switching module adds the first operation object in the second form to the virtual scene; a publishing module, used to publish the in-site message to the public channel of the virtual scene after the first number of first operation objects have reviewed and agreed, wherein all the first operation objects and the second operation objects can receive the in-site message through the public channel.
[0025] Optionally, the second switching module includes: a first calculation unit, used to calculate the time interval between the current time and the preset end time; a generation unit, used to generate a cycle duration of a detection cycle based on the time interval, wherein the cycle duration is positively correlated with the time interval; and a detection unit, used to detect the detection instruction of the second operation object in the virtual scene according to the cycle duration.
[0026] Optionally, the second switching module includes: a first allocation unit, used to allocate a third number of detection times for the second operation object; a first detection unit, used to start from the third number, and if a detection instruction of the second operation object in the virtual scene is detected, reduce the current number of detection times by 1 until the current number of detection times is 0.
[0027] Optionally, the second switching module includes: a second allocation unit, used to allocate the first activation cycle of the detection instruction to the second operation object; a second detection unit, used to continue detecting the detection instruction of the second operation object in the virtual scene after the corresponding duration of the first activation cycle has passed, until a preset termination time if the detection instruction of the second operation object in the virtual scene is detected.
[0028] Optionally, the second switching module includes: a second calculation unit, used to calculate the time interval between the current time and the preset end time; a third allocation unit, used to allocate a fourth number of detection times to the second operation object or allocate a second activation period of the detection instruction to the second operation object when the time interval is less than a preset duration; and a third detection unit, used to detect the detection instruction of the second operation object in the virtual scene based on the detection times and / or the second activation period.
[0029] Optionally, the second switching module includes: an activation unit, used to activate the detection function of the second operation object, wherein the detection function is used to trigger a detection instruction through an external operation; an acquisition unit, used to detect the detection instruction of the second operation object and acquire the detection object pointed to by the detection instruction; a judgment unit, used to judge whether the detection object is the first operation object; and a switching unit, used to switch the first operation object from the second form to the third form if the detection object is the first operation object.
[0030] According to yet another embodiment of the present invention, a storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when running.
[0031] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0032] Through the present invention, a first object set and a second object set are selected according to scene information of a virtual scene, and in response to a hidden instruction for a first operation object, the first operation object is switched from a first form to a second form, and the first operation object is added to the virtual scene in the second form, a detection instruction for the second operation object in the virtual scene is detected, and according to the detection result, the first operation object is switched from the second form to a third form. By switching the form of the virtual object through the hidden instruction and the detection instruction, the technical problem of being unable to switch the form of the virtual object in the related art is solved, and flexible switching of the form of the virtual object in the virtual scene is achieved, thereby improving the degree of anthropomorphism and authenticity of the virtual scene. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0034] Figure 1It is a hardware structure block diagram of a switching computer in an object form according to an embodiment of the present invention;
[0035] Figure 2 is a flow chart of a method for switching object forms according to an embodiment of the present invention;
[0036] Figure 3 is a schematic diagram of a game scene according to an embodiment of the present invention;
[0037] Figure 4 is a structural block diagram of an object-shaped switching device according to an embodiment of the present invention;
[0038] Figure 5 It is a structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0041] Example 1
[0042] The method embodiment provided in the first embodiment of the present application can be executed in a mobile phone, tablet, server, computer or similar electronic terminal. Taking running on a computer as an example, Figure 1 FIG. 1 is a hardware structure diagram of a switching computer in an object form according to an embodiment of the present invention. Figure 1 As shown, the computer 10 may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the computer may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0043] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a switching method of an object form in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a 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 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. In this embodiment, the processor 104 is used to respond to human-computer interaction instructions and game strategies, and control the target virtual character to perform specified operations to complete the game task. The memory 104 is used to store program scripts, configuration information, attribute information of virtual characters, etc. of electronic games.
[0044] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0045] Optionally, the input-output device 108 further includes a human-computer interaction screen for obtaining human-computer interaction instructions through a human-computer interaction interface, and for presenting a game screen in a game scene;
[0046] In this embodiment, a method for switching object forms is provided. Figure 2is a flow chart of a method for switching object forms according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0047] Step S202, selecting a first object set and a second object set according to scene information of the virtual scene, wherein the first object set and the second object set respectively include a first number of first operation objects and a second number of second operation objects;
[0048] In this embodiment, the virtual scene can be a virtual game scene, a virtual teaching scene, or a virtual demonstration scene. The virtual scene includes at least two object sets. The operation objects in the object set can be controlled by the user's interactive instructions or by the computer's control logic. The number of operation objects in the object set is determined according to the scene type, the scope of the scene map, the scene mode, etc. This embodiment is described by taking the virtual scene as a virtual game scene as an example. In a game scene, the first object set and the second object set form two camps, which are hostile to each other. The first operation object and the second operation object are player characters (PCC, Player-Controlled Character) controlled by the main control player in the virtual game.
[0049] Step S204, in response to the hiding instruction for the first operation object, switching the first operation object from the first form to the second form, and adding the first operation object in the second form to the virtual scene;
[0050] The form in this embodiment is the elemental expression form of the operation object in the virtual scene, including UI components, logical components, etc. Taking the character form in the virtual game scene as an example, the character form in this embodiment includes the shape, appearance, color and other UI attributes of the PCC in the game scene. Different character forms correspond to different rendering models. For example, the tortoise and the rabbit are different character forms. The first operation object can disguise the character with the first character form as another character / object (the second character form) by switching the object form, and then hide it in place, or hide it in a designated position in the game scene.
[0051] Step S206, detecting a detection instruction of the second operation object in the virtual scene, and switching the first operation object from the second form to the third form according to the detection result, wherein the detection instruction is used to detect whether the detection object is the first operation object;
[0052] The second operation object triggers the detection instruction by clicking on the character / object in the game scene (which may or may not be disguised by the first operation object). The system determines whether the currently clicked character / object is disguised by the first operation object. If so, the clicked first operation object is switched from the second character form to the third character form. If not, it will not be switched.
[0053] Through the above steps, the first object set and the second object set are selected according to the scene information of the virtual scene, the first operation object is switched from the first form to the second form in response to the hidden instruction for the first operation object, and the first operation object is added to the virtual scene in the second form, the detection instruction of the second operation object in the virtual scene is detected, and the first operation object is switched from the second form to the third form according to the detection result. The form of the virtual object is switched by the hidden instruction and the detection instruction, which solves the technical problem of the inability to switch the form of the virtual object in the related technology, realizes the flexible switching of the form of the virtual object in the virtual scene, and improves the degree of anthropomorphism and authenticity of the virtual scene.
[0054] It should be noted that the third form of this embodiment can be other forms different from the first form and the second form, or it can be the first form, that is, the detection operation will cause the form of the first operation object to change, but the present invention does not limit the specific form after the change.
[0055] In one implementation of the present embodiment, before switching the first operation object from the first form to the second form, it also includes: switching the first operation object from the first preset form to the first form, and switching the second operation object from the second preset form to the third form, wherein the first preset form and the second preset form respectively correspond to the initial forms of the first operation object and the second operation object in the virtual scene.
[0056] In this embodiment, each first operation object includes three forms in the game scene, namely, a first preset form, a first form, and a second form, and each second operation object includes two forms, namely, a second preset form and a third form, wherein the first preset form and the second preset form are respectively the following forms of the operation object in the system, such as the form of PCC in the game scene in the big world scene, the first character form and the third character form are respectively the camp forms of the first camp and the second camp, and in each camp, the camp forms of multiple operation objects are the same. Since the first camp and the second camp are hostile camps, their respective forms can be set to combinations of cats and mice, eagles and chickens, etc., to increase the recognition of the characters of each party in the game scene and increase the fun of the game.
[0057] In this embodiment, when the first operation object is switched to the second state, it can be switched in a variety of optional ways. Switching the first operation object from the first state to the second state can be, but is not limited to:
[0058] Example 1: randomly assign a shape in the preset shape library as the second shape, and switch the first operation object from the first shape to the second shape;
[0059] In this example, the second form can be randomly acquired by the first operation object itself or assigned by the system. Randomly assigning a form in the preset form library as the second form includes one of the following: before the switching duration ends, responding to the switching instruction of the first operation object, randomly assigning a form in the preset form library as the second form; after the switching duration ends, generating a switching instruction, and randomly assigning a form in the preset form library as the second form.
[0060] Example 2: In response to a first selection instruction of a first operation object, the first operation object is switched from a first form to a second form based on the first selection instruction, wherein the first selection instruction is used to select identification information of the second form in a preset form list;
[0061] In the virtual scene, the preset form list is a preset character form library, which includes multiple character forms, wherein the character forms may be character forms of scene elements in the game scene, or may not be character forms of scene elements in the game scene, such as boxes, wine tables, lanterns, big trees, NPCs, etc. Through random allocation by the system and selection by the user, the first operation object is switched from the first character form to the second character form.
[0062] Example 3: Detecting a second selection instruction of the first operation object in the virtual scene, determining the form of the scene object selected by the second selection instruction as the second form, and switching the first operation object from the first form to the second form.
[0063] In this example, the second character form to be switched belongs to a scene object in the game scene, such as a building, NPC, kettle, etc. in the game scene. The first operation object selects a scene object in the game scene through the second selection instruction. The system copies the form of the scene object and renders it again in the game scene, determining it as the second character form of the first operation object.
[0064] In some other implementations based on Example 3, after selecting the first object set and the second object set according to the scene information of the virtual scene, the scene object is deleted in the virtual scene, or the scene object is replaced in the game scene using the first operation object, so as to ensure the integrity of the game scene and integrate the player and the game scene. At the same time, by using the form of the existing scene object in the game scene, the rendering data of the scene object can be directly copied without regenerating new rendering data, which can reduce the switching time of the object form.
[0065] In the process of switching the character form, the present embodiment controls the states of the operation objects of each party according to the process time of the virtual task, such as controlling the states of the operation objects of each party according to the process time of the game task, and after selecting the first object set and the second object set according to the scene information of the virtual scene, further includes:
[0066] S11, responding to a movement instruction for the second operation object within a first time, moving the second operation object to a designated position in the virtual map, and displaying scene elements around the designated position in the virtual scene;
[0067] The first time is the patrol time of the second operation object. During this time, the second operation object can patrol various existing scene elements in the virtual map where the virtual scene is located by outputting movement instructions, including non-interactive elements (landscapes, items, etc.) and interactive elements (such as NPCs). The entire scene elements in the virtual scene can be displayed at once (enlarging the scene elements at the designated position where the second operation object is moved), or displayed step by step as the virtual map is expanded.
[0068] S12, within a second time after the first time, controlling the second operation object to be in a stationary state and controlling the first operation object to be in a movable state, wherein the first operation object can trigger a hidden instruction in the movable state;
[0069] Within the second time, the second operation object completes its patrol, the first operation object moves within the game scene, selects the second character form and hiding position to be switched, and outputs a hiding instruction. The system detects the hiding instruction and adds the first operation object to the game scene to achieve the hiding effect.
[0070] S13, within a third time after the second time, controlling the second operation object to be in a movable state, wherein the second operation object can trigger a detection instruction in the movable state.
[0071] Within the third time, the first operation object is hidden, the second operation object moves in the game scene, the first operation object is controlled to be still or the moving speed is lower than the moving speed of the second operation object, triggering the detection instruction to find the first operation object hidden in the game scene.
[0072] Figure 3 It is a schematic diagram of a game scene of an embodiment of the present invention. The first camp and the second camp each include three operation objects, namely a first character and a second character. The second character moves in the game scene, and the first character is hidden in the game scene, respectively in the form of a fence, a coconut tree, and a sea stone.
[0073] In this embodiment, the above process can be implemented by a state machine, with time being used as a trigger condition of the state machine, and corresponding states are set for the first operation object or the second operation object at different times.
[0074] In the implementation scenario of this embodiment, after the game starts, two teams of players are matched (each team can be 3 or 5 people, etc.), namely the mouse team in the first camp and the cat team in the second camp. Their main control characters transform into cats and mice (first character form and third character form) according to their camps respectively. The cat team starts to patrol the field, showing the original scenery and furnishings in the game scene, etc. After the search time is over, the cat team players return to the starting position and the mouse team players start to hide. The mouse team players can switch to the form of any props (such as boxes, wine tables, lanterns, big trees), NPCs, etc., and then choose to place them at a certain position in the game scene. The transformation of the mouse team players can be randomly recommended by the system, or selected by the players in the recommendation list, or the players can choose to copy existing items in a certain scene in the game scene, etc. After the transformation is completed, disguised items are added to the original scene. During the hiding period, the cat team players are controlled not to leave the original place , after the hiding time is over, the cat team players enter the game scene and start looking for the transformation of the rat team. During this period, the rat team players are fixed in place and cannot move, or move slowly in the game scene at a low speed (the movement speed is much lower than the cat's movement speed). The cat team players are visible during the movement. If the cat team players find that an item is suspicious, it may be disguised by the rat team. They can click on the detection to trigger the detection command, such as by releasing skills to trigger the detection command, etc. If so, the rat team player is found. Each cat team player is allocated a number of detection opportunities. If a cat team player's detection opportunity is used up, he cannot continue to detect, but can continue to move in the scene or return to the starting position. If the detection opportunities of the entire team are used up and the rat team players have not been found, the rat team is judged to be the winner. If the game time is over and the rat team players have not been found, the rat team is also judged to be the winner. The cat team players can only win if they find all the rat team players within the game time.
[0075] In one implementation of the present embodiment, detecting the detection instruction of the second operation object in the virtual scene includes: calculating the time interval between the current time and the preset end time; generating a cycle duration of the detection cycle based on the time interval, wherein the cycle duration is positively correlated with the time interval; and detecting the detection instruction of the second operation object in the virtual scene according to the cycle duration.
[0076] In one instance, there is no limit on the number of times the second operating object clicks the detection instruction in the virtual scene. The starting detection cycle is T0, and the current detection cycle T = T0-n / t, where t is the time interval and n is the adjustment coefficient, which is a constant. As the virtual task proceeds, the time interval becomes smaller and smaller, and the detection cycle also becomes smaller and smaller. More detection instructions can be detected in the same time.
[0077] In another implementation of this embodiment, a certain number of detection times is allocated to the second operation object in the game task. In the last period of the game task, the available detection opportunities of the second camp can be magnified multiple times, or there are unlimited detection opportunities. For example, the game task time is 3 minutes, and each second operation object is allocated 10 detection opportunities (that is, 10 detection instructions can be triggered). In the last 30 seconds, there are 2 detection opportunities left for a second operation object. After being magnified 5 times, 10 detection opportunities are obtained. The cooling time of the detection skill can also be set according to the moving distance of the second operation object. The shorter the moving distance of the second operation object, the shorter the cooling time, and vice versa, so as to balance the fairness and playability of the game.
[0078] In some implementations of this embodiment, a fixed number of detection times or a fixed detection cycle may be set for the second operation object, or additional detection opportunities may be added in the last period of time, as described below:
[0079] In one example, detecting a detection instruction for a second operation object in a virtual scene includes: allocating a third number of detection times for the second operation object; starting from the third number, if a detection instruction for the second operation object in the virtual scene is detected, subtracting the current number of detection times by 1 until the current number of detection times is 0.
[0080] In one example, detecting a detection instruction of a second operation object in a virtual scene includes: assigning a first activation cycle of the detection instruction to the second operation object; if a detection instruction of the second operation object in the virtual scene is detected, after a corresponding duration of the first activation cycle, continuing to detect the detection instruction of the second operation object in the virtual scene until a preset termination time.
[0081] In one example, detecting a detection instruction for a second operation object in a virtual scene includes: calculating a time interval between a current time and a preset end time; when the time interval is less than a preset duration, allocating a fourth number of detection times to the second operation object or allocating a second activation period of the detection instruction to the second operation object; and detecting the detection instruction for the second operation object in the virtual scene based on the detection times and / or the second activation period.
[0082] In this embodiment, detecting a detection instruction of a second operation object in a virtual scene, and switching the first operation object from the second form to the third form according to the detection result includes: activating a detection function of the second operation object, wherein the detection function is used to trigger the detection instruction through an external device operation; detecting the detection instruction of the second operation object, and obtaining the detection object pointed to by the detection instruction; determining whether the detection object is the first operation object; if the detection object is the first operation object, switching the first operation object from the second form to the third form.
[0083] Optionally, the third form is the same as the first form. Of course, the third form may also be an identification form, used to indicate that the corresponding first operation object has been identified and is no longer in a hidden state, such as adding a label based on the second form.
[0084] In one implementation of the present embodiment, after the first operation object is added to the virtual scene in the second form, it also includes: within a preset time, counting the number of objects designated as the first operation object, wherein the designated first operation object is the first operation object whose current form is the third form; if the number of objects is equal to the first number, allocating the first virtual resource to the second operation object; if the number of objects is less than the first number, allocating the second virtual resource to the first operation object.
[0085] When settling virtual resources such as gold coins and points in game tasks, this embodiment includes two categories. One category is game resources for team rewards. The winning party (the first camp and the second camp) obtains team rewards, which are the same for each team member. The other category is game resources for individual rewards, which correspond to the game contribution of each team member. For example, among the operation objects of the second camp, the more first operation objects are found, the more individual rewards are obtained; the faster the first operation objects are found, the more rewards are obtained; and among the operation objects of the first camp, the longer they are hidden, the more individual rewards are obtained.
[0086] In one implementation of the present embodiment, after the first operation object is added in the virtual scene in the second form, it also includes: receiving in-site information uploaded by any first operation object on the first private channel; after a first number of first operation objects have reviewed and agreed, publishing the in-site message to the public channel of the virtual scene, wherein all first operation objects and second operation objects can receive the in-site message through the public channel.
[0087] During the game task of searching for the first camp in the second object set, the operating object of each team can post messages in the private channel of the team to notify teammates and communicate available clues. They can also post messages in the whole channel. In order to prevent team members from passively defecting, messages posted by non-captains in the whole channel need to be agreed by all members or the captain before they can be posted to the whole channel. If a player ends the game midway (the first operating object is found or the detection opportunity of the second operating object is used up), he will be banned.
[0088] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0089] Example 2
[0090] In this embodiment, a switching device in the form of an object is also provided to implement the above-mentioned embodiments and preferred implementation modes, which have been described and will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0091] Figure 4 is a structural block diagram of a switching device in an object form according to an embodiment of the present invention, such as Figure 4 As shown, the device includes: a selection module 40, a first switching module 42, and a second switching module 44, wherein:
[0092] A selection module 40, configured to select a first object set and a second object set according to scene information of a virtual scene, wherein the first object set and the second object set respectively include a first number of first operation objects and a second number of second operation objects;
[0093] A first switching module 42, configured to respond to a hiding instruction for the first operation object, switch the first operation object from a first form to a second form, and add the first operation object in the second form to the virtual scene;
[0094] The second switching module 44 is used to detect a detection instruction of the second operating object in the virtual scene, and switch the first operating object from the second form to the third form according to the detection result, wherein the detection instruction is used to detect whether the detection object is the first operating object.
[0095] Optionally, the device also includes: a third switching module, used to switch the first operation object from a first preset form to the first form, and switch the second operation object from a second preset form to a third form before the first switching module switches the first operation object from the first character form to the second character form, wherein the first preset form and the second preset form respectively correspond to the initial forms of the first operation object and the second operation object in the virtual scene.
[0096] Optionally, the first switching module includes one of the following: a first switching unit, used to randomly assign a form in a preset form library as the second form, and switch the first operation object from the first form to the second form; a second switching unit, used to respond to a first selection instruction of the first operation object, and switch the first operation object from the first form to the second form based on the first selection instruction, wherein the first selection instruction is used to select identification information of the second form in the preset form list; a third switching unit, used to detect a second selection instruction of the first operation object in the virtual scene, determine the form of the scene object selected by the second selection instruction as the second form, and switch the first operation object from the first form to the second form.
[0097] Optionally, the first switching unit includes one of the following: a first switching sub-unit, used to respond to a switching instruction of the first operation object before the switching duration ends, and randomly assign a form in a preset form library as the second form; a second switching sub-unit, used to generate a switching instruction after the switching duration ends, and randomly assign a form in a preset form library as the second form.
[0098] Optionally, the device also includes: a display module, which is used for responding to a move instruction for the second operation object within a first time after the selection module selects the first object set and the second object set according to the scene information of the virtual scene, and moving the second operation object to a specified position in the virtual map, and displaying scene elements around the specified position in the virtual scene; a first control module, which controls the second operation object to be in a stationary state and the first operation object to be in a movable state within a second time after the first time, wherein the first operation object can trigger the hiding instruction in the movable state; and a second control module, which controls the second operation object to be in a movable state within a third time after the second time, wherein the second operation object can trigger the detection instruction in the movable state.
[0099] Optionally, the device also includes: a statistical module, used to count the number of objects of the designated first operation object within a preset time after the first switching module adds the first operation object in the second form to the virtual scene, wherein the designated first operation object is the first operation object whose current form is the third form; an allocation module, used to allocate the first virtual resource to the second operation object if the number of objects is equal to the first number; and allocate the second virtual resource to the first operation object if the number of objects is less than the first number.
[0100] Optionally, the device also includes: a receiving module, used to receive in-site information uploaded by any first operation object in the first private channel after the first switching module adds the first operation object in the second form to the virtual scene; a publishing module, used to publish the in-site message to the public channel of the virtual scene after the first number of first operation objects have reviewed and agreed, wherein all the first operation objects and the second operation objects can receive the in-site message through the public channel.
[0101] Optionally, the second switching module includes: a first calculation unit, used to calculate the time interval between the current time and the preset end time; a generation unit, used to generate a cycle duration of a detection cycle based on the time interval, wherein the cycle duration is positively correlated with the time interval; and a detection unit, used to detect the detection instruction of the second operation object in the virtual scene according to the cycle duration.
[0102] Optionally, the second switching module includes: a first allocation unit, used to allocate a third number of detection times for the second operation object; a first detection unit, used to start from the third number, and if a detection instruction of the second operation object in the virtual scene is detected, reduce the current number of detection times by 1 until the current number of detection times is 0.
[0103] Optionally, the second switching module includes: a second allocation unit, used to allocate the first activation cycle of the detection instruction to the second operation object; a second detection unit, used to continue detecting the detection instruction of the second operation object in the virtual scene after the corresponding duration of the first activation cycle has passed, until a preset termination time if the detection instruction of the second operation object in the virtual scene is detected.
[0104] Optionally, the second switching module includes: a second calculation unit, used to calculate the time interval between the current time and the preset end time; a third allocation unit, used to allocate a fourth number of detection times to the second operation object or allocate a second activation period of the detection instruction to the second operation object when the time interval is less than a preset duration; and a third detection unit, used to detect the detection instruction of the second operation object in the virtual scene based on the detection times and / or the second activation period.
[0105] Optionally, the second switching module includes: an activation unit, used to activate the detection function of the second operation object, wherein the detection function is used to trigger a detection instruction through an external operation; an acquisition unit, used to detect the detection instruction of the second operation object and acquire the detection object pointed to by the detection instruction; a judgment unit, used to judge whether the detection object is the first operation object; and a switching unit, used to switch the first operation object from the second form to the third form if the detection object is the first operation object.
[0106] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0107] Example 3
[0108] The present application also provides an electronic device, Figure 5 is a structural diagram of an electronic device according to an embodiment of the present invention, such as Figure 5 As shown, it includes a processor 51, a communication interface 52, a memory 53 and a communication bus 54, wherein the processor 51, the communication interface 52, and the memory 53 communicate with each other through the communication bus 54, and the memory 53 is used to store computer programs;
[0109] The processor 51 is used to execute the program stored in the memory 53, and implements the following steps: selecting a first object set and a second object set according to scene information of a virtual scene, wherein the first object set and the second object set respectively include a first number of first operation objects and a second number of second operation objects; in response to a hiding instruction for the first operation object, switching the first operation object from a first form to a second form, and adding the first operation object in the second form to the virtual scene; detecting a detection instruction for the second operation object in the virtual scene, and switching the first operation object from the second form to the third form according to the detection result, wherein the detection instruction is used to detect whether the detection object is the first operation object.
[0110] Optionally, before switching the first operation object from a first form to a second form, the method further includes: switching the first operation object from a first preset form to the first form, and switching the second operation object from a second preset form to a third form, wherein the first preset form and the second preset form respectively correspond to the initial forms of the first operation object and the second operation object in the virtual scene.
[0111] Optionally, switching the first operation object from a first form to a second form includes one of the following: randomly assigning a form in a preset form library as the second form, and switching the first operation object from the first form to the second form; responding to a first selection instruction of the first operation object, and switching the first operation object from the first form to the second form based on the first selection instruction, wherein the first selection instruction is used to select identification information of the second form in a preset form list; detecting a second selection instruction of the first operation object in the virtual scene, determining the form of the scene object selected by the second selection instruction as the second form, and switching the first operation object from the first form to the second form.
[0112] Optionally, randomly allocating a form in the preset form library as the second form includes one of the following: before the switching duration ends, responding to a switching instruction of the first operation object, and randomly allocating a form in the preset form library as the second form; after the switching duration ends, generating a switching instruction, and randomly allocating a form in the preset form library as the second form.
[0113] Optionally, after selecting the first object set and the second object set according to scene information of the virtual scene, the method further includes: within a first time, responding to a move instruction for the second operation object, moving the second operation object to a specified position in the virtual map, and displaying scene elements around the specified position in the virtual scene; within a second time after the first time, controlling the second operation object to be in a stationary state, and controlling the first operation object to be in a movable state, wherein the first operation object can trigger the hiding instruction in the movable state; within a third time after the second time, controlling the second operation object to be in a movable state, wherein the second operation object can trigger the detection instruction in the movable state.
[0114] Optionally, after adding the first operation object in the second form to the virtual scene, the method further includes: counting the number of objects designated as the first operation object within a preset time, wherein the designated first operation object is the first operation object whose current form is the third form; if the number of objects is equal to the first number, allocating the first virtual resource to the second operation object; if the number of objects is less than the first number, allocating the second virtual resource to the first operation object.
[0115] Optionally, after adding the first operation object in the second form to the virtual scene, the method further includes: receiving in-site information uploaded by any first operation object on a first private channel; after the first number of first operation objects have reviewed and agreed, publishing the in-site message to the public channel of the virtual scene, wherein all the first operation objects and the second operation objects can receive the in-site message through the public channel.
[0116] Optionally, detecting the detection instruction of the second operation object in the virtual scene includes: calculating the time interval between the current time and the preset end time; generating a cycle duration of the detection cycle based on the time interval, wherein the cycle duration is positively correlated with the time interval; and detecting the detection instruction of the second operation object in the virtual scene according to the cycle duration.
[0117] Optionally, detecting the detection instruction of the second operation object in the virtual scene includes: allocating a third number of detection times for the second operation object; starting from the third number, if a detection instruction of the second operation object in the virtual scene is detected, subtracting the current number of detection times by 1 until the current number of detection times is 0.
[0118] Optionally, detecting the detection instruction of the second operation object in the virtual scene includes: allocating a first activation cycle of the detection instruction to the second operation object; if the detection instruction of the second operation object in the virtual scene is detected, after a corresponding duration of the first activation cycle, continuing to detect the detection instruction of the second operation object in the virtual scene until a preset termination time.
[0119] Optionally, detecting the detection instruction of the second operation object in the virtual scene includes: calculating the time interval between the current time and the preset end time; when the time interval is less than a preset duration, allocating a fourth number of detection times to the second operation object or allocating a second activation period of the detection instruction to the second operation object; and detecting the detection instruction of the second operation object in the virtual scene based on the detection times and / or the second activation period.
[0120] Optionally, detecting a detection instruction of the second operation object in the virtual scene, and switching the first operation object from the second form to the third form according to the detection result includes: activating a detection function of the second operation object, wherein the detection function is used to trigger a detection instruction through an external device operation; detecting the detection instruction of the second operation object, and obtaining a detection object pointed to by the detection instruction; determining whether the detection object is the first operation object; if the detection object is the first operation object, switching the first operation object from the second form to the third form.
[0121] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0122] The communication interface is used for communication between the above terminal and other devices.
[0123] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0124] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0125] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is executed on a computer, the computer executes the object form switching method described in any one of the above embodiments.
[0126] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the object form switching method described in any one of the above embodiments.
[0127] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0128] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0129] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0130] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0131] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0132] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0133] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0134] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for switching object form, characterized in that: include: Selecting a first object set and a second object set according to scene information of the virtual scene, wherein the first object set and the second object set respectively include a first number of first operation objects and a second number of second operation objects; In response to a hiding instruction for the first operation object, switching the first operation object from a first form to a second form, and adding the first operation object in the second form to the virtual scene; Detecting a detection instruction of the second operation object in the virtual scene, and switching the first operation object from the second form to a third form according to the detection result, wherein the detection instruction is used to detect whether the detection object is the first operation object; Wherein, after selecting the first object set and the second object set according to the scene information of the virtual scene, the method further comprises: within a first time, responding to a moving instruction for the second operating object, moving the second operating object to a specified position in the virtual map, and displaying scene elements around the specified position in the virtual scene; within a second time after the first time, controlling the second operating object to be in a stationary state and controlling the first operating object to be in a movable state, wherein the first operating object can trigger the hiding instruction in the movable state; within a third time after the second time, controlling the second operating object to be in a movable state, wherein the second operating object can trigger the detection instruction in the movable state; Before switching the first operation object from the first form to the second form, the second operation object is switched from the second preset form to the third form, wherein the second preset form is a following form of the second operation object in the system, and the second form and the third form are a combination form.
2. The method according to claim 1, characterized in that Before switching the first operation object from the first form to the second form, the method further includes: The first operation object is switched from a first preset form to the first form, and the second operation object is switched from a second preset form to a third form, wherein the first preset form and the second preset form respectively correspond to the initial forms of the first operation object and the second operation object in the virtual scene.
3. The method according to claim 1, characterized in that Switching the first operation object from the first state to the second state includes one of the following: Randomly assigning a shape in a preset shape library as the second shape, and switching the first operation object from the first shape to the second shape; In response to a first selection instruction of the first operation object, switching the first operation object from a first form to a second form based on the first selection instruction, wherein the first selection instruction is used to select identification information of the second form in a preset form list; A second selection instruction of the first operation object in the virtual scene is detected, the form of the scene object selected by the second selection instruction is determined as the second form, and the first operation object is switched from the first form to the second form.
4. The method according to claim 3, characterized in that: Randomly assigning a pattern in the preset pattern library as the second pattern includes one of the following: Before the switching time expires, in response to the switching instruction of the first operation object, a form is randomly assigned in a preset form library as the second form; After the switching time is over, a switching instruction is generated, and a form is randomly assigned in the preset form library as the second form.
5. The method according to claim 1, characterized in that After selecting the first object set and the second object set according to the scene information of the virtual scene, the method further includes: In a first time, responding to a movement instruction for the second operation object, the second operation object is moved to a designated position in the virtual map, and scene elements around the designated position are displayed in the virtual scene; Within a second time after the first time, controlling the second operation object to be in a stationary state and controlling the first operation object to be in a movable state, wherein the first operation object can trigger the hiding instruction in the movable state; Within a third time after the second time, the second operation object is controlled to be in a movable state, wherein the second operation object can trigger the detection instruction in the movable state.
6. The method according to claim 1, characterized in that After adding the first operation object in the second form to the virtual scene, the method further includes: Receiving, in a first private channel, in-site information uploaded by any one of the first operation objects; After the first number of first operation objects have all reviewed and agreed, the in-site message is published to the public channel of the virtual scene, wherein all the first operation objects and the second operation objects can receive the in-site message through the public channel.
7. The method according to claim 1, characterized in that The detection instruction for detecting the second operation object in the virtual scene includes: Calculate the time interval between the current time and the preset end time; Generating a cycle duration of a detection cycle based on the time interval, wherein the cycle duration is positively correlated with the time interval; The detection instruction of the second operation object in the virtual scene is detected according to the cycle duration.
8. The method according to claim 1, characterized in that The detection instruction for detecting the second operation object in the virtual scene includes: Allocating a third number of detection times to the second operation object; Starting from the third number, if a detection instruction of the second operation object in the virtual scene is detected, the current number of detection times is reduced by 1 until the current number of detection times is 0.
9. The method according to claim 1, characterized in that: The detection instruction for detecting the second operation object in the virtual scene includes: allocating a first activation period of the detection instruction to the second operation object; If a detection instruction of the second operating object in the virtual scene is detected, after a corresponding duration of the first activation cycle has elapsed, the detection instruction of the second operating object in the virtual scene continues to be detected until a preset termination time.
10. The method according to claim 1, characterized in that The detection instruction for detecting the second operation object in the virtual scene includes: Calculate the time interval between the current time and the preset end time; When the time interval is less than a preset duration, allocating a fourth number of detection times to the second operation object or allocating a second activation period of the detection instruction to the second operation object; A detection instruction of the second operating object in the virtual scene is detected based on the detection number and / or the second activation period.
11. The method according to claim 1, characterized in that: Detecting a detection instruction of the second operation object in the virtual scene, and switching the first operation object from the second form to the third form according to the detection result includes: activating a detection function of the second operation object, wherein the detection function is used to trigger a detection instruction through an external device operation; Detecting a detection instruction of the second operation object, and acquiring a detection object pointed to by the detection instruction; Determining whether the detection object is the first operation object; If the detection object is a first operation object, the first operation object is switched from the second form to the third form.
12. A device for switching an object form, characterized in that: include: A selection module, configured to select a first object set and a second object set according to scene information of a virtual scene, wherein the first object set and the second object set respectively include a first number of first operation objects and a second number of second operation objects; A first switching module, configured to respond to a hiding instruction for the first operation object, switch the first operation object from a first form to a second form, and add the first operation object in the second form to the virtual scene; a second switching module, configured to detect a detection instruction of the second operating object in the virtual scene, and switch the first operating object from the second form to a third form according to the detection result, wherein the detection instruction is used to detect whether the detection object is the first operating object; The device further comprises: a display module, which is used for, after the selection module selects the first object set and the second object set according to the scene information of the virtual scene, to respond to the movement instruction for the second operation object within a first time, to move the second operation object to a specified position in the virtual map, and to display the scene elements around the specified position in the virtual scene; a first control module, which controls the second operation object to be in a stationary state and controls the first operation object to be in a movable state within a second time after the first time, wherein the first operation object can trigger the hiding instruction in the movable state; a second control module, which controls the second operation object to be in a movable state within a third time after the second time, wherein the second operation object can trigger the detection instruction in the movable state; The device is also used to switch the second operation object from a second preset form to a third form before switching the first operation object from a first form to a second form, wherein the second preset form is a following form of the second operation object in the system, and the second form and the third form are a combined form.
13. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 11 when executed.
14. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Role conversion method and device, computer equipment and storage medium
CN111359211A