A few (more) problems for a budding developer [proximity] [area] [scroll]
Eggnogpaintjob
Member, PRO Posts: 6
Before I get too involved with my game, I want to know what the most efficient way to do what I'm doing is.
Basically I have a huge environment, and a character who is drag and drop. There is a sort of "datadex" on all the treasures/monsters/people that are encountered. The object of the game is to explore the world and fill up your dex.
So what I want to have is when my character is placed in the proximity of an actor, I want it to flip a boolean on my table, making the data entry change image and become clickable. (imagine a pokedex)
So what is the best way to go about creating a proximity switch? The roundabout way I have is to create an invisible actor the size of a screen, and constrain it's position to the position of the monster/treasure/whatever. Then the switch is activated when the main character is within view of whatever it is collecting data on. This seems like it's going to result in a lot of actors, and organizing all of them could be a huge pain (and it might end up taking up a lot of data, but I don't know yet)
I would also like to keep this topic around for further questions so I'm not clogging up the board with dumb stuff. If there's a vet out there who would like to keep an eye on me, I would totally appreciate it.
Basically I have a huge environment, and a character who is drag and drop. There is a sort of "datadex" on all the treasures/monsters/people that are encountered. The object of the game is to explore the world and fill up your dex.
So what I want to have is when my character is placed in the proximity of an actor, I want it to flip a boolean on my table, making the data entry change image and become clickable. (imagine a pokedex)
So what is the best way to go about creating a proximity switch? The roundabout way I have is to create an invisible actor the size of a screen, and constrain it's position to the position of the monster/treasure/whatever. Then the switch is activated when the main character is within view of whatever it is collecting data on. This seems like it's going to result in a lot of actors, and organizing all of them could be a huge pain (and it might end up taking up a lot of data, but I don't know yet)
I would also like to keep this topic around for further questions so I'm not clogging up the board with dumb stuff. If there's a vet out there who would like to keep an eye on me, I would totally appreciate it.
Comments
From the Cookbook:
magnitude (Function)
Finds the length of a line segment drawn directly from the origin 0,0 to the given point. You can also include an offset to find the length between two points - for example, magnitude(x-x',y-y'). Say you have one actor at 100,240 and another at 25,30. To find the distance between them, use magnitude(25-100,30-240).
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
So when the main actor gets close to the actor of interest, a little jingle plays, an icon appears on the far right corner, and the boolean value of my data dex changes.
However, it doesn't seem like I'm able to create a rule where if the table value is already true, that the game shouldn't play the jingle and display the icon.
This also seems like I'm not going to be able to create a rule for the dex actors to become clickable when the table switches them to true.
so long story short I need a way to create rules based on whether the booleans of my table are flipped, or I need to know a better way to go about creating my dex.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User