#(JustinS) Flagging entities

49 messages · Page 1 of 1 (latest)

hearty rapids
#

When working with respawnable entities (think of custom bosses), what's the best way to flag them? If I flag the one Im looking at, kill it, and respawn it, it won't have that same flag will it?

polar groveBOT
#

(JustinS) Flagging entities

polar groveBOT
#

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.

unreal forge
hearty rapids
#

both types of mobs

unreal forge
#

if the latter, the save argument would work for both

hearty rapids
#

probably spawning them via a script, but we might use different plugins

unreal forge
#

!lang save arg

clever templeBOT
# unreal forge !lang save arg

The "save:<name>" argument is a special meta-argument that is available for all commands, but is only useful for some.
It is written like:

  • run MyScript save:mysave

When the save argument is used, the results of the command will be saved on the queue, for later usage by the "entry" tag.

The useful entry keys available for any command are listed in the "Tags" documentation section for any command.
For example, the "run" command lists "<entry[saveName].created_queue>".
The "saveName" part should be replaced with whatever name you gave to the "save" argument,
and the "created_queue" part changes between commands.
Some commands have multiple save entry keys, some have just one, most don't have any.

Many users make the mistake of using dynamic save names like "save:<[something]>" - this is almost always wrong. Use a constant name, just like you do for definitions.

Group

Script Command System

unreal forge
#

that will work for when you spawn them directly, but uh

#

it depends on how the other plugin spawns them to determine the other way

#

!c spawn

clever templeBOT
# unreal forge !c spawn
Group

entity

Syntax

spawn [<entity>|...] (<location>) (target:<entity>) (persistent) (reason:<reason>)

Short Description

Spawns a list of entities at a certain location.

Description

Spawn an entity or list of entities at the specified location.

Accepts the 'target:<entity>' argument which will cause all spawned entities to follow and attack the targeted entity.

If the persistent argument is present, the entity will not despawn when no players are within range, causing the entity to remain until killed.

Optionally specify 'reason:<reason>' (Paper only) to specify the reason an entity is spawning for the 'entity spawns' event,
using any reason from <@link url https://hub.s...

unreal forge
#

ope

#

!c spawn tag

clever templeBOT
# unreal forge !c spawn tag
Group

entity

Syntax

spawn [<entity>|...] (<location>) (target:<entity>) (persistent) (reason:<reason>)

Short Description

Spawns a list of entities at a certain location.

Description

Spawn an entity or list of entities at the specified location.

Accepts the 'target:<entity>' argument which will cause all spawned entities to follow and attack the targeted entity.

If the persistent argument is present, the entity will not despawn when no players are within range, causing the entity to remain until killed.

Optionally specify 'reason:<reason>' (Paper only) to specify the reason an entity is spawning for the 'entity spawns' event,
using any reason from <@link url https://hub.s...

Related Tags

<EntityTag.is_spawned> Returns whether the entity is spawned.
<server.entity_types> Returns a list of all entity types known to the server. Generally used with ...
<entry[saveName].spawned_entities> returns a list of entities that were spawned.
<entry[saveName].spawned_entity> returns the entity that was spawned (if you only spawned one).

unreal forge
#
  • spawn entity save:myentity
  • flag <entry[myentity].spawned_enity>
#

its rough to determine how the other plugin works, but this is the biggest catch-all:

#

!event entity spawns

clever templeBOT
# unreal forge !event entity spawns
Group

Entity

**WARNING**

This event may fire very rapidly.

Event Lines

<entity> spawns (because <cause>)

Triggers

when an entity spawns.

Context

<context.entity> returns the EntityTag that spawned.
<context.location> returns the location the entity will spawn at.
<context.reason> returns the reason the entity spawned, can be ENTITY_SPAWN or any of: <@link url ...
<context.spawner_location> returns the location of the mob spawner, when reason is SPAWNER.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

unreal forge
#

!e mythic

clever templeBOT
# unreal forge !e mythic
Cannot Specify Searched Event

Multiple possible events: mythicmob mob spawns, mythickeys key pressed, mythicmob mob despawns, mythickeys key released, mythicmob mob dies|death|killed.

unreal forge
#

those mythic events exist as well,

#

!tag mythicspawn tag

clever templeBOT
# unreal forge !tag mythicspawn tag
Cannot Specify Searched Tag

Multiple possible tags: <mythicspawner[<name>]>, <MythicSpawnerTag.mythic_mobs>, <MythicSpawnerTag.cooldown>, <MythicSpawnerTag.mob_type>, <MythicSpawnerTag.mobs>, <MythicSpawnerTag.location>, <MythicSpawnerTag.name>, <MythicSpawnerTag.group>.

unreal forge
#

ope

#

!command mythicspawn tag

clever templeBOT
# unreal forge !command mythicspawn tag
Required Plugins or Platforms

Depenizen, MythicMobs

Group

Depenizen

Syntax

mythicspawn [<name>] [<location>] (level:<#>)

Short Description

Spawns a MythicMob at a location.

Description

This allows you to spawn a MythicMob at a location using the mob's internal name.

Related Tags

<entry[saveName].spawned_mythicmob> returns the spawned MythicMobsMob.

unreal forge
#

related tag there

hearty rapids
#

hmm

#

I see

#

complicated

unreal forge
#

it can be but its fluent when you get used to it

hearty rapids
#

Ill need to figure out how our entities get spawned first

unreal forge
#

theres always a trigger

hearty rapids
#

Is it possible to make an entity always have a flag? E.g I make a big rock guy or smth, I want them to always have the flag "no_levitation", no matter how I spawn them

unreal forge
#

yeah

hearty rapids
#

Id have to use the spawn event, check if it's "big rock guy", then flag them right?

#

I think I got it

unreal forge
#

im grabbing an example from my servers scripts

hearty rapids
#

oh alrighty

unreal forge
#

ope i apparently dont have one, uh

#

i thought i made spiders spawn with a chance to be invisible and fast lol

#

similar to how i make some phantoms bigger, youd just cast the effects

hearty rapids
#

👍 seems straightforward.

#

And I can even use the mythicmob mob spawns event

#

Ill give it a try, thanks!