Frictional Games Forum (read-only)
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)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19


RE: [CHALLENGE THREAD] - Your Computer - 04-15-2012

(04-15-2012, 02:45 AM)Homicide13 Wrote: Are arrays supported in hpl2? I know it says here: http://www.angelcode.com/angelscript/sdk/docs/manual/doc_datatypes_arrays.html that "Arrays are only available in the scripts if the application registers the support for them," and whenever I try to state the value of a member of an array, it returns weird errors.

For example, the code:

int[] test(3,2);
test[1] = 1;

returns the error:
main(2,6) : ERR : Expected ']'

HPL2 does support arrays, but i don't think assignment after declaration is possible within the global scope. If you want to assign a value within the global scope, do so in the declaration.


RE: [CHALLENGE THREAD] - Homicide13 - 04-15-2012

Ok, so any variables declared on the global scope are constants? Do you know if there's any way to work around this (out of curiosity)?



RE: [CHALLENGE THREAD] - Your Computer - 04-15-2012

(04-15-2012, 02:58 AM)Homicide13 Wrote: Ok, so any variables declared on the global scope are constants? Do you know if there's any way to work around this (out of curiosity)?

They are only constants when you use the const keyword.


RE: [CHALLENGE THREAD] - Homicide13 - 04-15-2012

Ok, I've noticed that on a global scope, you cannot change the assignment of a global variable, but within another function you can.

Interesting.

And I'm done: http://www.mediafire.com/?55k5jtywz1hcdc7

I couldn't figure out how to do it while using classes, but I think the way I did it is pretty efficent.

This method allows the player to add as many suitors as they want into the model editor, and as long as they use that specific box to hit them the system will work.

Currently I have it set up so the player has to throw the box at them once to kill them, or hit them with the box twice to kill them, but you can change that to how you see fit.

Of course, I would still be very interested to see how you did it using classes.


RE: [CHALLENGE THREAD] - Homicide13 - 04-15-2012

NOTE:
I just fixed a small glitch in the system. Please use this link instead: http://www.mediafire.com/?zboyt8mglrfltbc


EDIT: As per Danarogon's request, I have also uploaded a version re-named "Happy Fun Fun Pillow Fight Night - A Girls Night Out," in which the box has been replaced by a pillow: http://www.mediafire.com/?mu3ahue1vw35eeq


RE: [CHALLENGE THREAD] - nemesis567 - 04-15-2012

Quote: - You can only post one solution. There's no editing after that, if it's not as supposed, you fail.



- The solution consists of a working map with all required assets, an explanation and a commented script.



- Failure to give a solution with everything requested in the challenge
details will result in the solver's elimination from the current
challenge and his incomplete solution will become available for anyone
to use and finish.




RE: [CHALLENGE THREAD] - nemesis567 - 04-15-2012

I will post the solution with classes soon. I have no solution without classes since I never actually did it. Next challenge is on Homicide.(Even you didn't read the rules).



RE: [CHALLENGE THREAD] - Homicide13 - 04-15-2012

I mean technically the first solution I posted was correct, the second solution was just better. >_> The first script had a bug where if you hit them once and then threw the box at them, they wouldn't die. Technically this isn't wrong, all you stated was that they had to take damage (which they continue to do - they just don't die from it).

And if it's supposed to be an environment to promote learning, why are the rules unnecessarily strict? There's no reason why people shouldn't be able to post more solutions, as long as they understand that if they don't get it right then it's free for everyone else to use.

Also, I fulfilled the second requirement you listed. :/ It works fine so long as you extract it anywhere in any of the folders listed in the resources.cfg file (and very well might even if you don't)

Anyhow I think I'm going to have people PM me (or nemesis if he'd like) their solutions for the next challenge when I come up with it, so that should eliminate the problem.



RE: [CHALLENGE THREAD] - nemesis567 - 04-15-2012

They can post their solutions right here, and they will all be checked.



RE: [CHALLENGE THREAD] - Homicide13 - 04-15-2012

How long do I have to post a new challenge? I don't have a few good ideas but I don't have the time to just sit down and power through them.