Browse Search Popular Register Upload Rules User list Login:
Search:
A More Final Goodbye!

Image:
screenshot of the scene

Author: Xray

Group: Default

Filesize: 158.17 kB

Date added: 2022-06-16

Rating: 5

Downloads: 3175

Views: 1083

Comments: 31

Ratings: 4

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

Just showing what can be done with a tiny bit of scripting. :)

I copied this scene from Cameron_Boy's scene hello and goodbye 143 and I made a couple of changes to it.
Last edited at 2022/06/16 05:52:39 by Xray
Please log in to rate this scene
edit
Similar scenes
Title: Little Object Camp 5B
Rating: 5
Filesize: 451.94 kB
Downloads: 119
Comments: 0
Ratings: 1
Date added: 2017/08/21 19:21:53
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Goodbye Algobox :)
Rating: 6.1111
Filesize: 139.11 kB
Downloads: 2559
Comments: 25
Ratings: 3
Date added: 2017/11/06 23:17:54
Made with: Algodoo v2.1.0
Rating: rated 6.1
download
Title: GOODBYE 2021
Rating: 5
Filesize: 17.06 kB
Downloads: 722
Comments: 0
Ratings: 1
Date added: 2021/12/31 13:22:27
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Algicosathlon Day 16
Rating: 5
Filesize: 69.71 kB
Downloads: 515
Comments: 4
Ratings: 1
Date added: 2017/01/18 12:17:27
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: TWOW 1 Results
Rating: 5
Filesize: 1.32 MB
Downloads: 396
Comments: 9
Ratings: 1
Date added: 2016/08/30 13:48:17
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Algoquinmarblatathlon Day 33
Rating: 5
Filesize: 0.52 MB
Downloads: 380
Comments: 0
Ratings: 1
Date added: 2018/12/16 09:57:11
Made with: Algodoo v2.1.0
Rating: rated 5
download
This scene is a response to
show list
Title: hello and goodbye 143
Rating: 5
Filesize: 120.4 kB
Downloads: 716
Comments: 0
Ratings: 1
Date added: 2022/06/16 00:05:23
Made with: Algodoo v2.1.0
Rating: rated 5
download
Comment page previous | 1 2 | next
Been a while, Xray. I've been out doing productive things with my life lol, like enrolling in Google's IT course, etc.

Anyway, I got inspiration from a game called Rain World, to try and produce a very basic social AI based on the creatures in the game, including basic concepts like making friends and enemies, as well as implementing actual behaviors associated with these internal concepts, like protecting, self-sacrificing, and attacking.

The basic hardware I'm using to house this code is a single square box and an attached laser that freely rotates based on a _local in the box. However, I don't want to have almost every control managed by the left hand, and I want to be able to change the laser's maxRays based on whether or not left click is held down. Do you know if there's any way to do that? Thanks btw.
Quote: "an attached laser that freely rotates based on a _local in the box."

Ans: You did not specify what that rotating laser is used for.

Quote: "However, I don't want to have almost every control managed by the left hand"

Ans: Are you referring to keyboard keys that the left hand would be pressing as needed?

Quote: "and I want to be able to change the laser's maxRays based on whether or not left click is held down."

Ans: Sure, I think that would be fairly easy to do. But rather than to just spit a few lines of code at you, it would be better for me to create a simple scene that demonstrates the function. That way the code would be designed, tested, and debugged to make sure it works as expected.
Ah, I'll never stop forgetting the details.

"You did not specify what the laser is for."
What the laser does on hitting something probably has nothing to do with finding code to make it turn on with a click, and I haven't made a final decision yet on what it should do, but at the moment, it decrements the _health var of any hit entity that has one. The most relevant information I can provide is that I want to be able to switch from click-controlling one laser exclusively to exclusively click controlling another. I can already do this with keys.isDown() but I doubt I can just fill it in with every variation of "mousebutton1" and expect it to work. Best case scenario, there is a keycode for left and right click, and this would be figured out by the end of the day, but knowing how old Algodoo is and how other really common language features never made it into Thyme, I have my doubts.

"Are you referring to keyboard keys that the left hand would be pressing as needed?"
Yes, and I'd like to prioritize speed, meaning I want to minimize the buttons that one finger has to operate and evenly spread the controls between the hands as much as I can. Right now, the current controls look like keys QWEASD all operated by the left hand and just the movement of the mouse in the right hand. I can't find any relaxed hand posture that can properly use all of these keys, not to mention the fact that at least one finger will have to operate 2 buttons.
Okay. And just as a general suggestion, the fewer control keys that you can make the game work with, the better. I'm an "older" guy who has trouble remembering all the control keys in a complex game. So, if the game has more than say 4 or 5 control keys to remember, it's a good practice to have a text box always in view which lists the control keys. If you don't do that, then the player will be forced to pause the game so they can look up the list of keys to press. Maybe others don't agree with that, but it's my personal opinion.

Okay, if you could let me know how you want the mouse click to operate, I will try to post a simple scene which demonstrates the function. After you had a chance to download it, I will delete it. I will title it: "For UDG04 test".

Now I need specific details about how you want the control key to work. For example:

* When player presses left mouse button while cursor is on laser, laser MaxRays will increase by 1.

Also let me know if you want rapid continuous increase (after a short delay) when left mouse button is HELD down. I need every detail so that it works exactly how you expect it to.
Awesome. I forgot to mention how the maxRays is actually controlled. As with its rotation, the maxRays variable is set to a variable called _laser in the box.

