Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: VII Toast on Sat 23/10/2004 19:57:15

Title: Is there a way to delete characters?
Post by: VII Toast on Sat 23/10/2004 19:57:15
(Original question dealt with characters and .cha files.)

When my character has or had an item, how do I make sure he can't keep getting it back again? Like you can only get it once.
Title: Re: Is there a way to delete charaters?
Post by: Edwin Xie on Sat 23/10/2004 20:08:12
No, you can't delete characters and you export characters to .cha file.
Title: Re: Is there a way to delete charaters?
Post by: VII Toast on Sat 23/10/2004 20:21:11
Poo. I hate that.

Alrighty, thanks.
Title: Re: Item Help
Post by: Goot on Sat 23/10/2004 21:48:51
Huh? Edwin Xie's answer didn't make much sence to me. Maybe I don't understand the question. If the item is an object, you can turn the object off. Otherwise, set a variable for whether they've gotten it or not. You can also use the character[CHAR].inv[INVNUMBER] variable to see how many 'copies' of the item the player has. If you don't want them having 2 of the same thing at once, in repeatedly execute (always):

int use;


use=1;
while(use<x){//replace x with number of items
if(character[GetPlayerCharacter()].inv[use]>1){
character[GetPlayerCharacter()].inv[use]=1;
}
use++
}
UpdateInventory();
Title: Re: Item Help
Post by: VII Toast on Sat 23/10/2004 22:07:35
int use;


use=1;
while(use<x){//replace x with number of items
if(character[GetPlayerCharacter()].inv[use]>1){
character[GetPlayerCharacter()].inv[use]=1;
}
use++
}
UpdateInventory();


That?
Title: Re: Item Help
Post by: Edwin Xie on Sat 23/10/2004 22:39:48
Goot, VII Toast modified the title and his post. The post was originally asking about characters.
Title: Re: Item Help
Post by: VII Toast on Sun 24/10/2004 03:22:54
Soo...that's the code right? ???
Title: Re: Item Help
Post by: TerranRich on Sun 24/10/2004 03:56:37
VII Toast, I believe I have told you this before. I may be mistaken though.

Please try not to alter your first post. It makes the entire thread make no sense. Instead, you are allowed to start a thread. It is, after all, a new topic and a new question.

I am asking you to please put your original post back to what it was before and start a new thread. Otherwise, I will do it for you. Guess I can't do it myself. :P