I'm trying to find the int with the lowest value, and I only know how to set it up like this:
Let's say x1 is the lowest.
int x1, x2, x3, x4;
if (x1 < x2 && x1 < x3 && x1 < x4)...
Type: Posts; User: Rexoa
I'm trying to find the int with the lowest value, and I only know how to set it up like this:
Let's say x1 is the lowest.
int x1, x2, x3, x4;
if (x1 < x2 && x1 < x3 && x1 < x4)...
Well... I learned to use it in a different way.
I solved the problem by adding 2 lists: currentEnemy and otherEnemies.
If the enemy is the first to be attacked, it gets added to the currentEnemy...
Ahh, objects, the things I never really knew how to work with. :P
I tried to look up some tuts about objects and instances, but nothing really helped much.
Nooby question time:
Where would I...
Ah, yes. I have a feeling it has to do with my boolean "fighting."
It is set to false to begin with, until I start fighting anything. Then turns back to false when I run away.
(I didn't add a...
Hello again.
So I'm making a combat system for a game I'm working on.
The combat is basically like old-school Runescape's, where the 2 participating combatants take turns hitting each other....
After looking up how to properly increment and loop a value, I got it to work without any delay at all.
Thanks.:cool:
Ah, now you guys can tell how new I am to this.
I didn't even provide enough information to get the help that I needed.
enemyAttacksPlayer() is called 60 times per second when I'm close enough to...
Hello.
This code is for a game I'm making.
I'm new to using modulus, and I've been looking all over the place for a tutorial that I can understand. No luck. :\
What I'm trying to do is get the...
Indeed, down is initialized by this line:
public AnimatedSprite down = new AnimatedSprite(SpriteSheet.dummy_down, 32, 32, 4);
Nothing in that line is null, so I'm guessing it all has to do with...
Oh, haha. Sorry if it hurt your head, I was showing that animSprite's value is supposed to change according to direction.
This is the whole method I should have shown before:
public void...
That was exactly what I was looking for. :)
Making variables IN the method while make a constructor solved part of my problem, but now I have an issue with one certain variable.
Say I have 4...
Just a quick question. What is a way this could be coded?
Imagine this:
I have a class called "Monster."
Class "Werewolf" extends "Monster."
"Werewolf" has a method called "update()" for...