Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Gepard

#101
No it did not :( but if I put the dOleg.SetOptionState (11, eOptionOn); as a simple command without if getglobalint... it will show up so it must be something... I dont know. And why is it such a problem for AGS anyway to turn the option on? It looks like a simple script to me.
#102
1. No, it is 51, not 50.
2. I do not know how to clean the code. I do my best really.
3. Character O is NPC named Oleg, its not the player.
4. The Globalint 30 set to different value represents different missions. For each of the missions you need to get specific item and when you have it, you can than talk about it to the "O" character using the option 11 (different reaction is than determined in dialog request function).
#103
 
Code: ags
if (IsKeyPressed(83)==1) {
   if (GetGlobalInt(24)==0) {
   character[O].Walk (171, 104, eBlock, eAnywhere);
   if (GetGlobalInt(30)==2) if (player.InventoryQuantity[44]>=1) dOleg.SetOptionState (11, eOptionOn);
   else if (GetGlobalInt(30)==3) if (player.InventoryQuantity[45]>=1) dOleg.SetOptionState (11, eOptionOn);
   else if (GetGlobalInt(30)==4) if (player.InventoryQuantity[46]>=1) dOleg.SetOptionState (11, eOptionOn);
   else if (GetGlobalInt(30)==5) if (player.InventoryQuantity[47]>=1) dOleg.SetOptionState (11, eOptionOn);
   else if (GetGlobalInt(30)==6) if (player.InventoryQuantity[48]>=1) dOleg.SetOptionState (11, eOptionOn);
   else if (GetGlobalInt(30)==7) if (player.InventoryQuantity[49]>=1) dOleg.SetOptionState (11, eOptionOn);
   else if (GetGlobalInt(30)==8) if (player.InventoryQuantity[51]>=1) dOleg.SetOptionState (11, eOptionOn);
   dOleg.Start ();
   SetGlobalInt (24, 1);
   }
   }


This is the script for while player is standing on region... The option wont show in the dialog. I have no idea why. There is no option-off-forever in my script, globalint was set to number 8 previously and my character has the item 51 so I really dont know what is going on here.
#104
Thanks a lot! :)
Quote from: ShiverMeSideways on Mon 19/04/2010 08:00:24
PS: Is it a bad thing if I'm more interested in non-adventure games made with AGS lately?

Who knows... I was a great fan of adventure games some time ago... still am, I just think that even RPG game can have a good story (or at least some story) within. So why not add some more features? :)
#105



This may look dull and uninteresting but it is not... at least thats what our scientists believe :) Btw. today I decided to add a "random mission feature" into the game. This way you will never run out of missions. It is very simple. You ask a certain character for a mission and he will randomly choose one from lets say 10 missions he can give you (for example to hunt a dangerous animal, deliver goods etc). Once you complete this side quest, you can ask for another mission.
I also added a day - night feature as you can see from the pictures.
#106
I dont know about making the hero bigger now... That would mean I would have to change the backgrounds and some other things. But I was thinking about making the main character more appealing so I will probably add some colour to him and it will be also possible to change his looks (if he gets a better armor).

As for the food and water stats they are quite necessary as some biohazard areas will infect you with bacteria or virus and depending on the type of bacteria you will lose food and/or water appropriately. Other than this case, your food and water bars will only decrease slightly over time.
#107
Hope this works! :)

Quote from: Da_Duke2000 on Wed 14/04/2010 02:41:19I would encourage you to make all the fonts/numbers of the same font and resolution.

I will think about it. So far what you can see (in the big GUI) the big font is actually drawn in MS Paint and only the small font is a real font for things that can change their value so basically I only use one font.

edit by darth - posts combined, no need for a double-post
#108
WI-AA

Now here is a game inspired by Fallout (first two parts). It is an adventure rpg that will give you quests and side quests on your journey to the post-war world. Your character can gain experience and improve his skills. There is a turn based battle system in the game and 6 types of enemy so far (more to come). Trade system is also a part of the game as well as biohazard and radioactive areas that you will need to avoid in order to stay alive. Player will have to keep an eye on his health as well as food and water bars.

So far I managed to finish about 50% of the game. Here are some screens:







If you cant see them try clicking here:
http://www.glowfoto.com/static_image/13-193411L/4982/jpg/04/2010/img4/glowfoto
http://www.glowfoto.com/static_image/13-180727L/3912/jpg/04/2010/img6/glowfoto
http://www.glowfoto.com/static_image/13-193558L/2256/jpg/04/2010/img4/glowfoto

Now my question: What would you like to see in this game?
#109
I have a lot of properties in AGS 2.72 but there are just too many of them and the window is too big so I cant see the ones I added last as there is no slidebar and not even the OK and other buttons. Is there a way around this? Or can I add more and actually be able to see and work with them? Through script maybe? I dont know.

