#(zen9967) Spawn fake npc

76 messages · Page 1 of 1 (latest)

pulsar stoneBOT
#

(zen9967) Spawn fake npc

#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

sick swan
#

?block

#

!e fake npc

bronze cragBOT
#
Possible Confusion

Did you mean to search for sentinel npc has no more targets?

sick swan
#

!e region break

bronze cragBOT
#
Possible Confusion

Did you mean to search for player uses recipe book?

sick swan
#

!e in region

bronze cragBOT
#
Possible Confusion

Did you mean to search for gamerule changes in world?

sick swan
#

!e in_region

bronze cragBOT
# sick swan !e in_region
Cannot Specify Searched Event

Multiple possible events: block grows, item merges, item spawns, command, block burns, block forms, horse jumps, item despawns, world loads, block fades, block falls, leaves decay, piston extends, piston retracts, entity breeds, entity tamed, item enchanted, vehicle moves, world saves, block explodes, ...

sick swan
#

!debug

bronze cragBOT
# sick swan !debug
Info: debug

If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!

noble laurel
#

!c create

bronze cragBOT
# noble laurel !c create
Required Plugins or Platforms

Citizens

Group

npc

Syntax

create [<entity>] [<name>] (<location>) (traits:<trait>|...) (registry:<name>)

Short Description

Creates a new NPC, and optionally spawns it at a location.

Description

Creates an npc which the entity type specified, or specify an existing npc to create a copy.
If no location is specified the npc is created despawned.
Use the 'save:<savename>' argument to return the npc for later use in a script.

Optionally specify a list of traits to immediately apply when creating the NPC.

Optionally specify a custom registry to create the NPC into. (Most users, leave this option off).
Will generate a new registry if needed.

noble laurel
#

!m hide_from_players

bronze cragBOT
noble laurel
#

!m PlayerTag.show

bronze cragBOT
# noble laurel !m PlayerTag.show
Cannot Specify Searched Mechanism

Multiple possible mechanisms: PlayerTag.show_demo, PlayerTag.show_book, PlayerTag.show_entity, PlayerTag.show_workbench, PlayerTag.show_endcredits.

noble laurel
#

!m show_entity

bronze cragBOT
noble laurel
#

Create an NPC, hide it globally, show it to the specific player

sick swan
#

im planning to create npc everytime player doing a heist and its a solo heist

#

i wonder if it will generate as much as npc

#

when multiple players are having a heist

noble laurel
#

You'd create an NPC for each player

sick swan
#

how do you create npc for each player? and its only be seen one player.

I am trying to make a main quest where they can only do the quest as a single mode.

noble laurel
# noble laurel !c create

^ I already pulled up the information for you - create to create an NPC, then the mechanisms to hide it and show it to the specific player

#

If you're having trouble with any specific part feel free to ask

sick swan
# noble laurel ^ I already pulled up the information for you - `create` to create an NPC, then ...

thank you for this, but how can i make it like each player and npc has its own npc flags? because for example when the player is near to complete quest and the other one has just started.

They are going to have different sceario

player 1 has nearly completed
player 2 has just started yet

NPC 1 is walking towards completion
NPC 2 juts spawned near player 2 and will walk

both npc has animation like walking

noble laurel
#

Would need some more information on what is the quest to give a specific response, but if you want to store per-player information you can flag the player - each player will have their own flags storing their quest progress/other information

sick swan
#

!e each

bronze cragBOT
# sick swan !e each
Cannot Specify Searched Event

Multiple possible events: command, leaves decay, item spawns, block burns, block fades, block falls, block forms, block grows, entity tamed, horse jumps, item merges, world loads, world saves, block physics, item despawns, item enchanted, vehicle moves, piston retracts, entity breeds, world unloads, ...

sick swan
#

how can i flag each player?

#

like they have different flag names

#

or generate flag names

#

its very hard to explain of what i wanted to do, did you get it?

noble laurel
#

Flags are stored per object - you can think of it as each thing having it's own notebook to write stuff in; both players can write quest_progress: 5 in their notebook at once without causing any issue, since it's 2 separate notebooks

#

See also

#

!g flags

bronze cragBOT
noble laurel
#

You're basically attaching a piece of information to a specific object, which can be a player, an item, a world, the server, etc.

sick swan
#

Having an npc not moving with different scenario is an easy thing to do per player quest progress.

In the other hand, having npc with moving locations when they started and depends on each player's progress is very hard

#

in short - NPC instances. or Quest instances

sick swan
#

how do u move the npc?

#

this is what im trying to do to create a private npc

im creating npc that contains player name for example

Then i will send a flag to player - flag <player> <player.name>_npcflag

then an if flag has_flag[<player.name>_npcflag]

in this case they have different npcs

prime swiftBOT
sick swan
#

does this make sense?

#

@noble laurel

sick swan
#

i cant hide the npc - error - Error Message: Unable to determine what object to adjust (missing object notation?),

#

!mechanism adjust npc

bronze cragBOT
#
Possible Confusion

Did you mean to search for radius?

#
Possible Confusion

Did you mean to search for command adjust?

sick swan
#

!e hide npc

bronze cragBOT
#
Possible Confusion

Did you mean to search for sentinel npc has no more targets?

bronze cragBOT
#
Info: debug

If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!

sick swan
#

is this correct one?

#

i dont know how to code it properly

noble laurel
# bronze crag

^ please post your script and a debug of the errors you're getting

sick swan
#

here is my script

noble laurel
# bronze crag

That's not a debug recording, it's just copy/pasted lines from console - please follow the instructions there ^

sick swan
#

how do you write hide_entity properly?

#

docs examples are confusing for me 😦

sick swan
#

hmm