Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - supremelorax

Pages: 1 2
Ask a Question / Re: Detecting Image Instances in a List
« on: June 28, 2020, 10:53:25 am »
I don't have much experience or knowledge about maps, so I am working on changing that now.

Basically I have image instances that are moving back and forth between two lists and being moved to certain regions. One list must remain in order. The second is in order of placement from the first list. Sort of like a bus with two rows of seats. One row keeps tracks of everyone in order. The second row, anyone can sit anywhere, but remembers their first seat if asked to go back. Then they can change their seat in the second row if they like. This is all happening on four simultaneous sets of these lists.

So far... no go on detecting an instance in a list. I can keep trying a few things though.

Might there be a way to add regions to a list by using their name and some creative attributes? They are consecutively created so it is region14, region15... I feel like I could loop this easily if I can find an acceptable way of changing the number in the name by one each time.

Ask a Question / Re: Detecting Image Instances in a List
« on: June 28, 2020, 10:37:40 am »
Thank you Luyren. The only thing about image instances, wouldn't that be like looking for one actor in a sea of actors.
I just want to know if any actors are there. If a specific isn't there it would return a false.

The other thing I am working on in this code is finding regions on a list. I saw a post from a while back about:
For Each 'actor of group': Regions
add 'actor of group' to 'list'
Any confirmation on this working? I am still working through various combinations but would love an earlier confirmation.
I know they can be added manually but... that ins't preferable.

Ask a Question / Detecting Image Instances in a List
« on: June 28, 2020, 10:13:57 am »
Greetings friends,

If 'list' contains 'instance of (image)'
trigger anything or am I missing something to make this work?

Thank you.

Ask a Question / Re: Emptying and Copying Lists
« on: June 27, 2020, 04:37:40 pm »
Thank you. I really appreciate your answer Luyren. By the way I checked out your behaviours and youtube. Thank you for putting so much time into what you do.

Ask a Question / Emptying and Copying Lists [SOLVED]
« on: June 27, 2020, 11:06:20 am »
I am working with lists and am wondering if my understanding of the following functions is correct:
emptylist>deletes all values from list but keeps number of indexes intact
set to copy of list>copies all values from one list to another if set to an existing list

I have two lists; A and B.
0 - 1
1 - 1
2 - 0
3 - 0
4 - 0
5 - 0

0 - 0
1 - 0
2 - 0
3 - 0
4 - 0
5 - 0

If I empty B and set it to a copy of list A, will it look like this?
0 - 1
1 - 1
2 - 0
3 - 0
4 - 0
5 - 0

or this?

0 - 1
1 - 1

or this?
0 - 1
1 - 1
2 -
3 -
4 -
5 -

I appreciate your input.

Oh yeah. I am loving the image API. Consider this one solved friends.

Thank you merrak and Luyren. I think I might have figured it out. Check it out:

Greetings friends.
I am slowly getting the idea of using the image API. I have been able to create multiple instances and am working on using these in place of hundreds of actors. There is a lot to learn as I can tell. I am wondering if anyone could offer an example of creating multiple instances of an image and setting them to a list so that they can be accessed and changed. I understand the idea of how to accomplish this but have been sifting through the forum and google all day looking for the proper type and placement of the blocks to do this.
For my specific use I am creating 9 instances of a single image and I wish to resize all of them to 50%.
I appreciate any help on this.

Thank you Liberado for this. I will be working on playing with this later tonight if possible. My guess is that it will be as easy as setting the two actors who need to  change into each other with this behavior and capturing their x,y coordinates or drawing a region to make the switch? If I had 400 of these actors who need to change into other actors, would that be more taxing than 400 regions that can spawn or kill actors?


Here Liberado. If you load this and click in the bottom corner to go to 'Unit Division Board' you can try out this function I am describing. It works as intended but I am just looking for a more efficient way of going about it, or if this is the best way.

To get beads ready. Click on 'Fill' and then click on the cup to drop some in. Turn off 'fill' and click on the cup again. Then you can drop a bead in any of those divets. To drop another you have to click on the cup again. This works beautifully on a touch screen. Mouse or track pad can be annoying.

Liberado, thank you for taking an interest.

Here is an image of my region grid. I suppose this could be an actor grid.
I want to be able to tap on any of those, and have a single code check if the mouse has clicked there and then execute a code.

I was able to do this with a simple code that I replicated 81 times for these regions, which collects information and feeds it into another script that executes the following:
If nothing is there and cup (where objects come from) is not active: do nothing
If nothing is there and cup is active: place object
If something is there and cup is not active: put object back
If something is there and cup is active: do nothing

At this point I am just trying to save time as I am about to apply this mechanic across four similar programs. It doesn't take too long but is a monotonous procedure as I have to adjust two different attributes by one consecutive number. Let me know if you can think of an easier way to accomplish this.

Jovial, I am pretty new to this too but logic is something I enjoy in any form!

As far as game vs. scene attribute, it depends if you are going to need to store it over time throughout your game as if for game stats or the like (end game: how many times you fell... haha), for this I think scene attribute (blue) although if the same thing is needed in each scene (and it would work since it is just looking for that same variable) maybe that is where a purple one would come in handy. We would need a more experienced Stencyler to weigh in on that. 'When updating' happens once every time the game refreshes or something like that so it is constantly cycling and looking for that variable to change.

It would look exactly like what you put there.

I think I found a way to do this with a lot of replications but little to no modification to each iteration; with the bulk of the actual 'doing' being handled by a single event that grabs from an array of attributes set by each action.

However... I am still interested in any suggestions that might be even more efficient!

I would love to have a  'when mouse is pressed on <any region from list>' block at the top there. Then I could set up a list of region names to check, verify and set those 'Divet' blocks to.

A loop might help but first I need a way of setting something up that can check these areas repeatedly. It seems much of the blocks I would need for that must be at the top of a string.

The other thing is that even though I mentioned a grid, it is not one that aligns with the tile grid very easily hence why regions might be my best bet as they will get me proper placement of each object. Although I do wonder if actors can be used and if the same quantity would be too taxing or just annoying to try to configure.

Attempting to better explain...
Here is my updated code. It now allows for me to click on a box (which activates it) and then click on a 'divet' and drop one in if there is nothing there. If there is something there, then it removes it back to the box. This is tied to a designated region. How do I set something up that will apply this to 99 other regions? Or, is there a better route to explore to get this same mechanic to work like this?

Also... does anyone know why '=' blocks don't work for my 'get list' statements but '>=' and '<=' do?

Pages: 1 2