I tried upgrading the game to 3.2. but the program just messes with my shitty Vista (taskbar, theme colour), the window while testing the game is too small as my game is 320x200 and if I want it fullscreen fonts are displayed really ugly and sometimes you cannot see them clearly when in groups of words. Maybe it is because I need the NET Framework 2 but I just cannot uninstall 1.1 version currently on my computer so Im stuck here.

Please help me, Im desperate.
#110
Thanks for the reply. Seems I have found even easier solution. Everytime character stands on the region and presses "S" key I let the script to show all the objects. However, when he clicks on selected object, corresponding item it will be added to his inventory and the object will move outside the room coordinates so its not visible anymore :) Next time all three objects are shown, but player can only see the remaining two.
#111
I have the following script in "while player stands on region":

Code: ags
if (IsKeyPressed(83)==1) { //while key "S" is pressed
  		gObsah.Visible = true; //simple gui shows up...
      container.Text = "container:"; //...with this label. The name can be anything for example wardrobe or box etc.
      if (GetGlobalInt(103)==0) {
        object[3].Visible = true;
        object[4].Visible = true;
        object[5].Visible = true;
        }

      if (GetGlobalInt(103)==1) {
        object[4].Visible = true;
        object[5].Visible = true;
        }

      if (GetGlobalInt(103)==2) {
        object[3].Visible = true;
        object[5].Visible = true;
        }

      if (GetGlobalInt(103)==3) {
        object[3].Visible = true;
        object[4].Visible = true;
        }

      if (GetGlobalInt(103)==4) {
        object[3].Visible = true;
        }

      if (GetGlobalInt(103)==5) {
        object[4].Visible = true;
        }

      if (GetGlobalInt(103)==6) {
        object[5].Visible = true;
        }

      else {}
      }
}


After clicking on a certain object there is this:

Code: ags
if (carry+9 <= carryweight) {  
object[3].Visible = false;
 player.AddInventory (ibeans);
 if (GetGlobalInt(103)==0) {
 SetGlobalInt (103,1);
}
 if (GetGlobalInt(103)==2) {
 SetGlobalInt (103, 6);
   }
 if (GetGlobalInt(103)==3) {
 SetGlobalInt (103, 5);
   }
 if (GetGlobalInt(103)==4) {
 SetGlobalInt (103, 7);
   }
}


As you can see it is really long script. What I wish is to simplify this in any way. Any suggestions please?
#112
Wow! That is pretty handy. I replaced all I could with these pointers and I will replace the enemyx too. However, I need to use the pointers in room scripts too. How can I import them in script header?
#113
I created a pretty clumsy and bulky battle script. One of the main reasons why is it like that is that I dont know how to refer to a certain character. Here is an example:

Code: ags
function MeleeAnimation () {
 gFight.Visible = false;
 character[T].StopMoving ();
 character[M1].StopMoving ();
 character[M2].StopMoving ();
 character[M3].StopMoving ();
 character[U].StopMoving ();
 character[W].StopMoving ();
 character[HB].StopMoving ();
 character[L3].StopMoving ();
 character[L4].StopMoving ();
 if (GetGlobalInt(5)>0) {
 if (player.x < enemyx) {
 player.Animate (6,4,eOnce,eBlock);
 player.FaceLocation (enemyx, player.y, eBlock);
 }
 if (player.x >= enemyx)  {
 player.Animate (5,4,eOnce,eBlock);
 player.FaceLocation (enemyx, player.y, eBlock);
 }
 }
 else if (GetGlobalInt(15)>0) {
 if (player.x < enemyx2) {
 player.Animate (6,4,eOnce,eBlock);
 player.FaceLocation (enemyx2, player.y, eBlock);
 }
 if (player.x >= enemyx2)  {
 player.Animate (5,4,eOnce,eBlock);
 player.FaceLocation (enemyx2, player.y, eBlock);
 }
 }
 gFight.Visible = true;
}


or everyones favorite:

Code: ags
if (battlemove > 0) {
 if (player.Moving == true) battlemove -=1;
 if (character[T].Moving == true) battlemove -=1;
 if (character[M1].Moving == true) battlemove -=1;
 if (character[M2].Moving == true) battlemove -=1;
 if (character[M3].Moving == true) battlemove -=1;
 if (character[U].Moving ==true) battlemove -=1;
 }


and of course:

