#plugins-dev-chat

1 messages ยท Page 87 of 1

hearty shard
#

however

celest thorn
#

one time i got so angry i pulled out sl src and showed how the gun system works via math

unique crane
#

Can you tell zero that client side only waypoint toy wont work

slate flume
#

All I know is I did a coroutine to set player position and it wasn't smooth

celest thorn
hearty shard
#

thats their problem to learn

celest thorn
#

but i want to see what happens

slate flume
#

So how do I interface with a waypointtoy?

slate flume
#

I've never used waypoints before

hearty shard
#

object as in primitives

celest thorn
#

@unique crane the more i bug this game the more fun it will be trust me

hearty shard
#

yooo

#

so true

#

david release update now

slate flume
slate flume
hearty shard
#

idk more specifics

heady turret
#

Guys

slate flume
#

@unique crane ๐Ÿฅบ

heady turret
#

When update?

unique crane
#

let me see if I can find the QA test of the riptide's waypoints

celest thorn
unique crane
#

there should be QA plugin

slate flume
heady turret
celest thorn
slate flume
celest thorn
#

I KNOW

#

Already have plan b if Client Side waypoints aren't cool enough

#

(I know already for sure they aren't)

slate flume
#

What are we doing

celest thorn
slate flume
#

9 days straight on microsoft word is CRAZY

unique crane
#

He is doing the all endings run

restive turret
unique crane
#

There is just our QA plugin rip

#

no code then

celest thorn
#

i want QA To code the plugin

#

not me

#

crazy update

#

in 1min

slate flume
#

Hey guys

#

Is it possible to spoof an item's category for item limits?

hearty shard
#

and just server validate

slate flume
#

Hmmm

celest thorn
#

UPDATE OUT

signal steeple
#

Yeah that's what I'm doing for now, thanks for the clarification ๐Ÿ‘

slate flume
#

Chill

celest thorn
#

Now its speedrun time

celest thorn
#

@unique crane set it to 1,1,1 didn't work

unique crane
#

Joeover

celest thorn
#

PLEASE

unique crane
#

Idk

slender lynx
#

project dead

#

i thought this was gonna make it better

#

๐Ÿฅ€

celest thorn
#

the problem IS UNITY PARENTING

royal mica
#

Wait

#

THE RAGDOLL DATA THING WAS NOT FIXED?

#

A

#

or is my decomp stupid

forest sentinel
#

what the

#

funny litte gun

#

funky micro why are the size of the itemviewmodels determined by the player model fade?

restive turret
#

fake sync roles

#

apperance stuff

plain gazelle
#

Cool that the IK still works

unique crane
#

wtf XDDD

forest sentinel
#

Please let us have an option that keeps the weapon in hand visible and at normal scale

hearty shard
#

whys this not work

#

im confused

#

its a HE grenade and serial should work i mean it works the same as my other custom item

#

(it doesnt explode on impact)

forest sentinel
#

Custom elevators have become a real

undone bough
#

fall damage stop working

#

๐Ÿฅด

random scaffold
#

nw forgot add .IsDestroyed Agree

ashen hornet
random scaffold
forest sentinel
#

like base game elevators

random scaffold
#

parkour with animated fly platform become to available

celest thorn
#

@unique crane IT WORKS

#

CULLING WORKS

unique crane
random scaffold
#

or how it without any cooldown

slender lynx
celest thorn
#

btw that problem still persist

random scaffold
#

need transator

#

bruh

celest thorn
#

its not visible

#

it doesn't render

random scaffold
slender lynx
#

thing load when looking at it

#

thing not load when not look at

random scaffold
#

but its the base effect was

unique crane
celest thorn
#

i still didn't test with original server

random scaffold
#

or base effect rendering outside too?

unique crane
#

Would be good to benchmark XD

slender lynx
#

pauseulling causes a whole bunch of issues

forest sentinel
celest thorn
#

we found alot of issues

#

lol

slender lynx
celest thorn
#

you can go through the ground because ITS NOT VISIBLE

#

amazing

slender lynx
#

yeah so this breaks our entire project

celest thorn
#

i think we are going to stick with our own version of culling

sinful bronze
celest thorn
#

probably better

sinful bronze
#

nw lied

slender lynx
#

yeah we gotta go back to our system

#

its so over

random scaffold
sinful bronze
#

i hate cassie

#

!!!

celest thorn
#

btw if you don't see the object you can walk through it

slender lynx
#

its just desync tho

#

so

#

ig not too horrible

#

but any custom maps that arent the base floor will not work with this system

unique crane
#

Just make the bounding box bigger

#

xd

celest thorn
#

I know

#

but if i make it bigger

#

it doesn't cull anymore correctly

#

Because i cannot know if something is ground or not

slender lynx
#

this is good for super huge maps

#

but not where everything is close together

restive turret
#

just make a cube and make that a cullable object

#

in editor side

celest thorn
#

no because that would again defeat the purpouse because the map is always loaded

#

and we have culling for that

#

because its handled by the plugin

unique crane
#

Then just dont cull the ground

#

not a big deal

celest thorn
#

but how can i tell by code

#

thats ground

#

to walls

#

etc...

#

like see where the problem is

#

and changing 20 schematics its actually hard

#

not counting some others

random scaffold
#

waypoint toy can have infinity radius?

unique crane
#

No

random scaffold
#

bruh

unique crane
#

They have the same distance as other waypoints

random scaffold
#

fucking 254 limit

random scaffold
slate flume
#

So waypoints

#

Can I attach a player to a waypoint

thin shuttle
#

if they would remove it it's would simply not work with the system they did made

forest sentinel
#

We can finally adjust the model fade properly. If the items in your hands stop shrinking, it will be complete(he is holding micro micro)

hearty shard
#

sooo

forest sentinel
#

So how will this issue be resolved? Will the items in their hands also become invisible or will the items in their hands be visible?

hearty shard
thin shuttle
hearty shard
#

@unique crane uhh btw
why does this not actually max it at 65 damage

#

it insta kills someones with 100 hp despite seemingly being 65 max

unique crane
#

Uhhh

#

Kinda clueless on that one

plain gazelle
#

How does one send a role sync message

unique crane
#

And I'm in bed already

hearty shard
#

yeah i do not

#

understand it

hearty shard
plain gazelle
#

Thank you

hearty shard
restive turret
#

dummies cant throw grenades

hearty shard
#

that might be why

restive turret
#

sadge

unique crane
#

Yea that might be it

#

65*2>100

hearty shard
#

hjm

#

hm

#

so ig its already exploded?

#

Ig set TargetTime = 0

#

yeah

#

fuse ending doesnt set it as detonated

#

thats

#

weird

past rune
#

Is there a way to get a player's ping?

celest thorn
#

im trying the waypoint toy

#

but i cannot understand why even when i stand on top of it it doesn't rotate

#

like at all

#

im desyncing like crazy even tho everything is fine

#

should i set a priority?

hearty shard
upper vapor
celest thorn
#

even tho the animation is running

#

fine

upper vapor
#

did you spawn the object and is it non static

celest thorn
upper vapor
#

are you animating the waypoint

celest thorn
#

the waypoint is under the primitive

#

which the primitive is animated

upper vapor
#

what's Waypoint

celest thorn
#

the base for meow to load the waypoint

upper vapor
#

but what is it in game

celest thorn
#

an empty gameobject

upper vapor
#

yeah

#

you can't parent to an empty object

celest thorn
upper vapor
#

the client doesn't know about it

#

it has no network identity

celest thorn
#

No this is server side

hearty shard
#

you have to parent stuff to the waypoint

#

the primitives

#

afaik

celest thorn
#

why tf should i parent it to a primitive

#

if i move it it should move

#

like it doesn't make any sense

hearty shard
#

primitive with the waypoint as parent

celest thorn
#

if its an admin toy

#

and i spin it it should be spinning on the client too

teal junco
#

isnt the point of a waypoint so that you can parent rooms to it

hearty shard
#

its for elevators and other moving platforms

#

primarily

teal junco
#

yeah

#

thats like what i said

hearty shard
#

it can also be used to sync player positions

teal junco
#

you parent rooms to it so that players & other objects can attach to it

hearty shard
#

you said rooms specifically not moving objects like elevators

#

๐Ÿ˜ญ

upper vapor
teal junco
#

you know exactly what i meant

hearty shard
#

no i didnt ๐Ÿ˜ญ

#

that was why we both said what

#

๐Ÿ˜ญ

teal junco
#

how do you not understand

#

elevators are kind of rooms

celest thorn
#

the client has the update of the position from the transform moving

#

so thats enough

hearty shard
upper vapor
teal junco
celest thorn
teal junco
#

you can parent stuff to waypoints so that players and pickups can anchor to them

#

right?

celest thorn
#

because the server knows its moving

#

NetworkPosition

#

Rotation updates

#

and the client updates it

upper vapor
celest thorn
teal junco
#

is someone confused about empty objects in scp sl

celest thorn
upper vapor
hearty shard
#

@worthy rune ^^

#

whats the correct usage of waypoint

hearty shard
#

well not usage but implementation

celest thorn
#

are you telling me i should manage myself

upper vapor
#

zero don't tell me you didn't know this

celest thorn
#

i don't understand still

upper vapor
celest thorn
#

come in vc

#

and let me show you

#

because this is too stupid

#

and i don't understand who is stupid me or unity

upper vapor
#

are you spawning a client side primitive in place of the empty object?

worthy rune
#

you should be able to use waypoint how ever you want, although i didnt test every case

celest thorn
#

Empty

#

the problem is not updating

#

for no reason

#

like it should be updating fine

worthy rune
#

the issue its thats theres an empty in the hierarchy, and that will break parenting unless you replace it with a primitive

teal junco
#

waypoints can be used to make custom rooms out of bounds that work properly right?

worthy rune
#

yeah

celest thorn
#

it doesn't make any sense

teal junco
#

the cause of stuff like pickups disappearing and positions desyncing is because the doors arent there which act like waypoints?

upper vapor
#

because you need a network identity

celest thorn
#

if i want to parent it to nothing it should be updating

upper vapor
#

to parent the waypoint to

teal junco
#

or am i not correect in that assumption

worthy rune
teal junco
#

yeah i figured

worthy rune
#

it doesnt really matter where the waypoint is, if it doesnt move throughout the game

teal junco
#

how does the object know what waypoint to attach itself to?

#

does it just pick the closest one

worthy rune
hearty shard
worthy rune
hearty shard
#

ya

teal junco
#

and relativepositioning uses waypoints right

worthy rune
#

yes

hearty shard
#

yep

#
public static void ExtractWaypointData(
      Vector3 worldPoint,
      bool extractPoint,
      Quaternion worldRot,
      bool extractRot,
      out byte closestId,
      out Vector3 relPoint,
      out Quaternion relRot)
    {
      float num1 = float.MaxValue;
      relPoint = Vector3.zero;
      relRot = Quaternion.identity;
      closestId = (byte) 0;
      WaypointBase waypointBase = (WaypointBase) null;
      for (byte index = 1; index < byte.MaxValue; ++index)
      {
        if (WaypointBase.SetWaypoints[(int) index])
        {
          WaypointBase allWaypoint = WaypointBase.AllWaypoints[(int) index];
          float num2 = allWaypoint.SqrDistanceTo(worldPoint);
          if ((double) num2 <= (double) num1)
          {
            num1 = num2;
            waypointBase = allWaypoint;
            closestId = allWaypoint._id;
          }
        }
      }
      if (closestId == (byte) 0)
        return;
      if (extractPoint)
        relPoint = waypointBase.GetRelativePosition(worldPoint);
      if (!extractRot)
        return;
      relRot = waypointBase.GetRelativeRotation(worldRot);
    }
#

elevators when ur in the elevator use -1 distance

#

to make sure u go in there with priority

plain gazelle
#

Spawning in a Dummy when the round starts and trying to set its group gives me this error, but i dont understand it

static meteor
#

You can set this to Embedded to see the line the error is coming from

celest thorn
#

@unique crane & @worthy rune pretty sure i found a bug

#

you cannot update a Waypoint toy with NetworkPosition

#

or any other

#

after spawn

#

even if its not static

worthy rune
#

pretty sure that goes for all admin toys

celest thorn
#

no

worthy rune
#

use the wrapper types labapi provides

celest thorn
#

i need to use the one game provides

hearty shard
celest thorn
hearty shard
#

network position is overwritten every frame

#

transform.position

#

or localPosition

celest thorn
#

I disabled the component

#

so it doesn't update

#

every LateUpdate

#

but i manually do

worthy rune
#

if you disable it, mirror stops working on it

celest thorn
#

fuck

#

its time to patch?

#

idk

worthy rune
#

why disable it anyway

celest thorn
#

so it doesn't update

#

honestly rn i don't know whats going on in my brain

celest thorn
#

i have a monkey type of level

worthy rune
#

so network vars stop working if you disable the gameobject

upper vapor
#

yeah and she sets the dirty bits by setting NetworkRotation

#

she only disabled the component

worthy rune
celest thorn
#

Honestly im trying with update to set the transform

#

and just see if it works

#

Nope its not working im loosing hope

worthy rune
#

i mean is it still disabled?

celest thorn
#

no

celest thorn
upper vapor
celest thorn
celest thorn
upper vapor
#

shyte

celest thorn
#

honestly if anyone has a suggestion

#

because i lost hope

upper vapor
#

patch admintoybase

#

skip server update if it's a waypoint toy

celest thorn
celest thorn
#

funny enough

#

this is already done

#

inside UpdatePositionServer

#

i feel like the client is not updating it

#

idk why

#

i never had any of this problem with other primitives all of them always worked

worthy rune
#

why dont you just parent it to a prim and move that

celest thorn
upper vapor
#

create a waypoint on the server but don't spawn it

#

and send a fake waypoint

celest thorn
#

the problem is i cannot do any of that

#

because

Client Spawns
Server Spawns

#

so its still impossible for me

restive turret
#

Skill issue

#

Did you fix your culling toy problem?

celest thorn
#

but its useless

celest thorn
#

btw someone can explain it to me this

Should i set the primitive as parent of the Waypoint

or

Waypoint as parent of the prim

#

because both cases don't work

worthy rune
#

both should work

celest thorn
#

i don't understand

worthy rune
#

what happens when you try

celest thorn
#

1st nothing no spin the Update render doesn't even do anything
2nd the primitive disappears

#

btw the waypoint updates

#

im 100000000000000000000000% sure

#

just not on the client

worthy rune
#

have you tried not parenting to anything and having the waypoint be both server/client sided?

celest thorn
#
        [HarmonyPrefix]
        [HarmonyPatch(nameof(AdminToyBase.UpdatePositionServer))]
        public static bool OnUpdatePositionServer(AdminToyBase __instance)
        {
            if (__instance.transform.root.name.Contains("Ignore"))
                return true;
            
            if (__instance.IsStatic)
            {
                return false;
            }
            
            __instance.NetworkPosition = __instance.transform.position;
            __instance.NetworkRotation = __instance.transform.rotation;
            __instance.NetworkScale = __instance.transform.lossyScale;
            return false;
        }

This patch is spamming me that the Waypoint is being updated

celest thorn
#

its rn like this

#

wait without parent on the server

worthy rune
#

if that doesnt work, you probably have some patch interfering with it

worthy rune
celest thorn
#

i just cannot understand honestly why its so bugged

#

all of the updates are synced its just the client not doing anything with it

#

nope still nothing

worthy rune
#

what patches do you have that mess with networking/admin toys

celest thorn
#

that should sync in any case everything

#

and i know it works because everything does update like textoys

#

(that are server sided)

celest thorn
#

Are you sure the client does update it?

#

im getting the vibe it doesn't

#

100%

#

I just checked

worthy rune
#

it uses the same code as admintoy base

celest thorn
#

[2025-08-03 23:26:59.312 +00:00] [INFO] [MeowEditor-labapi] Waypoint (38.82, 100.91, 49.23), (0.00000, -0.30720, 0.00000, 0.95165) (0.02, 0.05, 0.03)
[2025-08-03 23:26:59.323 +00:00] [INFO] [MeowEditor-labapi] Waypoint (38.82, 100.91, 49.23), (0.00000, -0.29335, 0.00000, 0.95600) (0.02, 0.05, 0.03)
[2025-08-03 23:26:59.333 +00:00] [INFO] [MeowEditor-labapi] Waypoint (38.82, 100.91, 49.23), (0.00000, -0.27975, 0.00000, 0.96007) (0.01, 0.05, 0.03)
[2025-08-03 23:26:59.363 +00:00] [INFO] [MeowEditor-labapi] Waypoint (38.82, 100.91, 49.23), (0.00000, -0.26638, 0.00000, 0.96387) (0.01, 0.05, 0.03)
[2025-08-03 23:26:59.373 +00:00] [INFO] [MeowEditor-labapi] Waypoint (38.82, 100.91, 49.23), (0.00000, -0.25327, 0.00000, 0.96740) (0.01, 0.05, 0.03)
[2025-08-03 23:26:59.384 +00:00] [INFO] [MeowEditor-labapi] Waypoint (38.82, 100.91, 49.23), (0.00000, -0.24041, 0.00000, 0.97067) (0.01, 0.05, 0.03)
[2025-08-03 23:26:59.414 +00:00] [INFO] [MeowEditor-labapi] Waypoint (38.82, 100.91, 49.23), (0.00000, -0.22784, 0.00000, 0.97370) (0.01, 0.05, 0.03)

#

and you can see the update is happening

#

on the update Server but the client doesn't recieve anything?

#

the renderer doesn't even have any type of update

worthy rune
#

have you checked your client log

worthy rune
celest thorn
#

around it

#

bounds

worthy rune
#

do you see it at all

celest thorn
#

Yes i do see them

#

but no update

worthy rune
#

its parented to the waypoint, so it moves with the waypoint

celest thorn
#

but even if i set it to the client

#

nothing happens

worthy rune
#

not sure what you mean

celest thorn
#

Server doesn't have the primitive

#

the client does

worthy rune
#

i mean parented as apart of the prefab, not admintoy parenting

celest thorn
#

and prefab

#

both of them

#

but nothing

#

still there

#

not moving

worthy rune
celest thorn
#

thats the first thing i did

#

parenting for both no errors

#

and moving the server says its moving and updating it

#

but the client has no movement

#

im pretty sure i didn't do anything wrong

#

because server is Updating it

#

the client isn't

worthy rune
#

i think theres something missing here

celest thorn
#

mhm?

#

btw if you wanna know idk if it helps priority is 1

worthy rune
#

movement is handled the same as any other admintoy, there isnt away to explain whats wrong

#

priority isnt related to movement

#

only thing i can think of would be that you are setting the waypoint to static somewhere

celest thorn
#

else the server would've blocked the updates

worthy rune
#

only way to explain it, unless the server isnt sending out any network messages for waypoints

hearty shard
#

Rats

worthy rune
#

your thing only checks setting the network vars, not if mirror is sending out the network messages. so you could check that but i think its unlikely to be the problem

worthy rune
#

you would have to patch mirror

#

still think theres something missing here, you say theres only one patch? what about other plugins on the server

worthy rune
#

can i see all the patches you have

celest thorn
worthy rune
#

can i see SendSpawnMessage, SpawnObservers and ToyScale

celest thorn
#
    [HarmonyPatch(typeof(NetworkServer), nameof(NetworkServer.SendSpawnMessage))]
    public static class SendSpawnMessagePatch
    {

        public static bool ShouldUseGlobalTransform(NetworkIdentity identity) =>
            identity.TryGetComponent(out SpawnableInfo data) && data is MeowEditorDoor;

        public static void SetTransformValues(ref SpawnMessage message, NetworkIdentity identity)
        {
            var transform = identity.transform;
            if (SpawnObserversPatch.ShouldSpawnWithGlobalTransform)
            {
                message.position = transform.position;
                message.rotation = transform.rotation;
                message.scale = transform.lossyScale;
                return;
            }

            message.position = transform.localPosition;
            message.rotation = transform.localRotation;
            message.scale = transform.localScale;
        }

        private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
        {
            var list = new List<CodeInstruction>(instructions);
            var start = list.FindField(nameof(SpawnMessage.position)) - 2;
            var end = list.FindField(nameof(SpawnMessage.scale));
            list.RemoveRange(start, end - start + 1);
            list.Insert(start, Call(SetTransformValues));
            return list;
        }
    }
#
    [HarmonyPatch(typeof(NetworkServer), nameof(NetworkServer.SpawnObserversForConnection))]
    public static class SpawnObserversPatch
    {
        public static bool ShouldSpawnWithGlobalTransform = false;
        private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
        {
            var list = new List<CodeInstruction>(instructions);
            var loopStart = list.FindCode(OpCodes.Stloc_2) + 1;
            list.InsertRange(loopStart, new[]
            {
                Ldloc(2).WithBlocks(new ExceptionBlock(ExceptionBlockType.BeginExceptionBlock)),
                Call(SendSpawnMessagePatch.ShouldUseGlobalTransform),
                Stfld(typeof(SpawnObserversPatch), nameof(SpawnObserversPatch.ShouldSpawnWithGlobalTransform))
            });
            var loopEnd = list.FindCall(nameof(IEnumerator<NetworkIdentity>.MoveNext)) - 1;
            list.InsertRange(loopEnd, new[]
            {
                Int0.WithBlocks(new ExceptionBlock(ExceptionBlockType.BeginFinallyBlock)),
                Stfld(typeof(SpawnObserversPatch), nameof(SpawnObserversPatch.ShouldSpawnWithGlobalTransform)),
                new CodeInstruction(OpCodes.Endfinally).WithBlocks(new ExceptionBlock(ExceptionBlockType.EndExceptionBlock))
            });
            return list;
        }

    }
worthy rune
#

reminds me of sloc lol

celest thorn
#

because this was the same for doors

#

btw something i should mention

#

because i handle stuff differently

#

stuff is not spawned normally

#

but handled like this

            if (!go.TryGetComponent(out NetworkIdentity identity))
                return;

            SpawnObserversPatch.ShouldSpawnWithGlobalTransform = true;
            try
            {
                // future probably doors will not work.
                identity.isLocalPlayer = (UnityEngine.Object) NetworkClient.localPlayer == (UnityEngine.Object) identity;
                identity.isClient = NetworkClient.active;
                identity.isServer = true;
                identity.netId = NetworkIdentity.GetNextNetworkId();
                identity.OnStartServer();
            }
            finally
            {
                SpawnObserversPatch.ShouldSpawnWithGlobalTransform = false;
            }
#

When it is a networkidentity

#

so it starts normally but i need to manually send the spawnmessage

worthy rune
#

can i see the code that does that

celest thorn
#

after it spawns

#

it does this

worthy rune
#

sorry the payload part of the spawn message

celest thorn
#

via mirror

#

NetworkServer.SendSpawnMessage

#

btw all of this worked fine with primitives

worthy rune
#

not sure the issue, without any errors on the client/server side im not sure where to look

celest thorn
#

because no errors anywhere

#

and it seems to be fine on server

worthy rune
#

best you can do is create another plugin and keep adding stuff to it until waypoint toys break

ionic prawn
#

ServerConsole.EnterCommand("restart"); will this restart the server or the round? i want to restart the server btw

worthy rune
celest thorn
#

i want to try to remove all of that code

#

and just do
NetworkServer.Spawn(go);

ionic prawn
worthy rune
#

you have to specify it in the args iirc

celest thorn
#

I FOUND OUT WHAT IT IS

#

IM GOING TO EXPLODE

slender lynx
celest thorn
slender lynx
#

oh

celest thorn
#

of not telling mirror Hey it spawned

slender lynx
#

shit

#

ok

celest thorn
#

DOESN'T SEND UPDATE

#

this is the only toy i've seen doing this

worthy rune
#

ahh

celest thorn
#

so its time to write new logic for this

worthy rune
#

makes sense

celest thorn
#

NetworkServer.spawned doesn't have it

slender lynx
#

we could probably do something to fix it

celest thorn
#

yes

#

its such a pain now to handle

worthy rune
#

if i were you, i would just send EntityStateMessages instead of trying to use netVars

#

thats what i do when i fake sync

flat vine
#

๐Ÿ˜ข

celest thorn
#

and yes i do send EntityStateMessages

#

btw

worthy rune
celest thorn
#

this behave so strange

#

like

celest thorn
#

the only problem i have

#

is like now that i spawn them like this

#

could a player that is not like spawned

#

be attached to another waypoint toy that he doesn't see

#

and so create desync

worthy rune
#

probably

celest thorn
worthy rune
#

yeah although that might require a few patches

#

if you can somehow seperate them in space that would be the way to go

celest thorn
celest thorn
#

its not really a problem

worthy rune
#

theres movable waypoint add/remove methods

celest thorn
#

because at the end of the day i have infinite space

worthy rune
#

in there is where the "attachment" happens

celest thorn
#

here?

#

WaypointFollowerBase

worthy rune
#

nope, not there

worthy rune
celest thorn
worthy rune
#

yeah

#

you want todo something like this

if (child is FirstPersonMovementModule fpm)
    ... filtering

celest thorn
#

so it shouldn't be a problem

#

i need to study alot how it works

#

because i see alot of problems with movement

worthy rune
celest thorn
#

but a long the thing looses its grip pretty fast

#

in the edges

#

if i stay in the middle it works fine

worthy rune
#

wdym by loose grip

celest thorn
#

or it doesn't influence anymore the relative

#

so i don't spin anymore

worthy rune
#

can you send a clip

celest thorn
#

yea

celest thorn
worthy rune
#

oh your waypoint is not synchronised with your platform, i guess try parenting it

celest thorn
worthy rune
#

that would fix it, although the issue of it warping around like that is likely due to how you coded it

celest thorn
#

hmm why would it happen tho?

#

its just a simple animation

#

that spins

worthy rune
#

are you changing the scale?

celest thorn
#

nothing fancy

celest thorn
#

oh yea

#

i am

#

wait

#

the scale to not be like 256 256 256

worthy rune
celest thorn
#

parenting breaks alot

#

i found myself in the void

#

spinning

#

im honestly in between rn

#

of deciding of really using them

#

or not

#

because it would be more of a pain

#

then gain

#

and possible tps drop

worthy rune
#

not sure how it ended up so glitchy for you, should look very smooth like this

celest thorn
#

its so a pain

#

i couldn't imagine

#

when i saw toy i didn't think this much of a pain

worthy rune
#

we did make them easy to use, its just that your doing alot of hacky serverside/client side stuff

celest thorn
#

i know

cosmic echo
#

anyone know how the new SpawnableCullingParent works?

teal junco
glass karma
#

what event would be the best for allowing damage between certain people or roles? I've tried both onplayerhurt and onplayerhurting, but nothing has seemed to work. I'm confused on how you're supposed to allow damage to go through when it's normally not. ev.isallowed doesn't seem to do anything in my case

pine parcel
#

Is there anyway to change the cause of death description for a body?

I've used Player.Kill(reason, cassieAnnouncement)
but to my understanding, the reason sets the body's death description, while also displaying to the player at time of death?

slate flume
#

If you have a Ragdoll rd you can do something like rd.DamageHandler = new CustomReasonDamageHandler("Generic Death Reason")

pine parcel
#

thanks!!

slate flume
#
public override void OnPlayerHurting(PlayerHurtingEventArgs ev)
{
  if (ev.DamageHandler is AttackerDamageHandler handler)
    handler.ForceFullFriendlyFire = true;
}
glass karma
#

every time I've tried modifying that I was given some assembly error. I haven't tried exactly that way though, so thanks

slate flume
#

You might have to publicize the assembly

#

ForceFullFriendlyFire may be a private/protected field in the original code, so you have to publicize Assembly-CSharp to modify it

cosmic echo
#

how can I set the fuse time of a grenade projectile/get rid of its fuse time (so it only explodes when i tell it to)?

slate flume
cosmic echo
#

what's one of them?

slate flume
#
TimedGrenadeProjectile grenade;
grenade.RemainingTime = 100;
cosmic echo
#

ohhhh i forgot about TimedGrenadeProjectile

#

thanks gang ๐Ÿ™

slate flume
#

Of course! :D

winged meteor
#

how can I check if a player is in the pocket dimension?

worthy rune
#

PocketDimension.IsPlayerInside(player)

winged meteor
#

Thanks!

slate flume
#

You did waypoint stuff right?

worthy rune
#

ye

slate flume
#

How do I use WaypointToys? I have very little understanding of waypoints and shit but I understand I can use them to smoothly move players?

winged meteor
#

I hope my custom item plugin works lol

#

if it doesn't

#

I give up

worthy rune
#

they have two uses, one is just to expand the playable area which you do by spawning them and setting them to be static. each waypoint covers a 255m cube of area. second is to use as an elevator, all you have todo is scale them to the size of the chamber(or platform) and move them around and it just works. since its just an admin toy you can just parent it to other admin toys and move them instead(although be carefull with lots of movement smoothing as that will cause desync)

winged meteor
#

what is waypoint toys?

slate flume
#

Sorry if I'm misunderstanding

worthy rune
#

yeah thats pretty much it

#

teleportation works with them aswell

winged meteor
#

I give up

#

on a custom items

#

wel

#

well*

#

Ima just try fixing command

#
 if (!(sender is Player player))
            {
                response = "This command can only be run by a player.";
                return false;
            }``` bruh this didn't work
#

it always does it won't be ran

#

but a player

#

or smt

#

bro why is labapi so muchg different

worthy rune
winged meteor
#

it didn't

#

ima go to examples

#

and paste it

#

its different

#
if (!Player.TryGet(sender, out Player? player))
        {
            response = "You must be a player to use this command!";
            return false;
        }``` saw this on offical examples
worthy rune
#

yeah it shoudlnt work

worthy rune
winged meteor
#

its in a offical example sooo

worthy rune
#

can you link it

slate flume
winged meteor
slate flume
#

Will it lerp?

worthy rune
#

yeah thats fine

winged meteor
#

RAHHHH

slate flume
#

Bro what

worthy rune
#

that one im saying should work

slate flume
#

Is going on

worthy rune
slate flume
#

Gotcha

#

So players will teleport with it instantly

#

Fire

worthy rune
#

well unless theres movement smoothing

slate flume
#

Oh

#

?

#

I'm interested

#

Because this would be the best way to do it for me

worthy rune
#

yeah make sure you set movement smoothing to 0?

slate flume
#

So if I turn on movement smoothing, it'll lerp?

worthy rune
#

yeah

slate flume
#

Fire

winged meteor
#

I forgot

#

to register my item

#

in my entrypoint

#

๐Ÿ˜ญ

#

bro even I Forget stuff on my own system

slate flume
#

That's fire

winged meteor
#

lies. lies. lies I say

#

doesn't seem to ever spawn

slate flume
#

Why are you manually setting serial

#

Put some logging in there

winged meteor
#

im no

static meteor
winged meteor
worthy rune
winged meteor
#

this is my first item manager

winged meteor
#

even my old NWAPIPlugin didn't have one

slate flume
#

You can run Pickup::Create and then .Spawn() it when you're done initializing

winged meteor
#

I changed it now ๏ฝ‚

#

but now

#

my system doesn't even work

#

I give up at ts point

#

it spawns coin

#

but

#

doesn't seem to do anything with it

slate flume
#

Wdym

#

You can pick it up but it seems to be just a regular coin?

winged meteor
#

yeah it won't do the stuff its meant to do

slate flume
#

Show code

winged meteor
#

wait

#

im stupid

#

wrong function name

slate flume
#

๐Ÿ˜

winged meteor
#

don't laugh at me!

#

๐Ÿ˜ 

slate flume
#

We've all been there

winged meteor
#

should work now ๐Ÿ™‚

#

bro I haven't used labapi until today.

#

I was soo used to NWApi

#

why did they change it AGAIN

slate flume
#

New system good

winged meteor
#

true

#

tbh

#

so bad news

#

dropping it breaks it

#

but I have smth

#

its smth

#

I will fix it up later

#

after i make changes

#

but

#

ok right after I make this last change

#

IMA SLEEP

#

I got school tomorrow ๐Ÿ˜ญ

slate flume
#

Pickup.Create() assigns a serial

#

You're doing too much work broski

unique crane
#

Serials stays the same for pickup/item

slate flume
#

So I've noticed

#

If I have a waypoint toy

#

I spawn it on someone

#

But then I teleport it away from them

#

They are not following?

worthy rune
#

maybe set visualize bounds to true to see if the players inside

slate flume
#

I just decreased the teleport distance and it worked

#

I teleport it on like a line and pick interpolation points

#

So I just increased how often it happens

#

And it fixed everything

worthy rune
#

weird

ionic prawn
#

how should i add a wait into the plugin without it desyncing the server?

worthy rune
#

what are you trying todo

slate flume
#

Coroutines are these wonderful little time-based things

ionic prawn
slate flume
#

Oh you do

#

Don't worry

ionic prawn
#

nvm im blind

#

๐Ÿ˜ญ

slate flume
#

So let me draft something real quick

ionic prawn
#

k

slate flume
#
private static IEnumerator<float> Coroutine(Player player, PrimitiveObjectToy objectToy)
{
  // code code code
  yield return Timing.WaitForSeconds(1f);
  // more code!
}
#

This is the general idea behind a coroutine

#

You give it some arguments

#

You run some code

#

But what you can do now is yield return

#

And you can then pass in different intervals

#

And it waits for however long you specify

ionic prawn
#

k

slate flume
#

Like this is one of my routines

#

All it does is wait for a 3 seconds, and enables invisibility for a player

#

Now

#

In order to run a coroutine, you have to call Timing::RunCoroutine

ionic prawn
#

The non-generic type 'IEnumerator' cannot be used with type arguments
The name 'Timing' does not exist in the current context

slate flume
#

In my case I have an event where I do Timing.RunCoroutine(InvisRoutine(ev.Player));

ionic prawn
#

im stupid as hell

slate flume
#
  1. Import
ionic prawn
#

i haven't sleept all night ๐Ÿ˜ญ

slate flume
#

It's all good! :)

#

Here to help

ionic prawn
#

it wont find timing?

#

do i need AWSSDK.Core?

slate flume
#

using MEC;

#

It's in Assembly-Csharp-firstpass.dll

#

So make sure you import that as a dependency

ionic prawn
#

k

slate flume
ionic prawn
#

also just a question will this restart the server or the round - i want it to restart the server
ServerConsole.EnterCommand("restart");

slate flume
#

I would recommend for anything you do, don't rely on enterring commands into the server console

ionic prawn
#

how should i restart the server then?

slate flume
#

Do Server.Restart();

ionic prawn
#

ty

slate flume
#

Haha ofc!

ionic prawn
#

its very hard for me cause i am the only plugin developer for my server ๐Ÿ˜ญ and im trying to train a friend

slate flume
#

It's okay!

#

I'm in the same boat friend

ionic prawn
#

rn im like rewriting the entire plugin cause it was super messy

#

into much cleaner

slate flume
#

I've been writing this one plugin since I first learned LabAPI

#

I have made a lot of mistakes along the way but it's working

ionic prawn
#

nice

#

still adding stuff

#

from the old one

slate flume
#

Real

ionic prawn
#

if it fails to add events it will just restart the server

slate flume
#

I like to just derive from CustomEventsHandler since my plugin quite large

ionic prawn
#

i learned the basics from Ttroubles video

#

and just learned on the way

slate flume
#

Real

#

I didn't know any YT videos existed for this

#

Lol I've been doing trial-error

ionic prawn
#

like there is only one video about labapi ๐Ÿ’€

slate flume
#

I have so much shit I started having to use reflection for registering events

slate flume
#

It's really nice though cause now I can just make a class and it auto-registers

ionic prawn
#

me trying to figure out how to make my first custom tool that i tried making but it was like when i started remaking the plugin

#

i just used the ProjectMER as an example

slate flume
#

Depending on the usecase, I'd recommend simplifying things like the DTogglerDictionary to a hash set

ionic prawn
#

tried using a particle disruptor

#

didnt go well

slate flume
#

Yeah Particle Disruptors are notoriously buggy

ionic prawn
#

this is what i did to use wait ๐Ÿ’€ it desynced the entire server when someone got a kill
private async Task HideHintAfterDelayAsync(Hint hint, PlayerDisplay playerDisplay)
{
await Task.Delay(2500);

    hint.Hide = true;
    playerDisplay.RemoveHint(hint);
}
slate flume
#

I advise against Tasks

ionic prawn
#

ik

restive turret
ionic prawn
#

that was the old code

slate flume
#

Haha love it

slate flume
ionic prawn
#

one time parsec stole the scp sl port ๐Ÿ’€

#

pro server specs

#

hosted on my friends laptop

restive turret
#

The list will not change when you do the foreach loop and you can also probably can do like
(static x => !x.IsAbstarct)

slate flume
#

And I may add more to my reflection in the future

ionic prawn
#

is it possible to auto update an scp : sl server?

slate flume
#

I avoid this kind of practice in my constantly running code

#

But in my plugin entry it makes it easy to understand and work with

tepid sluice
#

I cant use proxy anymore after updating

#

๐Ÿ˜ญ

restive turret
tepid sluice
#

it seems like they modify smth about http request

restive turret
#

And you only need 1 loop

ionic prawn
slate flume
ionic prawn
# unique crane Do not use async

new code (:
private static IEnumerator<float> HideHintAfterDelay(HintServiceMeow.Core.Models.Hints.Hint hint, PlayerDisplay playerDisplay)
{
yield return Timing.WaitForSeconds(2.5f);
hint.Hide = true;
playerDisplay.RemoveHint(hint);
}

slate flume
#

Oh you mean the

#

Yeah I used to have other code that ran specific to each one

#

I forgot to collapse it after I ported the types

#

Woops

restive turret
slate flume
#

I forgot to collapse it

ionic prawn
slate flume
#

You know what

#

While I'm at it

restive turret
#

You can put the where inside the foreach

#

Also you only need the last else if

#

Nvm

#

Wait nvm yes you can just use that to reg and create that and add into the thing
Also can create an if CustomSetting for it too

slate flume
#

What

slate flume
#

I'm unsure if I like that more

#

I thought about it but didn't

#

You know what I think I'll just leave some comments so I know what the hell any of this is because that's why I had it expanded out in the first place

pine parcel
restive turret
restive turret
pine parcel
#

oh perfect! I'll take a look into it, thanks!

restive turret
#

Or you can use a plugin AudioPlayer or smth idk

#

Discord search suck ass so you have to manually scroll down

cosmic echo
#

base labapi also has functionality for playing audio through a speaker as long as you have a way to load its pcm samples

pine parcel
#

I'll do a bit of digging and testing!

restive turret
#

You can load your samples by orbis iirc

slate flume
cosmic echo
upper vapor
restive turret
celest thorn
upper vapor
#

So it had no net id

#

Nothing

celest thorn
#

no it wasn't in the spawn

slate flume
#

What are you talking about rn

#

I'm not that smart

restive turret
#

The if statement

slate flume
#

Yes

restive turret
#

The 1st and the 3rd is basically the same.
And I guess ALL of the checking stuff inherit from CEH

forest sentinel
celest thorn
#

wait wtf its 9am already

pine parcel
restive turret
#

:sob

celest thorn
#

i just woke up too tired yesterday

celest thorn
upper vapor
restive turret
upper vapor
#

Oh it's already been answered mb

forest sentinel
pine parcel
#

ah damn, I'll have to figure it out in LabApi

restive turret
teal junco
#

audioplayerapi is fire

#

lab api's audio transmitter is also great

restive turret
#

The whole file iirc

teal junco
slate flume
pine parcel
teal junco
slate flume
#

WAIT

#

Idea

celest thorn
#

i have a question that is stupid i know

restive turret
celest thorn
#

but how tf does the game interpret the position

#

because if i position myself on top of the primitive nothing happens

#

but if i position myself inside of it it does

restive turret
celest thorn
teal junco
cosmic echo
# pine parcel do you have any code examples or repos?

to just play an audio using a speaker in labapi with no other api it should be as simple as like

SpeakerToy speaker;
// set controller id, whatever else you need
speaker.Play(SomeClass.GetAudioSamples("path");

you'd have to make SomeClass.GetAudioSamples yourself to get the pcm samples from a file

restive turret
#

Ax did the same but I ain't see none of it

#

๐Ÿ˜ญ

upper vapor
teal junco
cosmic echo
#

currently i just use nvorbis to load it into memory bc i dont have any long audio files and im lazy

#

but i might do streaming sometime whenever i need it maybe

south socket
teal junco
#

sometime i can publish my ogg streamer

cosmic echo
#

๐Ÿ™

teal junco
#

its kind of specialized but the code isnt hard to copy

cosmic echo
#

i think i have code somewhere that does it but i dont need it enough to put in the effort to add it yet

restive turret
#

2 more years and axwabo will make his public ๐Ÿ™

slate flume
#

@restive turret

#

What

#

But custom settings is not

#

Okay

teal junco
slate flume
#

Let me change this

cosmic echo
teal junco
upper vapor
# slate flume

Can we ban putting the one line code in the same line as the if statement

restive turret
slate flume
#

Trust me

teal junco
#

keep in mind what im sending you wont work out of the box for everything youd wanna do and youll have to sort through some spagbetti code to get to the good stuff

slate flume
#

Does that

#

Look good?