I want some code that sets _laser to 1 when the mouse is pressed down anywhere in the scene, and set to 0 when it is released, a bit like a keys.isDown() conditional.. And that's all there is to it. I more or less know the ins and outs of Thyme now, so if I need anything more than that after I have such code, I'll be able to figure it out.

Also, if it means anything, I want to be able to move the mouse while holding down left click without messing up anything, which probably means not using an onClick in a mouse-following box or something similar.

Thanks for the help, by the way.
Just to make sure I understand you....

You want a local variable named _laser in a box to be set to 1 when the left mouse button is pressed, then set to 0 when left mouse button is released. Also, you want the value (1 or 0) in _laser to be transferred to maxRays in the laser. Is that correct so far?

If that is correct, I'm wondering why not simply make left mouse button tied directly to maxRays instead of going through that local variable _laser? It would be much simpler.

EDIT: One more question: Do you want the laser to be attached to the box or separate? (that will determine the type of script I will use).

EDIT2: Here is the scene I created for you: For UDG04 test The laser can be attached to the box or separate. The code is the same. Hope it works the way you expected it to!

EDIT3: I just realized that I made another example scene for you back in September 2020. It had just a box and a laser too! :lol:
Last edited at 2022/06/21 05:30:07 by Xray
Don't worry about all the technical details around the mechanism, all I needed was to know if there was a keycode that referred to the mouse buttons just like the keycodes that refer to SHIFT, ENTER, etc. My problem's solved thanks to you!
Great! I'm glad I was able to help. :tup:


Oh, and in case you haven't figured it out, it also works with "mouse_right" and "mouse_middle". There's also a script for mouse scroll wheel but I never was able to make it work, and I still don't know why.
Last edited at 2022/06/21 22:17:43 by Xray
Cool, I'll see what kind of things I can pull off with this code!
Oh, one more question, though. My mouse is a basic gaming-grade mouse with the two extra buttons where the thumb sits. Do you know if there were ever keycodes added for those buttons?
Last edited at 2022/06/22 00:34:45 by UnityDogGaming04
No. The only mouse keys I know about are the ones I already mentioned. THIS is the actual mouse that I use on my desktop computer. (I know you've seen that scene before because you left a comment). :x
Last edited at 2022/06/22 03:22:23 by Xray
Everytime I open some scene, and I click on an Algodoo account name, my Algodoo automagically closes itself. Why?
I don't know. Try resetting Algodoo.
It only happens when I click on the user matto
How to get the current FPS of a scene with scripting?
Quote: "It only happens when I click on the user matto"

Question: Does it happen when you click his user name, or does it happen when you download and run any of his scenes? If we're going to figure this out, you must be very specific about what you do and what you see.
Here are all of the cases of my Algodoo crashing.

(clicking on a scene matto made or clicking on matto profile)

(could be even with a comment from matto)

(but not looking at matto scene from a list of scenes)
42flowermaster -- Maybe you have viruses on your computer or some files of the algodoo program on your pc are damaged, when i click on the user matto it doesn't crashes to me, i use Windows 7 Ultimate 64 bits on a laptop
I never heard of that problem, but the one thing I thought about is the fact that matto has a YT channel, and he posts many links to his videos in his scenes. So maybe your browser doesn't like those YT links for some reason and crashes.

You might try downloading the latest version of Algodoo from this website in case yours is corrupt. If that doesn't work, try switching to a different browser. For example, if you currently use Edge, try FireFox or Chrome. Other than those things, I don't know what else might cause that issue.

Sorry :(
Xray - Okay! It is not really a problem though it can be annoying.

NOTE - I got Algosound finally (for windows 10) and may try to implement it in one of my future scenes. It actually works very nicely!
Hey Xray, even thougth this has nothing to do with the scene, what was the first operating system you used? Mine is Windows xp and yes, i did use windows xp,
and what are your favorite operating systems? mine was windows xp, windows vista, and 7.
Last edited at 2022/07/05 20:15:32 by MyNameIsThis
I've used mainframe industrial computers before home computers were available for the general public. So, yeah, that was a long time ago!

The first operating system that I used with a home computer was DOS 3.1. That was a text-based operating system that was used before Windows came out. I think it was back in the early 1980's. (Yup, I'm old! LOL)

My favorite OS? Probably Windows 7.
Last edited at 2022/07/05 23:38:15 by Xray
and also i used windows xp for the first time in 2013 (i was 3 in that year)
also there is my operating system timelines:
Windows XP 2013-2015
Windows Vista 2015-2018
Windows 7 2018-today (yup, i still use windows 7)
true magic.
:o
Now everytime I click a scene made by matto, Erikfassett, and s_noonan I get my Algodoo closed? Does Algodoo detect a common characteristic of those users that glitches the scripts on Algobox?
42flowermaster -- I have no idea what might be happening. No one else has complained about that issue besides you. Sorry.
OMG XRAY NUMBERBLOCKS REAL???!??/!111
How do I do text I play on mobile?
Noahphil -- I don't understand what you mean by "do text". Please be more specific.

I have a question for you. I looked at all of your scenes and I see that in every case you upload TWO scenes of the same kind and then you delete one of them! Why do you do that? :s
There used to be a bug I used to have where you have to upload the same scene twice, and then it lets you make one, which is silly since you used to be banned for making 4!
Comment page previous | 1 2 | next