I'd like to make the test that would look like:
You have to drag and drop the words into right categories. There is a kind of quiz "drop and drag onto the image" in Moodle, but there is a problem that each possibility has only only one right room to place. But in my test doesn't matter on rank, only on the right category.
Concretely: The dog and the lion belong to the category animals. But it doesn't matter if the dog is the first or second. Is any possibility to solve this?
Related
Hello I'm new here so sorry about that. I have a project where I have to write a program for a car wash with Siemens TIA V16. I want to visually simulate this program with my HMI (TP700 Comfort). Whats the best way to convert my vars so that i can simulate it. The blue bar is my door, the white one is for my washing system and the grey for my fan. I want them to move like the would physically.Simulation of the car wash
In your PLC, create tags to define the dynamic position of the objects:
In the HMI, add Movement animations to objects as required. For Tag Name, specify the tags you created above:
I do not discuss here how to add PLC tags to the HMI. But you can in fact browse to the PLC tag in the Tag Name field, and the software will do the rest for you.
Probably a stupid question but anyway: I have a grid layout for my inventory (Unity 2D 2020) and I would like it so when I pick up an item the inventory displays the items in the order that the gameobject is activated. Currently, if I have an inventory with the hierarchy order as apples, oranges and lemons it looks like this:
apples | oranges | lemons
And if I have no more oranges it looks like this:
apples | lemons
But if pick up an orange at a later time it pushes lemons to third and oranges goes back to being second place instead of being third.
Is there any way to make the grid layout follow the order the items are activated?
I hope this is clear - I suck at explaining things, I'm sorry.
Thank you!
From what I understood, you want to create inventory by sorting what items you get first.
In UI setup, you can have Parent GameObject, let's call it "Panel", with Grid Layout Groupcomponent and make prefab of that. Also make another Child GameObject of Parent and call it "Container" and make prefab of that too. Lastly you should have prefabs for Apple, Orange and Lemons.
The Panel will always be there in hierarchy but you will Instantiate each container when you have new item, for example if you get Apple, you will instantiate apple container inside Panel. Check if you have already instantiated apple container, if not then just add apple gameobject. Do this for other items as well. The instantiated container will always be next in UI.
Sharing some UI setup image I did. (This is only to make you understand)
UI Setup, showing Panel and Container
Panel Component configuration
Container component configuration
Output window
Let me know if you need more assistance.
I have a bunch of Tank objects inserted into a quad tree. Some of these tank objects can be clicked on if they implement a Clickable interface. The problem is that in order to know what is being clicked, I need to query the same quadtree, but the quadtree has both clickable and non-clickable objects in it.
Potential solutions:
I could using instanceOf to see which ones in a specified region were clickable when the user clicks the screen, but I hear that using instanceOf is bad practice.
I could maintain TWO quadtrees. one for just tanks, and one for clickable objects. But then I could have to update tanks that implement the clickable interface TWICE since they would be in two seperate quadtrees, which would be slow considering I have to update every step, and people only click the screen every so often.
I could only insert clickable objects into the quadtree, and simply make non-clickable objects define dummy click methods. This would solve the problem, but it doesn't feel right because if something is non-clickable, then it shouldn't be implementing a clicking methods to begin with even if it is an empty one. Or is this ok?
I'm thinking #3 is probably the best way to do it, but I'm not sure. Any pointers?
EDIT: Now that I think about it, #3 would have some problems dealing with overlapped clicks. If a non-clickable tank overlaps a clickable one, and I click in the overlap section, unless I call all click methods for everything at that point, I could end up calling the click method of the wrong tank. To avoid doing THAT, I'd have to use instanceOf and find the clickable object and only call ITS click method.
So maybe #2 is better because I could easily cycle through all clickable objects at the clicked region and choose the one that is either at the top, or closest to the center of the region, and only call that tanks click method.
It could also not necessarily be that they overlap, but are just close together. If I were to make this game touch based, your finger isn't a point, but a region, so it might be better to cycle through objects in a region and find the closest clickable object, which would be hard to do with 3# without sifting through a bunch of non-clickable objects.
#3 sounds pretty good. You could maybe enhance it by creating another interface that ALL your objects implement, for example "GameObject", which has a method "isClickable". Then you can have your clickable objects implement a "return true" for isClickable.
There is an app call DurionLite (free on iPhone) which plays a word game where letters are clicked and dragged into word construction slots to create words. As the dragged letter gets near the construction slots, the borders of the nearest construction slot is highlighted and if you then release the letter, it goes into the highlighted construction slot. You can also then click and drag letters from the construction slots (although not back to their original locations). I'm trying to do a similar thing but can't figure out how that can be done. Can anyone enlighten me?
The second one worked man. It seems more complicated but part of the code doesn't even need to be there.
I have the following problem. I want to relaunch a tool that displays the relationship between multiple objects. In this case there are numerous works of art, each is more or less related to all the others. In its inital state the display shows all objects (represented by a thumbnail and/or title) in different clouds depending on the main category each object belongs to (think sculpture, painting, poem etc.). When a user clicks on an object, all objects are rearranged: the clicked object is displayed in the center, all other objects arre arrange arround it. The closeer they are to center, the closer they are related (depending on additional parameters).
The current version of the tool can be seen here: http://atlas.taswir.org/
The relauch is necessary due to several issues: currently it's flash based, it is a very clunky solution pieced together by several long gone devs, to add new items the XML file of doom has to be hand-edited etc.
Which (finally :) brings me to a question: I'm sure that this is not a unique problem. Are there any tools, frameworks, classes... anything that can be used as a starting point to get a better result? I'm not sure what to look for. HTML5/PHP would be ideal, but I'll take nearly anything.
Check out d3 Force Layout. It can give you the layout and interactivity you are looking for.