A few hard questions

This forum is currently in read-only mode.
0 favourites
From the Asset Store
Dynamic heavy and powerful hard rock tracks. 15 tracks, loops and more.
  • What i want to is to surroud an object (we call this object the "Thing" ) with a web of detectors. It should look something like this:

    <img src="http://img88.imageshack.us/img88/9669/detectorsemptyls5.jpg">

    What i want to be able to do is to create the Thing, and have the detectors created and positioned like this automaticly. Is that possible to do with for example groups/containers?

    I also need a way to give every detector a private variable like the ones written on the image, (i didn't write all of them) to easily associate to them, plus one to associate them with the right "thing" and i need a simple way to make events trigger if a certain combination of detectors are overlapping/not overlapping. For example, if the case was this:

    <img src="http://img134.imageshack.us/img134/39/detectorsde8.jpg">

    player overlapping not overlapping

    it could be two private strings, one "overlapping" which would say: 39,40,41 And one "not overlapping" which would say: 13,14,15,22,23,24,30,31,32,33

    EDIT: Of course there would be more numbers. All the numbers would be overlapping or not overlapping. This would rather be a mall for colision testing. Hm.. now it became confusing.

    I have a few ways to do this, but every one of them requires much repetition, and risk to have to go through 44 events if you want to change something.

  • This is where some kind of grid object plugin would be really handy... question: Do the detector objects move with the "thing" or do they stay in the same position all the time?

    Either way I guess it would still involve making X number of seperate "grid objects" and then, like you said, if you want to change something you have to change it X times.

  • They move with the object, but that's not hard to do, so i didn't mention that. Anyone who can think of a way to solve my problems without a new plugin?

  • Need more information:

    How is the object moved? Is it a click in a gridspace or is it with the keyboard?

    What type of movement is going on here? Will the green box teleport to it's new location or "slide" to it's new location?

    Is that brown rectangle a platform? Is there gravity? Or is this a top-down view and the brown thing is a wall?

    Edit: Why do you need a list of strings with the cell numbers?

  • Moving is not the problem. Creating them and associate them with the right object is the problem. Since it's detectors that i will use in many diferent ways i want to be able to write a "collision pattern" easily. It doesn't have to be a string with values. Just a way to write a number for each detector that has to overlap, and one for each that isn't allowed to overlap, and then trigger an event based on that.

    Your questions are not relevant, but it's going to teleport. it's going to be a platform-wiew, and it will be moved by events.

  • My questions are relevant. I asked them for a reason, to try to work out a different, easier method of detection. Collision is tied into movement which is tied into control. The three have to work together.

    Edit:

    Anyway, what I mean is, if I knew what you were trying to do, perhaps I could come up with a different method for you that maybe you haven't thought of. A fresh perspective, so to speak. But I can't do that unless I know what's going on.

  • I agree with Deadeye. Can you give us the part of your project plan that relates to this?

  • I don't really need a fresh perspective since i've got everything figured out eccept these two specific questions. The green thing will just be moved by events, not controlled. The detectors are not collision detectors. This will be used in an AI to determine what do do in specific situations, that's why i need to be able to easily determine if a certain combination of the detectors are overlapping.

  • I don't really need a fresh perspective since i've got everything figured out eccept these two specific questions. The green thing will just be moved by events, not controlled. The detectors are not collision detectors. This will be used in an AI to determine what do do in specific situations, that's why i need to be able to easily determine if a certain combination of the detectors are overlapping.

    Could you work it using math instead? Comparing angle and distance of the "thing" compared to any "other thing" rather than using a grid system?

  • Yeah... detectors seem superfluous. One could either use one detector object that moved around, or calculations based on distance, maybe. But, I don't know what you're really doing or anything about math. So I'm sorry, this post is pointless.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm sorry if i'm sounding rude now, but could people try to answer my questions? This is why i didn't write the whole thing from the beginning. I just want answers to my first two questions. Please focus on that.

  • I wish I could help you, but by this point I am entirely confused. I understand if you want your project kept in the dark, but by doing so - I mean, not even giving us a hypothetical use for this - then all I see is a web of box objects set in a container and positioned/valued on creation. In a sense, I'm doing something similar in my own project. Deadeye was able to give me a boost here:

    Look for the cap file. I think it might help at least the part of your problem where you want to assign container objects an ID upon creation.

  • Well, i've tried to answer your questions. It's going to be used in the AI, and as a hypothetical use.. Well... look at the image and imagine a tiny enemie with the ability to transform into a big monster once every minute. Then when one minute has passed, and the detectors 39,40,41 are overlapping, and 13,14,15,22,23,24,30,31,32,33 are not overlapping, the creature transforms. If the detectors above and around him are overlapping, that means ther's not enough space, and he can't transform. This was a bad example, i just tried to come up with something that was matching the picture, but hopefully you get the idea. I will need to easily create many triggers on many different combinations of overlaps, and i need to be able to create a new "thing" and create and position the objects. It's not hard to do. it just takes a lot of time, and i thought there might be a shortcut.

    Edit:

    One could use one detector object that moved around

    I've thought of that too.. I'll try to come up with a simple way to do that. would it require less or more memory?

  • O, i c wut u did thar.

    Actually, Why don't you just take the mathwork out of it and create "no transform" zones built into your levels?

    If you're worried about overlapping a wall on one side (or two adjacent, in a corner) you can run a simple distance check in your cardinal directions. Alternatively, write a push algorithm so that your monster can transform in "safe to transform" areas without worrying how close to the wall he is.

    I just think the whole "let's write thirty-thousand detectors" thing is an awful lot of work to accomplish what can otherwise be planned for and convincingly faked.

  • This was a bad example, i just tried to come up with something that was matching the picture, but hopefully you get the idea. I will need to easily create many triggers on many different combinations of overlaps

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)