Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Small RPG snippet?

Author
Message
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 7th Oct 2004 09:00
only damage code I see in Doug's is "enemy(a).health=enemy(a).health-30" that?

If i'm still lost, i'll blame it on lack of sleep and check back tomorrow :p
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 7th Oct 2004 09:34
Thanks I'll try and see if it works later.

Got anime?I do.
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 7th Oct 2004 10:01
Still didn't work it said:
Quote: "Runtime Error 118-Array does not exist or array subscripts our of bounds at line 29."


Got anime?I do.
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 7th Oct 2004 10:27
Okay I got it working, but there seems to be some stuff I need to iron out, it's hard to explain though, I'm not sure that everything is working properly.

I need to get this so it means that the weapon being used is weapon number 0, do I do

To have it work properly and have

Because the damage doesn't really depend on the the damage added from the weapon it just depends on the humber weapon equals like one or zero, so if I use the merc sword (weapon 0) it does seven damage when I use weapon number one it does 8, now this are the damage amounts added by each weapons:
Merc Sword(0) deals three damage
Wolfblade(1) deals five damage
This doesn't seem right, of course, the enemy armor is random so the damage can vary
because


Got anime?I do.
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 7th Oct 2004 23:49
The array problem is cause there was no 'DIM Swords(3)' line at the start?
if the weapon being used is 0, then all that's needed is 'weapon=0'
The Swords() array simply stores numbers for each weapon, so that when you say 'blahblah = swords(weapon)' it will give the number stored in the array at the same number as the weapon value... :S

MercSword(0) < a seperate array for each sword? If you're doing that, don't even use arrays if they are only being used to store 1 bit of data (attack power) er...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 8th Oct 2004 04:14
Huh?
I have no clue what you just said.
What I want to know is how having
the variable
means that it will equal sword zero as it isn't related to the arry.

Got anime?I do.
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 8th Oct 2004 07:15
Well... what? I'm horribly confused... I probably brought this on myself somehow...

It only equals sword zero, if you have swords(weapon) someplace... that calls whatevr data is in swords(0) as weapon=0 :?
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 9th Oct 2004 22:30
Your confusing me too now. So your saying if I have the variable weapon=0 and somewhere in the script I have swords(weapon) then weapon will determine what sword is being used?

Got anime?I do.
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 10th Oct 2004 00:11
Tifu?

Got anime?I do.
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 10th Oct 2004 03:35
You expect me to reply within 2 hours? I'm not on the net 24/7 yah know :p

Maybe we should just forget the swords array and start again, I probably misunderstood what you were asking for when I brought it up.
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 10th Oct 2004 03:42
Oh, okay...
So how should I go about weapons in arrays and what not then?

Got anime?I do.
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 10th Oct 2004 05:47
What is it you're wanting exactly? I mean, obviously I never understood before or we wouldn't have gone down this page of confusion and mess :p
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 11th Oct 2004 06:24
I want the character to be able to use different swords and each sword affect the damage the player does, and for the player to be able to buy new swords and the same for armor except prevent damage.

Got anime?I do.
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 11th Oct 2004 07:36
And you already have code for the actual dealing of damage or what?
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 11th Oct 2004 08:05
Okay, for now since the communication of what the problem is seems to be problem we'll come back to weapons later.
So here is what I want to focus on next:
Better NPC AI
Remeber that AI code you gave me for the NPCS to move around with?
Well I want to enhance it. With the code you gave me they just look like their having seizures and keep rotating around and I want to fix it so they look like their walking properly I tried to edited the random numbers for rotation and the requirement for i but I can't get the NPC ai to be any good.
Jumping
Physics isn't my strength and I need some help because I want to have puzzles that require the player to jump like a platforming game, how will I have to do this?
Cells
Not like a jail cell but in Morrowind the world was divided into "cells" and when you entered a house you would be entering a cell, how do you do this in DB?
This is just a list of to do things really, I don't need all at once I want to focus at one at a time.

Got anime?I do.
gothboy 101
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Watonga, ok, usa
Posted: 11th Oct 2004 08:21
search for the thread enter, door, or if you cant find it go to 3d chat and look around cause indian home g asked that question

