Oh... Ok that makes so much sense. Thank you so much for your help. Everything is working perfectly now.
Type: Posts; User: Burnett98
Oh... Ok that makes so much sense. Thank you so much for your help. Everything is working perfectly now.
No I know that the array itself is static, but why does that make it so that any changes to itself overwrite the whole thing?
I believe so, although I don't see why it would make a difference if the array is defined as being static. Non of the individual values being put into it are static. Is this still making a difference?
1 eL[1].name=your friend (after [1])
2 eL[2].name=your friend (after [1])
3 eL[3].name=your friend (after [1])
4 eL[4].name=your friend (after [1])
5 eL[5].name=your friend (after [1])
6...
No I have no idea why it's doing that,
Here is all the code I'm using for that part:
Enemy god = new Enemy();
god.creation("the god", "Smite", "", "", 9999, 9999, 0, 0, 9999, 9999, 1, 9999,...
The code I have written for those numbers(4-6) is perfectly fine.
System.out.println("4 eL[4].name="+enemyList[4].name + " after all has initialized");
System.out.println("5...
No this is in fact after all changes. There aren't very many enemies programmed into the game at the moment. The god is the change to it. If you'd like I can print it step by step through every new...
1 eL[1].name=the god after all has initialized
2 eL[2].name=the god after all has initialized
3 eL[3].name=the god after all has initialized
4 eL[4].name=the god after all has initialized
5...
Ok thanks. And I guess I could make it smaller, but then I'd have to go back and reassign numbers later. Also, I have the output. So, when I print out all contents of the array, it lists different...
Wait what other printlns do you want me to add. I don't really know what else would be helpful. Also, how would I print out all the contents? Just a println for everything? Because there would be...
So here is the output I created. I just put in a few System.out.println commands in various places. The output shows where I did
1 eL[1].name=your friend after [1] initialized
1 eL[1].name=the...
Oh ok now I get what you're saying. Ok so I put in System.out.println(enemyList[1].name); after every time that something new was put into the array, and it changed to whatever had just been put in,...
Oh sorry the ^3 is to specify that it's the third block of code I posted. And I'm currently using JFrames. My output for that battle thing is that I will if fact not battle the enemy contained in...
So, I'm working on creating a sort of role playing game. First off, throughout this post I will put little marks to correspond to the code I'm talking about. Down below will be the code organized by...