Closed Thread Icon

Topic awaiting preservation: var change on click (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8978" title="Pages that link to Topic awaiting preservation: var change on click (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: var change on click <span class="small">(Page 1 of 1)</span>\

 
fred_X
Nervous Wreck (II) Inmate

From:
Insane since: Nov 2003

posted posted 01-02-2004 17:15

Hi Guys and happy new Year to all of you
I'm in the process of making a new game but its not in any fit state to post right now. The game has a var index list and I found that when the game array and number of opponents is changed to a bigger array and a higher value of opponents the game gets harder to play.

Example:
var this = this
var that = that
var number of opponents = 5
var game array X (blah blah)
var game array Y (blah blah)

But I have to change the array and opponents value by cut and paste method to make the game harder. I know I could have 2 pages one with an easy version and one hard but wanted to know if anyone could devise a function that when a button is clicked the original array and opponent value is nulled or false and the new array and opponent value change takes place all within the same page?

I should add that the 'number of opponents' is a generic term and is referenced in many areas throughout the code so making opponents A and opponents B wont work because it would mean changing all refs in the page to suit.

Incidentally the game is for offline use so I don't know if that helps any with regards to an active X being a possibility?

Thanks in anticipation
Fred_X

fred_X
Nervous Wreck (II) Inmate

From:
Insane since: Nov 2003

posted posted 01-09-2004 20:38

I take it the silence means no one can help?

MajorFracas
Nervous Wreck (II) Inmate

From:
Insane since: Jul 2003

posted posted 01-12-2004 16:07

Couldn't you assign the values for this, that, etc. in a javascript function? Then you could just invoke the function from onclick attribute of the button you mentioned. Passing a parameter (easy or hard) to the function would allow you to set the appropriate values.

« BackwardsOnwards »

Show Forum Drop Down Menu