Are you ready to experience advanced gaming?
http://www.dragonseige.tk
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 11th Oct 2004 08:23
Oh yeah he did, didn't he.
But first on my list is to fix the AI.
Also, please post some more screenies on you site, I'd love to see some more.
Also are you going to use my Galdriel because if not my friend might use it for his PoP style game with a midevil twist.

Got anime?I do.
TEH_CODERER
20
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 11th Oct 2004 20:46
Better NPC AI:
I'm not sure how you were controlling this before but here is what
I'm doing in my RPG:-


In my level editor, I can add in waypoints. I then assign each NPC
to a group of about 4. You then point the NPC at the first 1 and
move him towards it. When he collides with it, he moves to the next
1.

Here is a small example(not tested):-


Realms Of Tutopia: Rise Of Evil
http://www.freewebs.com/elbsoftware/index.htm
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 11th Oct 2004 22:47
The example didn't work, and you see, Tifu gave me some code a few pags back but they just were way too jittery.

Got anime?I do.
TEH_CODERER
20
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 11th Oct 2004 23:47
What part didn't work?
All it does is position some cubes in different places, curve the NPC towards it,
move it towards it, if it collides move to the next one.
What did you mean by jittery?

Realms Of Tutopia: Rise Of Evil
http://www.freewebs.com/elbsoftware/index.htm
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 11th Oct 2004 23:51
It said:

Can't remember which line but it was the line where it said:


Got anime?I do.
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 12th Oct 2004 02:38
Arrgghhh, I need to fix it[the ai] for people who don't what ai code I'm using look at this code snippet:

Really I just want some natural movement at a slow pace so you can actually walk up to them and speak with them.

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 12th Oct 2004 09:49
Anyone here able to help?
I'm really stuck with the moving.

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 13th Oct 2004 04:22
Tifu? aN? Anyone? I'm diying here!

There is only one way to package shaolin: Shaolin Soccer...
TEH_CODERER
20
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 13th Oct 2004 21:34
Alright try this one:


Realms Of Tutopia: Rise Of Evil
http://www.freewebs.com/elbsoftware/index.htm
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 14th Oct 2004 04:17 Edited at: 14th Oct 2004 04:18
Thanks for trying to help and all but ti says that command is out of place at line 30 which would be the "Next Z" command.
Edit: I also remed the Next Z and it said that the Next X command in the following line was out of place too.

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 14th Oct 2004 10:47
I've done some editing to the NPC ai so they go in a straight line and stop at a point and turn around, but it isn't that good, so could some one please help, I know you're trying Andrew but I can't get your code to work so I have no clue what is happening in your code.

There is only one way to package shaolin: Shaolin Soccer...
TEH_CODERER
20
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 14th Oct 2004 23:39
Right. I'm being an idiot. It wasn't the next x or next z that was wrong.

I was missing an endif.

Realms Of Tutopia: Rise Of Evil
http://www.freewebs.com/elbsoftware/index.htm
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 15th Oct 2004 02:23
I can't help with AI, my RPG is turn-based so i've had no need to learn it =P
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 15th Oct 2004 04:25
Hi Tifu, where have you been, busy with work or something? Vacation?
Thanks Andrew for the code, but I wasn't sure waht was happening it started with him twitching and twitching again then it was just still, was it supposed to be moving or did I have to wait longer because it was still for a minute, then I exited.

There is only one way to package shaolin: Shaolin Soccer...
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 15th Oct 2004 09:13
Been? Uh, yeah busy with work on my competition entry, trying to network two computers (hopelessly) and actual job work too... lots of extra hours x_x weekend soon somuchtodo*sob*
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 15th Oct 2004 09:42
Do you think you could help with allowing my charcter to jump then? I mean the powerpuff girls fly so there must be some similarties.

There is only one way to package shaolin: Shaolin Soccer...
Oneka
20
Years of Service
User Offline
Joined: 24th Apr 2004
Location: Hampton,VA
Posted: 15th Oct 2004 11:21
um...Ill help just tell me what you need help on


Making better games everday!
Oh yeah and just so you know its Oh-nek-a not One-ka!
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 15th Oct 2004 11:53
It's up a few posts, in bold print and what not, or it might be a page back for code look for posts by Doug and Tifu.

