![]() |
Challenge Threadᆦ ᆦ ᆦ - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +--- Thread: Challenge Threadᆦ ᆦ ᆦ (/thread-14681.html) |
RE: [CHALLENGE THREAD] - nemesis567 - 04-29-2012 Ok, I fixed that. It was really just changing the funciton that determines the state which is a pretty easy one anyway. Here is the solution: http://www.mediafire.com/?i2avy6vjiczuazg And here goes the explaining: PHP Code: const int MAX_BARRELS = 14; I assume this makes me the winner. RE: [CHALLENGE THREAD] - Homicide13 - 04-30-2012 I've actually confirmed that the MoveAxis amount is the size of the model in the level editor (after scaling, so a 2x2x2 meter box that is scaled to 3 on each side would move 6 meters, not 2), and the "set open amount" just sets how many of these MoveAxis amounts is considered "open." As for the speed of the bridges, even if it is fine for the sake of the challenge it still bugs me, as I see no reason why they would move up and down at different speeds. ![]() RE: [CHALLENGE THREAD] - nemesis567 - 04-30-2012 (04-30-2012, 05:22 AM)Homicide13 Wrote: I've actually confirmed that the MoveAxis amount is the size of the model in the level editor (after scaling, so a 2x2x2 meter box that is scaled to 3 on each side would move 6 meters, not 2), and the "set open amount" just sets how many of these MoveAxis amounts is considered "open."You should finish your solution anyway. Before Apjjm releases it. RE: [CHALLENGE THREAD] - Homicide13 - 04-30-2012 (04-30-2012, 12:54 PM)nemesis567 Wrote: You should finish your solution anyway. Before Apjjm releases it.I mean it's technically already finished, that one problem just really bugged me. http://www.mediafire.com/download.php?15t21svj043abdc This module can be used to implement a balancing system between any two vertical move objects, provided that they are named [commonName]_1 and [commonName]_2, and that there is an entity used to detect collisions that can be placed directly in the same place as the entities in the balance system named [commonName]Collider.ent In order to set up the relationship between the two objects, the user only needs to declare 3 lines of script. One to declare the object, one to initialize the system, and one more line because I couldn't figure out how to get collide callbacks to call a function within a class. The user can have as many balance objects as he likes in his script, provided he follow each of these steps for each of them. And that's that. RE: [CHALLENGE THREAD] - nemesis567 - 04-30-2012 Ok. Since you're the only participant left, this closes the challenge. About the collide callback within the class. I also found that a problem until Apjjm gave me the idea of having a global array that would store the created objects, so you could later in the script find what class object corresponds to a certain entity. RE: [CHALLENGE THREAD] - Homicide13 - 04-30-2012 (04-30-2012, 02:02 PM)nemesis567 Wrote: Ok. Since you're the only participant left, this closes the challenge. About the collide callback within the class. I also found that a problem until Apjjm gave me the idea of having a global array that would store the created objects, so you could later in the script find what class object corresponds to a certain entity.How do you mean? RE: [CHALLENGE THREAD] - nemesis567 - 04-30-2012 I haven't seen your code. But suppose you have the class Object1 PHP Code: Object1[] myArray; That will not work but it represents what I meant. RE: [CHALLENGE THREAD] - Homicide13 - 05-01-2012 Ah that's cool. But won't defining values of an array cause a buffer overflow if you don't define the max size of the array first (or if you pass that max size)? Or does Angelscript automatically increase the size of the array? RE: [CHALLENGE THREAD] - nemesis567 - 05-01-2012 No, you'll have to use array.resize(); RE: [CHALLENGE THREAD] - Homicide13 - 05-01-2012 Hm Wait a second, why are you using the "->" to reference the class' member functions? Isn't this only used with pointer variables (which the array in your example isn't)? Or does Angelscript automatically just overload this to "." (though I don't really see why it would do this)? |