Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Thu 26/01/2006 00:13:07

Title: Globalint scripting help
Post by: on Thu 26/01/2006 00:13:07
 Im making a rpg and i need to add in something to the script to make health, mana,etc. I looked in the rpg tutorial and it said to use the 'globalint' command or 'givehealth'. Both of these commands are unreconized by th system.  What should i do?
Title: Re: Globalint scripting help
Post by: Ashen on Thu 26/01/2006 00:23:59
I would suggest you read the manual, and re-read the tutorial for more details.

The 'global int' command is going to be GetGlobalInt (http://www.adventuregamestudio.co.uk/manual/GetGlobalInt.htm) and SetGlobalInt (http://www.adventuregamestudio.co.uk/manual/SetGlobalInt.htm). (BFAQ entry - GlobalInts: Your Friend (http://americangirlscouts.org/agswiki/index.php/Scripting%2C_Code_%26_Interaction#GlobalInts.2C_your_friend:_what_they_are_and_how_to_use_them))

'givehealth' is either a custom function (BFAQ Entry on custom functions (http://americangirlscouts.org/agswiki/index.php/Scripting%2C_Code_%26_Interaction#Creating_your_own_custom_functions)), or a custom variable (BFAQ entry on variables (http://americangirlscouts.org/agswiki/index.php/Scripting%2C_Code_%26_Interaction#Working_with_variables:_the_basics)) - without knowing what tutorial you used, I can't say which.
Title: Re: Globalint scripting help
Post by: monkey0506 on Thu 26/01/2006 04:03:49
You might also want to consider using a struct (http://www.adventuregamestudio.co.uk/manual/struct.htm) instead.