There is only one way to package shaolin: Shaolin Soccer...
Oneka
20
Years of Service
User Offline
Joined: 24th Apr 2004
Location: Hampton,VA
Posted: 15th Oct 2004 11:58
ok for the cell thing if you havent done this yet you can do like I did and that is to make a editor that makes a map( cell) and you place all the objects, activitys, etc in there and save it then make it so that it loads it and boom a cell


Making better games everday!
Oh yeah and just so you know its Oh-nek-a not One-ka!
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 15th Oct 2004 17:33 Edited at: 15th Oct 2004 17:34
Jumping? Oh sure, that's easy... my PPG won't do that (and flying will just be running really... keep things simple so the players can't run out of a level) but i've done it a million times in Qbasic. I'll do something when I get hom efrom work...
TEH_CODERER
20
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 15th Oct 2004 21:30
Oh damn it!
I'll test in DBPro tonight hopefully and fix it.
Sorry.

Realms Of Tutopia: Rise Of Evil
http://www.freewebs.com/elbsoftware/index.htm
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 15th Oct 2004 23:37
Well, I wrote a simple jumping engine.
Hopefully you can work out some way to implement the jump thing into your code...
Jumping engine
TEH_CODERER
20
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 16th Oct 2004 01:39
Right. Works. It already did but now you can see easier.


Realms Of Tutopia: Rise Of Evil
http://www.freewebs.com/elbsoftware/index.htm
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 16th Oct 2004 04:02
Thanks guys, I'll try it in a few...

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 16th Oct 2004 05:19
Ehh... Nice jumping code Tifu, but because there wasn't a loop or anything and you made the ground out of multiple blocks rather than a giant box I couldn't get the full code working in my game, I would wither fall for an eternity or I would jump without going backdown.

There is only one way to package shaolin: Shaolin Soccer...
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 16th Oct 2004 06:45 Edited at: 16th Oct 2004 06:48
How was there not a loop? REPEAT... UNTIL endgame=1 is the loop... And I know I made the ground out of multiple blocks... that was the simplest way to make the demo work with all the blocks being movable to where I want... eh
Of course it's not going to work just taking it and copying it into your code, my jump code used simple collision, your RPG won't use the same. The idea was you'd look at it, read it, understand it, and integrate it in yourself...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 16th Oct 2004 07:03
I'm sorry.
Really the problem I have is the ground collision cuz I don't have that in my game and I can't implement that pice of code where it stops you from falling through a block.

There is only one way to package shaolin: Shaolin Soccer...
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 16th Oct 2004 07:11
Don't cry
But.. running before you walk then aren't you? Why would you want a jump engine if you don't have a collision engine :p
So what is your ground? A matrix? Or a big-ass plain? Loaded object file thing?
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 16th Oct 2004 07:18
I do have a collision engine in my game just the player isn't colliding with the ground because it's a box that's been moved down, and it's a box still.

There is only one way to package shaolin: Shaolin Soccer...
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 16th Oct 2004 07:30
Well, you'll need to have him do a collision check of some kind with the ground if he's to jump. If the floor is below him, he needs to have stopped falling. Or if the floor will always always be at a certain point, you can just check if y#=justabovethefloor, and if it is, then he stops falling... in my jumpy programs, I always make it so that by default, the character is always falling unless told otherwise (by being on a ledge, or by being in the state of jumpingness)
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 16th Oct 2004 07:32
If it helps to know what the ground in the game is like just look at what doug made to use as the playing world because that's what I'm using. I'm still a bit confused on the ground collision thingy though.

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 17th Oct 2004 00:36
So, how should I make collision with the ground so the player can still move but not fall through the ground?

There is only one way to package shaolin: Shaolin Soccer...
gothboy 101
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Watonga, ok, usa
Posted: 17th Oct 2004 02:05
hey anime i'm back to work and i'll have a look at your code

Are you ready to experience advanced gaming?
http://www.dragonseige.tk
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 17th Oct 2004 02:15
Thanks.

There is only one way to package shaolin: Shaolin Soccer...

Login to post a reply

Server time is: 2024-09-24 03:25:04
Your offset time is: 2024-09-24 03:25:04