Before proceeding, please use the forum search feature at the top of the page to check if your question has already been answered.
How do I…
I’ve read a thing or 2 about using ID variables to differentiate individual instances of the same object, but how would I apply them to an event like this, where an object that can be picked up is getting picked up by another object that is itself able to be picked up? “toss_give” is able to pick things up, while “toss_take” is able to be picked up, but what if the object in the toss_give group is also in the toss_take group?
What is the expected result
An object that is both able to pick up and be picked up picks up an object that is both able to pick up and be picked up.
What is the actual result
Nothing happens. Probably because the toss_give distance from toss_take condition is checking an object’s distance from itself.
What are you trying to accomplish? What do the objects represent and what is happening?
Do all of the objects have the platform character behavior? Can they be stacked or occupy the same area? Are toss_give and toss_take object groups and do they contain the same objects?
I’m trying to make some objects able to grab ahold of others. “toss_give” is able to pick things up, while “toss_take” is able to be picked up and nothing happens when I press “t” while close to a toss_take. I know this event can work because I’ve gotten it to when I used specific object names.
Not all of them have that behavior. Yes they can. Yes they are and no they don’t. Not entirely at least. There’s some overlap, such as the player character being able to pick things up and get picked up himself.
A toss_give can only pick up one toss_take at a time, if that’s what you’re asking.
I’m not ignoring you. I’m just not sure how to help. Are your conditions triggering the actions? Are the variables being changed? Or is there a condition preventing it? A screenshot of the scene in action might also help. Just to get a better understanding of your project.
They were triggering and changing until I changed the specific toss_give into a toss_give group. The event shown below has a specific toss_give group member (popo) acting on a specific toss_take member (testtoss). I’m hoping I can get this event to be more open-ended so that it can be reused for a variety of tossers and tossees. I’ve been able to make the tosseee open-ended, but not both it and the tosser.
When you used the groups, what objects were in each group? Were any objects in both groups? With the group method, does it work if there is only 1 instance of each object?
Using groups with Tha same objects with a distance check can make it tough for GD to know which objects are being compared.
You can try to break up the events into multiple subevents and then do something to highlight the objects picked one subevent at a time. I like to rotate the picked objects or change their color. It’s a nice visual cue to track the way the picklists are being modified.
For example, change their color to white before the event and then after the conditions up to the distance check put an action to change the color to say green. Then put the other conditions in a subevent. If the correct objects are green then move the color change to a subevent after the distance check. Then see which objects are in the picklist through color. If that seems right, move the color change action to another subevent.
Sometimes you need to check things one condition at a time. In the past, I made a custom condition so I could place it in the middle of conditions and count the number of objects at different places.
My plan for a solution was to make tossable object groups for each specific kind of toss_give, so that the event checks for say, popo attempting to pick up something from the group of objects that popo is capable of picking up. It’d take a lot more events than I’d like, but if the event(s) having both open-ended tossers and tossees is either impossible or a lot of extra setup anyway, then so be it, I guess. I don’t think there’ll be a ton of objects capable of picking others up, nor any that can pick up another instance of themselves, so it shouldn’t be that bad.