Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   GraalBoy (https://forums.graalonline.com/forums/showthread.php?t=5786)

Solareon 06-26-2001 02:18 AM

GraalBoy
 
I have been trying to make a GraalBoy but I need some help with it. I have the concept laid out, the games under a submenu in the weapons list for the GraalBoy but I need someone to help me script the games an such. I really bite the big one at gfx, maybe KawaiiSaria would be interested in helping? I would just need someone to write the script events for the button presses and the main concept of the game since you can just create an instance of the npc and then use the call npc to call the function of the game. the game engine doesn't really exist since it all lies in the games you make (the perfect way of making low end games but higher end games cost too much to produce all the chip and such). Hopefully this isn't illegal (different name and the games must not be copyrighted), most of the games would be more like movies but I assume some type of mini rpgs can be done this way. Action games would be way to difficult cause the images are are just a plain ole image. RPGs could be made for attack scenes by switching the images around. Is there a limit of the number of images that can be created for indexes? also is there a way to remove images by their index?

Shard_IceFire 06-26-2001 03:00 AM

Yeah I didn't really get that...

Solareon 06-26-2001 03:06 AM

I mean
 
like if you are making a real game, to include all the hardware on each cartridge (in real life) would cost a bundle, ignore that part

Solareon 06-26-2001 03:10 AM

yeah
 
thats it. I just wanted people to help me make games for it

TeirDal_RC5 06-26-2001 03:14 AM

Ah, Kaimetsu, picture a GameBoy on Graal as an NPCW, and you'll get what he's talking about.

Solareon 06-26-2001 03:26 AM

maybe even
 
linking the games together so you can have multiplayer. but that would be difficult without an npc server. not sure if possible but maybe.

here the basic concept for the Graalboy

the game script is as follows

if (abuttonpressed) {
scripted part of what happens when presses a
}
if (dbuttonpressed) {
scripted part of what happens when presses d
}

to add more functionality to the game it would be something like after an event runs and changes the image shown, it sets a flag saying the current state of the game. and does all the changes internally.

etc. for s and any other buttons you want.
The Game Engine is what calls the functions of the script. By doing

putnpc graalboy_game1.txt,0,0; //loading part of game engine
callnpc... with the name of the event which is called

at the end of the game it calls destroynpc or whatever the command is to remove an npc from the level. it would have to have somethign to make the player like invunerable to damage so they don't get pked while playing.

Solareon 06-26-2001 07:31 AM

I found a mistake in my game code
 
I'm not sure if you can change an image by it's index or not. The games would be selected by a flag setting with the name of the game script. If the images cannot be changed by indexs that would limit the amount of game time that you could play for.

Solareon 06-26-2001 08:39 AM

Okay games under submenu won't work
 
I tried it but it didn't call the functions right and made like 70000 little games. I am working on a sample game that will utilise all of the button events and the explanation of the flags. The graphics will be really crappy just a switch between two different images. I will zip up a level pack and post it on here

Solareon 06-26-2001 09:32 AM

I am havign some issues
 
It seems to not want to load the gmee based on what the game sets for variables, it doesn't load the images as it should but plays the music (last part of the game loaded event maybe I need to just change it to a cll npc but not sure.

Solareon 06-26-2001 05:48 PM

here is what happens
 
1 Attachment(s)
okay here is what I have so far,
gameex.txt is the game script,
the images are used to display game,

it will do the loading of the game engine but it won't go past the
loading screen (see script for details)


Shard_IceFire 06-26-2001 08:34 PM

Hmm...one problem...the gif is graalboy.gif, and you didn't include a graalboy.gif in the zip file. I just changed it to block.gif though so I could test it anyway..It still didn't work.

Solareon 06-27-2001 10:34 AM

okay sorry
 
my bad forgot which director I had the image in..... silly me, I can fix that part.

How the hell else am I supposed to do it. The put npc is to place a game on the level (instead of having like 7 npcs for each game or making the graalboy exteremely laggy by having all the game code (elimination the chance of people making games for it in a timely manner, with putnpc is just a simple flag that is set and then any game tat is on the server can be played. Putnpc is probably what is causing the problems but not sure, any help on this would be appreciated

entravial 06-27-2001 03:27 PM

this sounds like a good idea, but from what ive seen u need better graphics, and better scripting =/

but it's still a good idea

Solareon 06-28-2001 09:56 AM

okay
 
since callnpc is pretty slow I could just have the games into inventory and then for the game engine have it just set a flag for the keyevent and then have it done that way. btw I will update it with the new concept and do this

Solareon 06-28-2001 10:25 AM

okay here is my new status
 
the game functions normally, the only problem is it doesn't respond to the keydown events to the game engine so it can set a flag to make the game fire events. I have redone it so to start you fire up the graalboy and then use the game you wish to play and it loads, I will have to make an additional property so tat multiple games to not fire. I am not going to attach the new code until I can get the keydowns, the main way to play is by sayign the commands (not good for action games) btw I still need a good gfx designer to help make game graphix, send me a pm if intersted

General 06-28-2001 12:35 PM

if (timeout) {
if(keydown(0)) //Blah
if(keydown(1)) //Blah
timeout=0.05;
}
keydown will function well

entravial 06-28-2001 01:29 PM

nobody remembers to loop

Solareon 06-28-2001 07:15 PM

damn
 
why did I think of that............ well this is my only script that has used the function so far.

btw If I use disable def movement does the play become invincible?

General 06-29-2001 12:19 AM

Disabledefmovement disables the built-in keydown events, since being hurt diesnt require you to press a key, no it is not disable

grim_squeaker_x 06-29-2001 03:52 PM

NPC Code:
if (weaponfired) this.oldinfo={playerx,playery,playerhearts};
if (playerhurt) {
playerhurtdx=0;
playerhurtdy=0;
playerx=this.oldinfo[0];
playery=this.oldinfo[1];
playerhearts=this.oldinfo[2];
}



All times are GMT +2. The time now is 06:03 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.