#(zen9967) Spawn fake npc
76 messages · Page 1 of 1 (latest)
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.
Did you mean to search for sentinel npc has no more targets?
!e region break
Did you mean to search for player uses recipe book?
!e in region
Did you mean to search for gamerule changes in world?
!e in_region
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, ...
!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!
!c create
Citizens
npc
create [<entity>] [<name>] (<location>) (traits:<trait>|...) (registry:<name>)
Creates a new NPC, and optionally spawns it at a location.
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.
!m hide_from_players
Hides the entity from players by default.
See also !mechanism EntityTag.show_to_players.
To hide for only one player, see !mechanism PlayerTag.hide_entity.
Works with offline players.
EntityTag
None
!m PlayerTag.show
!m show_entity
Shows the player a previously hidden entity.
To show for everyone, use !mechanism EntityTag.show_to_players.
See also !mechanism PlayerTag.hide_entity.
PlayerTag
EntityTag
Create an NPC, hide it globally, show it to the specific player
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
You'd create an NPC for each player
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.
^ 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
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
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
!e each
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, ...
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?
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
View the guide page 'Long Term Memory: Flags' at: https://guide.denizenscript.com/guides/basics/flags.html
You're basically attaching a piece of information to a specific object, which can be a player, an item, a world, the server, etc.
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
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
- create player <player.name>_npc <player.location>
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
i cant hide the npc - error - Error Message: Unable to determine what object to adjust (missing object notation?),
!mechanism adjust npc
Did you mean to search for radius?
Did you mean to search for command adjust?
!e hide npc
Did you mean to search for sentinel npc has no more targets?
!info paste debug
Help us help you by pasting your script to https://paste.denizenscript.com/New/Script and linking it back here.
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!
- adjust <player> hide_entity:<npc[<player.name>_npc]>
is this correct one?
i dont know how to code it properly
^ please post your script and a debug of the errors you're getting
Content of Denizen Script Paste #121844: Edit of paste 121843: Unnamed Denizen Script Paste... pasted 2024/04/10 07:57:09 UTC-07:00, Paste length: 997 characters across 7 lines, Content: [14:56:24 INFO]: ERROR in script outlaw_scene_1 in queue OUTLAW_SCENE_1_195_MarchDer while executin...
Content of Denizen Script Paste #121846: Unnamed Denizen Script Paste... pasted 2024/04/10 07:57:45 UTC-07:00, Paste length: 346 characters across 15 lines, Content: outlaw_scene_1: type: task
here is my script
That's not a debug recording, it's just copy/pasted lines from console - please follow the instructions there ^
Content of Server Log Paste #121847: Denizen Debug Logs From Server... pasted 2024/04/10 08:05:09 UTC-07:00, Paste length: 753 characters across 15 lines, Content: Java Version: 17.0.10Up-time: 2h 4m
how do you write hide_entity properly?
docs examples are confusing for me 😦
hmm