Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 14 Vote(s) - 2.93 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Challenge Threadᆦ ᆦ ᆦ
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#71
RE: [CHALLENGE THREAD]

(04-15-2012, 02:45 AM)Homicide13 Wrote: Are arrays supported in hpl2? I know it says here: http://www.angelcode.com/angelscript/sdk...rrays.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.

Tutorials: From Noob to Pro
04-15-2012, 02:51 AM
Website Find
Homicide13 Offline
Senior Member

Posts: 323
Threads: 41
Joined: Nov 2010
Reputation: 14
#72
RE: [CHALLENGE THREAD]

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)?

04-15-2012, 02:58 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#73
RE: [CHALLENGE THREAD]

(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.

Tutorials: From Noob to Pro
04-15-2012, 02:59 AM
Website Find
Homicide13 Offline
Senior Member

Posts: 323
Threads: 41
Joined: Nov 2010
Reputation: 14
#74
RE: [CHALLENGE THREAD]

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.

(This post was last modified: 04-15-2012, 03:55 AM by Homicide13.)
04-15-2012, 03:09 AM
Find
Homicide13 Offline
Senior Member

Posts: 323
Threads: 41
Joined: Nov 2010
Reputation: 14
#75
RE: [CHALLENGE THREAD]

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

(This post was last modified: 04-15-2012, 06:38 AM by Homicide13.)
04-15-2012, 04:31 AM
Find
nemesis567 Offline
Posting Freak

Posts: 874
Threads: 65
Joined: May 2011
Reputation: 10
#76
RE: [CHALLENGE THREAD]

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.


Today I dreamt the life I could live forever. You only know that when you feel it for you know not what you like until you've experienced it.
04-15-2012, 01:59 PM
Find
nemesis567 Offline
Posting Freak

Posts: 874
Threads: 65
Joined: May 2011
Reputation: 10
#77
RE: [CHALLENGE THREAD]

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).

Today I dreamt the life I could live forever. You only know that when you feel it for you know not what you like until you've experienced it.
04-15-2012, 03:01 PM
Find
Homicide13 Offline
Senior Member

Posts: 323
Threads: 41
Joined: Nov 2010
Reputation: 14
#78
RE: [CHALLENGE THREAD]

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.

(This post was last modified: 04-15-2012, 04:34 PM by Homicide13.)
04-15-2012, 04:10 PM
Find
nemesis567 Offline
Posting Freak

Posts: 874
Threads: 65
Joined: May 2011
Reputation: 10
#79
RE: [CHALLENGE THREAD]

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

Today I dreamt the life I could live forever. You only know that when you feel it for you know not what you like until you've experienced it.
04-15-2012, 06:27 PM
Find
Homicide13 Offline
Senior Member

Posts: 323
Threads: 41
Joined: Nov 2010
Reputation: 14
#80
RE: [CHALLENGE THREAD]

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.

04-15-2012, 06:39 PM
Find




Users browsing this thread: 1 Guest(s)