QFG fighting interface

Started by deadsuperhero, Wed 11/08/2004 16:05:06

Previous topic - Next topic

deadsuperhero

Hey, I'm just curious, but how do you make a fight interface similar to that of QFG? I really need to know. I already know that you need fighting animations and such, but I'm clueless on the health stats. HELP ME!
The fediverse needs great indie game developers! Find me there!

deadsuperhero

Gee, I know that everyone's probably reading this, but no one has replied to it. Amazingly, everyone replied to everything else within the last few hours. Please help me, peopl!
Oh, and I failed to mention-how do I do QFG-style stats?
ANSWER ME!
The fediverse needs great indie game developers! Find me there!

SilverWizard_OTF

Hey, you should be more patient! Maybe some guys that read your message,  do not know the answer but they try to think what you can do about it!

BE PATIENT!!!
"All we have to decide is what to do, with the time that is given to us"

deadsuperhero

Well, I've been waiting for Freakin' ever. Sorry, It's just that I'm desperate.
The fediverse needs great indie game developers! Find me there!

SilverWizard_OTF

Maybe you can represant your health stat with an object, that will be located somewhere in your screen.
   You can have the Random(int max) script function.
If Random gets 1, then the good guy hits, and run animation, where the monsters is hurted by the player. And the object that represents monster's health, would be change view,  to announce that the monster is hurted. The same things for the player character.

Now, you should have a variable (maybe a SetGlobalInt) for character's health and one for the monster.  Their value will be according health. When e.g. character is hurted, his variable will be decreased by one point. When it reaches zero, it dies (    if(SetGlobalInt() == 0) {   // your code here

I hoped i helped a bit.
"All we have to decide is what to do, with the time that is given to us"

deadsuperhero

The fediverse needs great indie game developers! Find me there!

Scummbuddy

Quote from: Webspider on Wed 11/08/2004 19:34:59
Well, I've been waiting for Freakin' ever. Sorry, It's just that I'm desperate.

You waited a little over 2 hours. Calm yourself and do not freak out again. Other people have lives. If you can not find a template of what you want, nor a thread with your search terms, then figure it out on your own. Don't expect someone to make the whole game for you, nor just wait online for just you to answer every question.Double posting if the thread is going off the first page is sometimes alright, but never just to move it up one higher.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Skio

This is a script I dveleped during free time. Try it.
It creates an life bar on top of the screen.

IN THE GLOBAL SCRIPT :

In the game_start() function:

  RawSetColorRGB(31, 21, 235);
  RawSaveScreen();
  while (GetGlobalInt(399)<100) {   //global int 399 stores the life points
  RawDrawRectangle(10, 10, GetGlobalInt(399)+10, 20);  // this draws the bar
  SetGlobalInt(399, GetGlobalInt(400)+1);
  Wait(1);
  } 


INTERACTION SCRIPTS:

To lose life:
-------------

  SetGlobalInt(399, GetGlobalInt(399)-lifelost);
  if (GetGlobalInt(399)<1) {
    Display("YOU ARE DEAD");
    QuitGame(0);
    }

   if (GetGlobalInt(399)>=70) RawSetColorRGB(31, 21, 235); // this changes the colour of the bar according to the life points
   if ((GetGlobalInt(399)<70) && (GetGlobalInt(400)>=50)) RawSetColorRGB(25, 189, 48);
   if ((GetGlobalInt(399)<50) && (GetGlobalInt(400)>=20)) RawSetColorRGB(230, 238, 17);
   if (GetGlobalInt(399)<20) RawSetColorRGB(235, 41, 21);

  RawRestoreScreen();
  RawDrawRectangle(10, 10, GetGlobalInt(399)+10, 20); 


To restore life:
----------------

  SetGlobalInt(399, GetGlobalInt(399)+liferestored);
  if (GetGlobalInt(399)>100) SetGlobalInt(400, 100);

   if (GetGlobalInt(399)>=70) RawSetColorRGB(31, 21, 235);
   if ((GetGlobalInt(399)<70) && (GetGlobalInt(399)>=50)) RawSetColorRGB(25, 189, 48);
   if ((GetGlobalInt(399)<50) && (GetGlobalInt(399)>=20)) RawSetColorRGB(230, 238, 17);
   if (GetGlobalInt(400)<20) RawSetColorRGB(235, 41, 21);

  RawRestoreScreen();
  RawDrawRectangle(10, 10, GetGlobalInt(399)+10, 20);

Of course you'll have to adjust it a bit and don't forget to declare the variables!
Good Luck.
Î'νδρων Επιφανων Πασα Î"η ΤαφοÏ,

deadsuperhero

Hmmm... I tried that. Could you just make it into a template of it? Just the scripting. Mine says it can't save because of a missing closing brace, but I already put one. I did everything it told me. After you make a template with the script, could you post it here?
The fediverse needs great indie game developers! Find me there!

Moox

Damnit kid, stop being a newb. He wrote you the script, you should be happy with that. Dont beg, get off your ass and try to find where your missing a brace. If you already added it, then your wrong. NOW GO!

jrl2222

I like how some people have all the icons set up to be a help to others but they ask about things that they are suppose to be able to help new people with.

deadsuperhero

Well, yeah...
I'm actually pretty good at AGS, but I never figured out how to do a fighting interface.
Will somebody please help me?
The fediverse needs great indie game developers! Find me there!

Scummbuddy

if you post all your script, we can show you where that missing brace is, but i would definitly suggest you clean up your own code so that you wouldn't have to have this problem. Some people align all their braces and even give them their own line. Whatever helps you have understandable and managable code.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Rulaman

Have you ever tried ?
www.boxfight.de.vu

Available in englisch and german

(I dont know QFG and his fightting interface so much.)
Zak: Komm mit mir Sushi.
Zak: Come with me Sushi.

Edwin Xie

Hey, don't be that impatient (even though I have been that impatient before.............) And you can be happy with what you have there. Just read each and every post carefully, you'll get it. Rulaman.......all I see is german, how do you set it to english? Ah shoot, I should have read the date. Oh well, catches people's attention.
Moving at superhigh speed getting to the planet called Earth. But it is boxed in white......thing.....

strazer

Scorpiorus wrote a QfG battle engine tutorial for the AGS ezine:
http://invis.free.anonymizer.com/http://geocities.com/scorpiorus82/qfgbe_v1.zip

monkey0506

Quote from: Webspider on Wed 11/08/2004 19:34:59
Well, I've been waiting for Freakin' ever. Sorry, It's just that I'm desperate.

3 hours and 29 minutes is NOT "for Freakin' ever."

EDIT: Oh, I just said what Scummbuddy said... Oh well.

SMF spam blocked by CleanTalk