Code: ags
if (GetGlobalInt(3)==2) {
//SetGlobalInt (3, 1);
if (enemyammo == 0) {
 if (GetGlobalInt(5)==0) {
 if (henemy >0) {
 gFight.Visible = false;
 if (henemy2<=0) SetGlobalInt(3, 4);
 battlemove = enemymove;
 if (enemyname.Text == "brown dog") character[D].Walk (player.x, player.y, eNoBlock, eWalkableAreas);
 if (enemyname.Text == "Tika Liji") character[T].Walk (player.x, player.y, eNoBlock, eWalkableAreas);
 if (enemyname.Text == "Untam") character[M1].Walk (player.x, player.y, eNoBlock, eWalkableAreas);
 if (enemyname.Text == "Weeten thugs") character[M2].Walk (player.x, player.y, eNoBlock, eWalkableAreas);
 if (enemyname.Text == "grey dog") character[W].Walk (player.x, player.y, eNoBlock, eWalkableAreas);
 if (enemyname.Text == "heavy bot") character[HB].Walk (player.x, player.y, eNoBlock, eWalkableAreas);
 if (enemyname.Text == "Lostials guards") character[L3].Walk (player.x, player.y, eNoBlock, eWalkableAreas);
 }
 }


These are just parts of the script. As you can see I need to write down every character in the game that could be involved in the combat because I dont know any other way. Sometimes the fight can include two enemy characters, sometimes just one, never three though. It can start by attacking the char (clickin on it) or by coming close to it. Is there a way to get rid of these long scripts?

Thanks!
#114
Ok, I will :f ) Thanks for all the help here in this topic.
#115

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x0043C24F ; program pointer is -42, ACI version 2.72.920, gtags (112,20)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and notify CJ on the Tech forum.

in InvAmount (line 44)
from InvAmount (line 75)
from Global script (line 466)

Code: ags
function game_start() // called when the game starts, before the first room is loaded
  {
  //trade
    sellstuff.CharacterToUse = cF;
    giveinv.CharacterToUse = cInv1;
    takeinv.CharacterToUse = cInv2;
    sellerinv.CharacterToUse = cInv3;
  //other
    InvAmount.Init (3, 16, Inventory);
    InvAmount.Init (3, 16, giveinv);
    InvAmount.Init (3, 16, takeinv);
    InvAmount.Init (3, 16, sellerinv);
    mouse.Mode = eModeLookat;
    SetTimer (1, 36000);
//Traders
  //Belkirt
  Belkirt = 250;
  InvAmount.AddInv (character[B], iwater, 2);


Last line is the number 466

44 -   RawSaveScreen();
75 -   IAUpdInvItem(who, item);
#116
Hm... Now it gives me this:


Error: run_text_script1: error -6 running function 'game_start':
Error: Null pointer referenced
in InvAmount (line 36)
from InvAmount (line 75)
from Global script (line 459)

 
Code: ags
InvAmount.AddInv (character[B], iammopack, 5);
  InvAmount.AddInv (character[B], ijerky, 5);
  InvAmount.AddInv (character[B], ibread, 2);
  InvAmount.AddInv (character[B], ilockpicks, 1);
  InvAmount.AddInv (character[B], ilighthelmet, 1);


#117
Oh yes, thats easy. Thanks. One more and hopefully last question. I am currently using your module Khris called Invamount. While it worked great so far, now Im having difficulties with it. It seems that when I add items to a character at game start like this:

 
Code: ags
character[B].AddInventory (ilockpicks);
  character[B].AddInventory (ilighthelmet);
  character[B].AddInventory (iammopack);
  character[B].AddInventory (iammopack);
  character[B].AddInventory (iammopack);
  character[B].AddInventory (iammopack);
  character[B].AddInventory (iammopack);


and than I open this four inventory windows gui, the ammo packs are displayed as one icon but the number is missing or not visible... And when I click on the ammo packs to move them to the inv window that contains things I wanna buy, the script always moves one more. If i click twice, I end up with three ammo packs but I only had to pay for two of them etc...
#118
Now I have four inventory windows. Everything is working fine, considering moving items from one place to another. Now I need the "confirm trade" button to get all the items from one inventory into another inventory window. So far I managed to lose all inventory items from one window, but i dont know how to transfer them to another inventory.

 
Code: ags
int i = 1;
  while (i <= Game.InventoryItemCount) {
    character[INV1].InventoryQuantity[i] = 0;
    i++;
  }
  UpdateInventory();

Thanks!
#119
Yes, that works great!

THanks for help!
#120
Well... :D

Yes I am. Dont know how else to do that. To be exact the code now looks like this:

Code: ags
if (GetGlobalInt(60)>0) {
 int charsell = ItemOwner();
 
 if (ItemOwner()==0) {
		player.LoseInventory (isocks);
		character[INV1].AddInventory (isocks);
		value1 += inventory[5].GetProperty ("VALUE");
 }

 if (ItemOwner()==21) {
		character[INV1].LoseInventory (isocks);
		player.AddInventory (isocks);
		value1 -= inventory[5].GetProperty ("VALUE");
 }

 if (ItemOwner()==22) {
		character[INV2].LoseInventory (isocks);
		character[INV3].AddInventory (isocks);
	  value2 -= inventory[5].GetProperty ("VALUE");
 }

 if (ItemOwner()==23) {
		character[INV3].LoseInventory (isocks);
		character[INV2].AddInventory (isocks);
	  value2 += inventory[5].GetProperty ("VALUE");
 }

}


Value1 and 2 is displayed as a total value of all items that you want to sell/buy.
SMF spam blocked by CleanTalk