SubmergedAmongUs / Submerged

An Among Us mod which adds a new underwater map
Other
102 stars 17 forks source link

How can i make an event happen after floor choosing? #156

Closed PHGaming121 closed 5 months ago

PHGaming121 commented 5 months ago

i want to do something like: when everyone select floor, everyone will get teleported to a random place of the map

this places are already defined by me

didnt select a template because theres no "code help" template ._.

AmongUsafk commented 5 months ago

what do you mean ? if u wante Change players floor use FloorHandler.RpcRequestChangeFloor(bool isUpper)

AmongUsafk commented 5 months ago

i Recommande you to see at source code

PHGaming121 commented 5 months ago

if u didnt understand, after every player spawned, everyone will get teleported to a random place (that i already defined)

so the steps are: 1: enable the option of Random Spawns 2: Start the game 3: Select floor 4: after everyone selected floor, everyone will get tped to a random place

Alexejhero commented 5 months ago

After the spawn in system finishes, you can just send an RpcSnapTo to teleport the player

PHGaming121 commented 5 months ago

which method should i use?

PHGaming121 commented 5 months ago

for checking if spawn system is finished

Alexejhero commented 5 months ago

You can do something like transpiler patching this Deteriorate method here or by checking the state in an update loop