|
Prowler Productions
Dink Smallwood Forum Making new brains |
Author | Topic: Making new brains |
kissbadik |
posted 05-17- 12:19 PM CT (US)
Hi,I want to be able to use 2 human brains on 1 screen and have them return different values such as their x and y co-ordinates and other things and have them attack each other. I was hoping to have 2 brains that could move in all directions as dink does. Is it possible to make a new brain or is there some programming code that I could put in to differentiate the 2 brains from one another ? Thanx |
Beuc |
posted 05-19- 09:47 AM CT (US)
Sorry kissbadik, but you aren't very clear ;) I'll try to reply: A "brain" is the type of basic features of a sprite. A sprite 6 repeats is sequence, a sprite brain, brain 9 is Person/monster (no diagonals) and brain 10is Person/monster (only diagonals). You can have as many sprite with the same brain type as you want, and they'll be independants. You just have to name them is you want to control them, using: &myname = create_sprite(x, y, brain, seq, frame). With sp_x and sp_y, you can have their coord. If you want them to fight, you can study a bonca script, and see how it works (there's a special procedure to make the bonca "target" a peculiar sprite. Here it is :) |
kissbadik |
posted 05-19- 11:37 AM CT (US)
Sorry if I was unclear. What I want is to have 2 or more sprites on screen that are able to walk around in all 8 directions. I know that brain 1 (dink's) can do this but I thought that if I would have 2 sprites with the same brain fighting each other (with swords/magic) that when one died that the sp_kill procedure would kill both of the sprites seeing as they have the same brain. I can get them to attack each other with a sword but it's when I try to get the enemy to use a fireball, this is where I thought it would mess up by returning the wrong values as there are 2 brain 1's on screen. Is there a way to make new brains instead of using the existing ones ? Here's an example ... say that I wanted a guy guarding a big door and he could match my x co-ordinates but not move towards me by making a new brain that could only move from left to right and back again ? |
Beuc |
posted 05-19- 02:51 PM CT (US)
As I've said, 2 sprites, even with the same brain, are independants. You can kill one without killing the other. See the pillbugs in the game: there're all brain 9/10 and we can kill them one by one. As for the brain, the brain of Dink is just for Dink. Use another brain for persons. If you want a guy to move only on a horizontal line, then you'll have to "create" your own brain, ie modify the main() procedure in the script you'll attach to the sprite. Post again if you need precisions :) |
kissbadik |
posted 05-19- 04:58 PM CT (US)
I understand how 2 do it now. Thanx for the help. |
Powered by: Ultimate Bulletin Board, Freeware Version 5.10a
Purchase our Licensed Version- which adds many more features!
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 2000.