- Joined
- Dec 6, 2015
- Messages
- 300
- Reaction score
- 390
- First Language
- English
- Primarily Uses
- RMVXA
I’m learning XP scripting. I’m creating a level up system, or I guess I should say, I am very heavily editing an existing level up system created by someone else because the whole scene/window relation is a bit confusing (but I’m slowly learning as I’m editing this script). I was in the help section of the RMXP scrolling through the Ruby XP Universe, and I have a series of questions because the help section isn’t clear enough for me.
1. If you have an array like $Jesus = [1, 2, 3], and I do $Jesus += 3, from what the help section said, it sounds like they’re saying the 3 is added so $Jesus then becomes [1, 2, 3, 3] correct? It says it turns non-arrays to “to_ary” in this instance which I assume means if I don’t add another array to the existing array, the program automatically turns it into an array to be added, right?
2. In continuation of Question 1, if I did another array like $Christ = [4, 5, 6], I assume the order in which I add them together determines the order of the numbers? So I could either have [1, 2, 3, 4, 5, 6] or [4, 5, 6, 1, 2, 3], right?
3. How do attribute readers work?
4. A part of my script was very program-intensive meaning the blinking of the cursor was starting to blink very slowly due to all the refreshing. I have sense fixed it, but I have a Geoforce RTX 3090 so let’s pretend I didn’t fix it. Would it blink slower if on a weaker computer or is it a burden only the program itself endures?
5. Similar to Question 4, this isn’t scripting, but if I were to have 20 Parallel processing common events going on at the same time, does the PC endure that (so the weaker, the slower) or is that just the program?
6. Similar to Question 3, I noticed that local variables can be used in other scripts. If I made a local variable called @Bob, can I just run attribute reader in any script to “link” @Bob? Is there only certain scripts I can do that?
7. In the help section under “String”, it has something called “clone” but literally says nothing on what it does. I’m thinking maybe clone a string (as the name suggests), but it feels like a wasted feature since it's not like you can ONLY use a string once in a script, or am I missing something?
8. Lastly... what are you doing for Christmas? I’m going to be hanging out with my Dad.
1. If you have an array like $Jesus = [1, 2, 3], and I do $Jesus += 3, from what the help section said, it sounds like they’re saying the 3 is added so $Jesus then becomes [1, 2, 3, 3] correct? It says it turns non-arrays to “to_ary” in this instance which I assume means if I don’t add another array to the existing array, the program automatically turns it into an array to be added, right?
2. In continuation of Question 1, if I did another array like $Christ = [4, 5, 6], I assume the order in which I add them together determines the order of the numbers? So I could either have [1, 2, 3, 4, 5, 6] or [4, 5, 6, 1, 2, 3], right?
3. How do attribute readers work?
4. A part of my script was very program-intensive meaning the blinking of the cursor was starting to blink very slowly due to all the refreshing. I have sense fixed it, but I have a Geoforce RTX 3090 so let’s pretend I didn’t fix it. Would it blink slower if on a weaker computer or is it a burden only the program itself endures?
5. Similar to Question 4, this isn’t scripting, but if I were to have 20 Parallel processing common events going on at the same time, does the PC endure that (so the weaker, the slower) or is that just the program?
6. Similar to Question 3, I noticed that local variables can be used in other scripts. If I made a local variable called @Bob, can I just run attribute reader in any script to “link” @Bob? Is there only certain scripts I can do that?
7. In the help section under “String”, it has something called “clone” but literally says nothing on what it does. I’m thinking maybe clone a string (as the name suggests), but it feels like a wasted feature since it's not like you can ONLY use a string once in a script, or am I missing something?
8. Lastly... what are you doing for Christmas? I’m going to be hanging out with my Dad.