How can I activate and deactivate the spawner in time? - unity3d

I want the "Spawner Script" to stop and the "Reward Gold Spawner Script" to be active in the second picture, as shown in the 1st picture, when I click the Star Gameobject, and after a certain second I want the "Spawner Script" to be active again, but I could not do it in any way. How can I do it?
I tried a lot of things but couldn't, for example spawner scripts don't work and when I call after certain seconds it didn't call.
!Not: I solved the problem I forgot to put a loop I don't know how I overlooked it.

Have you tried disabling and reenabling the object with the script? object.SetActive(false).
If I understand your question right.

Related

Navigate To at start up simulation

When I run the model, I want my model to go to the viewarea of the simulation parameters in the agent of this user interface. So at the simulation and java actions I added this by the next code (also a screenshot is added at the bottom):
root.uI_startUP.SimulationParameters.navigateTo();
The strange thing is when I run the model for the first time, he goes for like 1 second to this view area, but then automatically returns to the main agent. When I stop the model and restart it again (and keep the run window open), this problem is not happening and it is staying in the good user-interface agent view area.
What could be the reason behind this? and how can this be solved.
Added later:
At the moment I fixed it by creating an event which is triggered by the variable start==true, and after that navigates to the interface and sets this value to false. see figure below
This works, and seems to be a solution.
But I'm still curious why the first method is not working..
Seems to be the code in "Initial experiment setup" that messes here.
Remove both code snippets and only call uI_startUP.SimulationParameters.navigateTo() on the "On startup" of Main.
This is how you should do it anyway :)

No function dropdown in AnimationEvent in Unity

I try to handle some events during animations, but everywhere I look, every tutorial have access to AnimatorEvent Inspector like this:
A nice simple field, where you can select a function, I want this!
But instead of this, I always getting this sick 5 fields view, and don't have any idea how to handle animation event in this case!
I tried to create function test() with debug log, but it didn't work anyway. Why I can't get access to this simple window where I can choose an function?
You will need to add this animation into a State in Animator Controller (via Animator Window).
In the object which contains Animator component, attach your script component to it.
Open the Animation window, select the object above, you will see a dropdown of animations (top left) which Animator Controller of this object contains. Choose and add event to the animation you want to.
Select the event in Animation Window, in the Inspector, you should see the dropdown of public functions of your script component attached above.
Answer by Aluminium18
Sometimes it doesn't work even if you do all things according to tutorials or advices in internet. I often leave Unity editor launched for a long time without any interactions with it. After several gibernations and several days it can get buggy - various errors appear, you can't see some functions from scripts and so on. So, just reloading the Unity editor solves many of such issues for me. And it continues to happen so for several years no matter what Unity version you have. I tried versions from 2019.x.x to 2022.x.x - all this time Unity behaves itself the same.

How do i make it so a player can talk to a bot on roblox?

I want to make it so after someone spawns they can look at a NPC and hold "E" then after they do that i want a screen gui to appear and tell them what they need to do. i want it so after they are done reading they can click "DONE" and the gui will dissapear. please help me with this code.
they can look at a NPC and hold "E"
Try using a ProximityPrompt for this. As 1BL1ZZARD said, you could use Dialogs for the
i want a screen gui to appear and tell them what they need to do. i want it so after they are done reading they can click "DONE"
However, you could also use a ScreenGui with the ProximityPrompt and make it Enabled with ProximityPrompt.Triggered:Connect.
Would these answer your question? https://developer.roblox.com/en-us/articles/Usage-of-dialogs / https://developer.roblox.com/en-us/articles/Designing-a-Dialog-Tree

Unity Visual Scripting Variable

I have a scene that has 3 buttons, one for each level. I made buttons 2 and 3 uninteractable and I want to make it so when you win the 1st you can start the 2nd etc... So I have unchecked the interactable box from the options of button2. Then I went to the script of my player and I have connected the following parts so when he completes the 1st level the button 2 gets to be interactible. But there seems to be an issue.
(This answer only applies if you were loading new scenes.)
Perhaps, the problem is that you can’t save a variable telling which levels are allowed. (Unless you do it through, an actual save mechanic.) this is because unity destroys all objects in a scene when loading a new scene. This removes all data stored in variables. You could get around this from using
DontDestroyOnLoad(gameObject);
this saves the gameObect variable you put in the parentheses through scene loading. You can attach a script that would store the variables to this, to save information.
If you can’t figure out how to get the variables from other scripts, use this:
var newVariable = GameObjectVariable.GetComponent<scriptName>().variableName;
I see you were using visual coding, so if you can try and figure out how to find these methods in there, it should work.
If you want to use actual save mechanics, go to this link:
https://docs.unity3d.com/ScriptReference/PlayerPrefs.html/
Set Variable need to receive a flow input.

Roblox | Help Fix Cutoff GUI's in Billboard GUI

Right now, I'm working on Server Fixing Simulator.
I'm working on the Error Popup GUI.
I wanted to add the Error Icon.
The ImageLabel gets cutoff.
The ImageLabel is CutOff! WHAT A WAY ROBLOX MAKES THE GUIs! HOW NICE
so I need help fixing the Cut-Off GUIs.
Problem Info -
When the Properties Menu looks like this
And the ErrorIcon looks like this.
It just makes me mad.
This happens a lot in Roblox. When an image is new, it looks like that for about an hour. I suggest you wait a little bit or upload a new one.