#I can't switch from spectator to any other gamemode

1 messages · Page 1 of 1 (latest)

brazen kernel
#

Index of event-slot not just event-slot

calm wigeon
#

Event-slot is the item in that slot
index of event-slot is its position in the gui

#

I would just use the item though; event-slot = grass block named “creative”, as that way you dont need to remember what number corresponds to what item/action

brazen kernel
#

Also, use else ifs

brazen kernel
#

what was your code

brazen kernel
#

did you do this

#

send the code then

#

code block

#

Are you sure event-slot is an eye of ender named "&bSpectator"?

#

Send me the code where you set that slow

#

slot

#

Put broadcast "test" before it sets the player's gamemode to spectatort

#

tell me if it sends that test

#

Yes, I do indeed

calm wigeon
#

maybe its just cause spectator interacts with GUIs differently

brazen kernel
#

that's true

#

close their current inventory

brazen kernel
#

you closed it after

raw badger
#

Yea try closing it before changing the gamemode

brazen kernel
#

instead of before

#

so close it before

#

wait a tick, then

#

and send your code if it doesn't work

raw badger
#

wait a tick

brazen kernel
#

before changing the gamemode

#

Send

#

your

#

code

#

:/

#

wait,

#

did you even keep the setting gamemode code

#

It seems like it's deleted there

#

Does it still broadcast "test"?

#

current* inventory

#

not player's inventory

#

player's current

#

inventory

#

Try a console command

#

?

#

yes

brazen kernel
#

??

#

execute console command ""

#

Send your code

#

and did it work?

calm wigeon
#

i guess not

#

cause normally in spectator you can open chests and stuff, but not move the items

brazen kernel
#

no I'm saying

#

execute console command to set their gamemode

calm wigeon
#

i guess set them to survival first

raw badger
#

You could also do a psuedo spectator mode

Make them invisible and let them fly

calm wigeon
#

"the" isnt really required

#

its usually optional

raw badger
#

Theres the SKUnity Docs

#
brazen kernel
#

check the docs

#

on damage

raw badger
#

Check if damage was dealt, then check what dealt the damage

brazen kernel
#

Or

#

just check the tool used ig

#

if you meant actually fists

raw badger
#

For fists I like to check if the tool is air

#

I like to use this one to search for something

brazen kernel
#

Skripthub is good too

raw badger
#

Yea, I find that one the easiest to search, and then I like Skripthub for more examples

brazen kernel
#

inf?

#

what??

raw badger
#

Infinite I assume

#

so probable a boolean

brazen kernel
#

Infinite time, yes a boolean

raw badger
#

are you applying it to a player

#

other way around

#

On the docs they often have examples like this

#

That can help with weird syntatic things

#

victim comes from somewhere else

#

send the code

#

if player has potion invisibility:
remove invisibility from the player

#

Send the error

#

try event-player maybe

#

If not im stumped, you might have to google it

#

nice send it

#

Ehh it takes practice to get better at it

#

Trial and Error and this discord I found to be the best to debug small things like that

#

Loops and lists are always great to practice

#

Nah

#

They are skripts arrays

#

Storing and looping though lots of info

#

Like every player in the server

#

When you do loop all players: It technically loops through a list called all players

#

Yep projectiles are weird because vectors so good luck

#

I can help with that

calm wigeon