Making Baddies

Working on the LOZ server I realized how badly graal needs some diversity. LOZ had over a dozen different types of baddies running around to graal’s seven. (I think it was like 17+, but that was off the top of my head.) Same goes for bosses, you can be clever with characters, but beasts would be more rewarding.

Idea-wise you can try changing vulnerability, movement and attack patterns, etc. You could go for a (met hat) styled opponent that’s mostly invulnerable when it retreats into it’s hat/shell and attacks/moves behind your back, or maybe a mole that tunnels around, occasionally coming up to spit a ball at you, which would make it most vulnerable, or bombable when it’s tunneling around and throwing leaps everywhere. (The path of travel would set off the leaps, and any bombs in the path, thus harming it.)

Scripting isn’t too bad, mostly a thought process and if you need help with the commands somebody on the forum can give you a good push in the right direction if you’re willing to work on it. Baddies don’t necessarily have to be smart or complex, a room of armos, gibdos, and red bubbles could easily become a death trap.

If you come up with a good enemy set, it ought to be good motivation to finish up a quest or two to put them in. :wink:

(I ought to make a tutorial and a couple levels with a simple baddie set, from there the LOZ server ought to be enough proof of concept. Scream at me if I don’t get around to it within the week.)

If you wrote a tutorial explaining the math with baddies like checking players distance and stuff like that I would be able to create some. My maths is so shocking and I always try to get better at it, but I can never find a tutorial I can understand.

To Scan all players on a level:
for(this.i=0; this.i<playerscount; this.i++) { }
//Note: ‘playerscount’ is limited to the level, and is clientside.

To grab some playerprops"
//Note: Only a few playerprops are available to grab, also clientside, ergo, a lot of these are ‘read-only’; Indexes are also local.

Math for distance:
a^2 + b^2 = c^2
//Note: Hypotenuse is the longest distance in a triangle, think about it, this is what you need.

for(this.i = 0; this.i < playerscount; this.i++) {
this.dist = ((players[this.i].x-x)^2 + (players[this.i].y-y)^2) ^ 0.5;
//Hint, Something to the power of 0.5 is the same as the square root.
//Lets clean off the variable for ‘presentation’ by cutting anything after the first decimal.
this.dist = (int(this.dist * 10))/10;
message Player#v(this.i) Distance: #v(this.dist) Tiles;
sleep 0.1;

I am seriously retarded when it comes to maths :confused: I can find the players easy enough in the level that much I know and have shown when I created the NPCs that talk to each other, but when the maths gets involved for distance or anything that’s more advanced then + - / * I’m pretty much fucked :X

You would need to explain it to me as if you were talking to a 5 year old >.<

Yeah I know the feeling, I’ll try to make the tutorial good and expansive enough to get it to make sense. Yay-chapters! I do best with examples, so I’m going to get all of the LOZ baddies in there and a couple bosses over time. (All I’ve touched is Zola and I don’t think Aquamented Stefan counts…) Sister wants to watch a movie, so it’ll have to wait. :frowning: I can’t wait to script a Wizrobe.

distance formula (((x2-x1)^2)+((y2-y1)^2))^0.5

Yes, tiss the jist of what I said. :open_mouth:
this.dist = ((players[this.i].x-x)^2 + (players[this.i].y-y)^2) ^ 0.5;

And here you are thinking that I read posts… I only read the first couple lines of you post.