I have been working with Java for appox the last six months but I still am very un-sure of myself. I need help figuring out how to import one Java file to the current one running. I am using Jcreator LE as a source editor/compiler and I wish to rum my program in the Console mode. Any help will be appreciated.

Thank you


15 Years
Discussion Span
Last Post by Bob4life2000


New issue...
I currently have this for source code for the Enemies in my game. class Enemy
{String name=("George");
int Hp;
int Pp;

what I want to do is set up a seperate file forenemystorage and then everytime an enemy is created, (I have that working) I want it to go to that file, and randomly (although based on character level) pick an enemy to create, with differen stats names etc etc etc...


This might work. Have a different class for each "type" of enemy. Each "type" of enemy can pull random weapons, items, etc. But then make an array of classes, and whenever you want to make a new enemy, pull a random number (with some sort of method) and use that method number as the index number for the array. That way, you get a semingly unique enemy each time.
I hope this made sense :P



I don't know about the arrays. As i said I have only been working with Java for a relativly short time and I am not sure of how to pull from an array of classes.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.