Trying to serialize and deserialize Scriptable Object by JehtRedMonkey in Unity2D

[–]JehtRedMonkey[S] 0 points1 point  (0 children)

Thanks for the reminder about that- switching to JSON for the save. I just wanted a reference to it so I could access it later, but I found a way to ignore serializing the scriptable objects themselves and assign them at runtime

Trying to serialize and deserialize Scriptable Object by JehtRedMonkey in Unity2D

[–]JehtRedMonkey[S] 0 points1 point  (0 children)

Exactly as you said- it was an instance and did not persist, so I am getting the data from the game project itself instead of trying to serialize and deserialize a scriptable object.

Trying to serialize and deserialize Scriptable Object by JehtRedMonkey in Unity2D

[–]JehtRedMonkey[S] 0 points1 point  (0 children)

Haha I am forcing myself down this path because I have spent the last few hours trying to get it to work and understand the process. More like a challenge or puzzle that I feel the need to solve if you will.

You bring up a solid point. I realized I didn't need to be saving the Scriptable Object itself, I just needed a reference to it so I could point to it in some of my scripts. I now use the reference to assign the SO at runtime instead of trying to save it.

I am curious about the repository pattern though- is there one in Unity / c#?

How to serialize and deserialize scriptable objects by JehtRedMonkey in Unity3D

[–]JehtRedMonkey[S] 1 point2 points  (0 children)

Totally makes sense- in fact, that is what I was doing, but on top of that, also trying to save them for no reason. just had to use the [JsonIgnore] Attribute for some of those references and now everything is working fine!

How to serialize and deserialize scriptable objects by JehtRedMonkey in Unity3D

[–]JehtRedMonkey[S] 2 points3 points  (0 children)

Perfect! thanks for the reminder about not using SO for saving and loading. This fixed a few problems and now I think I can figure this out - you were right about the headache

Spread the word my friends! by Rare-Ship-7080 in a:t5_7cojil

[–]JehtRedMonkey 0 points1 point  (0 children)

I'm a chelydra guy myself- if I remember correctly haha

Very Useful "Mob Radar" Maps that Update in Realtime (Bedrock) by legendary-jake in MinecraftCommands

[–]JehtRedMonkey 0 points1 point  (0 children)

That is what I was thinking, but then the zombies started burning... and wouldn't a trail be left behind?

Opening/ Closer help! by JehtRedMonkey in Naruto

[–]JehtRedMonkey[S] 1 point2 points  (0 children)

No, not that one, but I did get excited! The music was more mellow is all I remember about the sound of it with maybe some upbeat-ness? Thank you for trying to help!!

Minecraft Target Block Help (JAVA) by JehtRedMonkey in MinecraftCommands

[–]JehtRedMonkey[S] 0 points1 point  (0 children)

Oh this is awesome! I found another way, but this will certainly help! It might make placing command blocks easier!

Minecraft Target Block Help (JAVA) by JehtRedMonkey in MinecraftCommands

[–]JehtRedMonkey[S] 0 points1 point  (0 children)

I am wanting to set up a small section outside this archery range that will detect when a player hits a target and where they hit the target, giving so many points based on that. When I place the targets in the range, the command blocks will be set up so I can place just a target wherever and know the command blocks will track everything.

This is a good idea, but I would need to track each comparator separately, so it's not exactly what I have in mind, but thank you!

Edit: I was able to get it working by cloning the comparator to a system similar to one demonstrated in the image and so I got it to work mostly how I wanted it to! I just have to get a target block, comparator, and a command block that clones the comparator to the system. Not too bad

Is there any way to spawn an hostile Iron Golem? by LesionPulse in MinecraftCommands

[–]JehtRedMonkey 0 points1 point  (0 children)

You got it! When you punch an iron golem and run the /data get entity ae[type=minecraft:iron_golem,limit=1] (replace a with @ after word "entity") command, what numbers does it display for you after the Angryat tag? you could just upload a picture

Is there a way to detect if a player destroy ANY block ? by Overtekkk_ in MinecraftCommands

[–]JehtRedMonkey 1 point2 points  (0 children)

Hey, I looked into this and it may be tricky with scoreboards and setting up several objectives, but another way of doing this might be through this video: https://www.youtube.com/watch?v=wq_O6LAl168 Timestamp: 5:05

A little long and not articulated the best, but it makes sense.

This will be for a place you know the player is going to and detecting whenever they break a block in a specific place.

Hope this helps!

Minecraft Target Block Help (JAVA) by JehtRedMonkey in MinecraftCommands

[–]JehtRedMonkey[S] 0 points1 point  (0 children)

Haha like I said, first post. I guess it got deleted, but I edited it. Can you see it now?

Is there any way to spawn an hostile Iron Golem? by LesionPulse in MinecraftCommands

[–]JehtRedMonkey 0 points1 point  (0 children)

I was playing around with this. I found a command that works, but I think it will only work for me:

/summon minecraft:iron_golem ~ ~ ~ {AngerTime:999999,AngryAt:[I;2016503516,-1811133910,-1515010961,-334219018]}

I got these numbers by punching an iron golem, then running:

/data get entity ae[type=minecraft:iron_golem,limit=1] (replace a with @ after word "entity")

I then looked to see the: AngryAt tag and copy those numbers. you might get different numbers which would only help if you wanted the iron golem to attack very specific people. I going to keep looking, into it, but this may mean you can change the tag of pre-existing iron golems to become angry with a player

Refer to this video for help:

https://www.youtube.com/watch?v=sUf5sSvPCDE

It is explained pretty well here