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

#121
Thanks to both of you. Here is the code for items (after clicking on them):


Code: ags
if (GetGlobalInt(60)>0) {
 int seller = ItemOwner();
 if (ItemOwner()==0) {player.LoseInventory (isocks); character[INV1].AddInventory (isocks);}
 if (ItemOwner()==21) {character[INV1].LoseInventory (isocks); player.AddInventory (isocks);}
 if (ItemOwner()==22) {character[INV2].LoseInventory (isocks); character[INV3].AddInventory (isocks);}
 if (ItemOwner()==23) {character[INV3].LoseInventory (isocks); character[INV2].AddInventory (isocks);}
   }


Dont mind the globalint, its just to check if there is trade in progress.
#122
I have a problem creating a trade inventory for my game. I have a GUI with four inventory windows (similar to the one used in Fallout). One is the players inventory, on the other side is the traders (NPCs) inventory. Than there is inv window for the items that player wants to sell and another window for things he wants to buy. I want the player to be able to click on an item in his inventory and this item will be transfered into the sell inv window and also the other way around. When he click on an item in traders inventory, this item will be transfered to the inv window he wants to buy...

Now... How do I make a script that will "know" in which inventory window is the item located? Because now if I click on an item that is in players inventory, it could travel anywhere if you know what I mean. Also if there are two identical items, one in sellers inventory and the other in players inventory... Oooh! This is so hard. Please help anyone.

Thank you.
#123
Thanks for the reply!

I ran the code and ran into two problems. I placed the first code into global repeatedly exec. and after I tried saving the game it wrote the classic Nested functions not supported problem (closing brace).

As for the second one a more sophisticated error appeared:

Error: run_text_script1: error -6 running function 'recycle_Click':
Error: Null pointer referenced

Any ideas? Please? :)
#124
Hi there, I would like to know how to do an inventory that will handle object properities. So far I managed to add a properties for each object (weight, food, water...).

Now I need my script to calculate how much is my character carrying. Sum up the weight property of each item. I need this because if my character finds a new object and wants to pick it up, the script must check if he can carry it or not:

Code: ags
if (carry+10 <= maxcarryweight) {...


Also, I have a button in inventory that is supposed to recycle/eat/drink selected item... Anyway, after pressing this button I would like to use the getproperty function to subtract item weight from the carrying weight AND lose the selected inventory (active inventory item, because player first needs to select this item and than click the button). In case this is an edible item I want its food or drink property to decrease the hunger or thirst value respectively.

I really dont know how to do this.

Can you help me please? Thx...
#125
Quote from: SteveMcCrea on Tue 26/01/2010 02:17:32
Best non-adventure game category:

All the magical things: the download link asks for an email address. Does anyone have a free link?
Medieval Prisoner: managed to create a "Scoring Chicks" popup box and told me there was no download bandwidth available and would I like to upgrade to premium?
World of our Own: the link takes me to an upload page instead of a download page.


Sorry about that! As I said, Im in China now, so the internet is a hell of a mess! Here is the link for WOO: http://www.gigasize.com/get.php?d=386ynx4zfff
I cannot update the game page link as the internet crashes every time I try to access that page.
All the magical things link and Medieval Prisoners link should now be working.

Gepard
#126
WOO - world of our own

WOO is a little non-adventure simulation of tiny people randomly building their large station, saying random things to each other and having a different interests.



Image:
http://i46.tinypic.com/sy6oea.jpg

You can download it here:
http://www.gigasize.com/get.php?d=386ynx4zfff
or here:
http://www.filehosting.org/file/details/71265/WOO.rar


If you like it, you can vote for it in:
1. Best Innovation
2. Best Non-Adventure Game Created with AGS
#127
Is there a way I can find out the difference between the position.x of player character and some other character and possibly store this result as an int?

Thanks!
#128
Works great :f ) Sometimes the most obvious things just do not get your attention. Thanks for the help and btw. I am one of the few people that actually read the manual :f ) Thanks again!
#129
Not working... Although it was able to compile the script :D Anyway. I would prefer something much less complicated... if there is such a thing. Simply remove the listbox item by its "name" not number...
#130
Hi there. I have troubles creating a quest listbox.

Two quests:
- dig a grave
- find a cadaver

If he will first get the quest "dig a grave" it will be number "1" in the Listbox, but if he will get it after he got the quest "find a cadaver" than it will be number "2"... Now since numbers of these quests in the listbox can be different, how can I remove a specific item from the listbox? I cant. I can only remove it by its number :f ( not by text ("dig a grave").

I have tried this (found in one old thread, but it didnt work where marked)

Code: ags

function AddQuest (String text) {
  quests.InsertItemAt (0, text);
  }

function LoseQuest (String text) {
 int Temp;
 while (Temp < quests.ItemCount) {
 if (quests.Items == text) { //DIDNT WORK
 Temp = quests.ItemCount;
}
Temp ++;
}
}


I would prefer the easiest method if possible. Thanks a million.

Gepard
#131
It sure is. As I said before. Im in China now, so its hard with the internet sometimes. thanks
#132
Yes, there was this possibility. You could not only improve your creepers strength but also gain some new abilities for it like look for food or kill the enemy instantly etc. Im sorry for the bug. I only fixed the button on the desk, therefore if you click on the desk and then on the book button you gain mana. Didnt fix the shortcuts though :) Thanks anyway for playing and for your feedback.
#133
Isnt there a way for the moderator to simply delete such topics?
#134
Well well well... I must say you pretty much went as far as possible in this game. You can conquer all the cities if you want and watch a short outro, but the wizard rank is the last one you can achieve. Btw. did you create a creeper too?

I uploaded a fixed version of the ATM: http://www.filehosting.org/file/details/71948/AMT.rar
#135
I want my character after performing a certain action to lose every inventory item that he posses. Is it possible to do?

Thanks.
#136
Thanks a million. Im really glad someone actually played it AND liked it :f )
#137
Isnt this supposed to be a COMPLETED games announcements? :D
#138
Well I think its obvious now that it is not just my computer :D It must be the game checking the repeatedly execute. It has quite a lot to check to be honest :D
#139
Yes, having users make their own structures sounds good, but unfortunately my scripting knowledge doesnt go that far. Good idea though. On the other hand I think the game slider might just spoil the game. Everyone would just put it to the fastest speed and see what happens. Dunno. I was also thinking of turning this thingie into a screensaver but dont know how. As for their building capabilities: yes, they only build four floors high but they dont rebuild.

Thanks for your feedback Snake.
#140
I also had this idea - If anyone wants to like extend this game, to make it more complex or something like that, I will be happy to send it to you. I would do that myself, but unfortunately I also need to study Chinese a lot so that leaves me with a very little time for AGS. Plus maybe its just me but I noticed that the game doesnt run that smooth after a while.
SMF spam blocked by CleanTalk