Making an RPG with AGS: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 151: Line 151:
You can level up in the game after you have a definite exp. points. For example in the repeatedly_execute section:
You can level up in the game after you have a definite exp. points. For example in the repeatedly_execute section:


''if (GetGlobalInt(4)>=60) {
''if (GetGlobalInt(4)>=60) {''
Display("You leveled up and gained the magics of Cure +2, Fireball +2 and 6 mana points .");


AddInventory(10);
''Display("You leveled up and gained the magics of Cure +2, Fireball +2 and 6 mana points .");''
AddInventory(11);
LoseInventory(4); //losing the old Cure +1 magic


SetGlobalInt(2,GetGlobalInt(2)+6);
''AddInventory(10);''
}''
''AddInventory(11);''
''LoseInventory(4); //losing the old Cure +1 magic''
 
''SetGlobalInt(2,GetGlobalInt(2)+6);''
''}''


The player will gain some new magics. Sure, you can use your own scripts for level up.
The player will gain some new magics. Sure, you can use your own scripts for level up.
'''  
'''  
Different Endings:'''
Different Endings:'''
Line 178: Line 180:
''Wait(120);''
''Wait(120);''
''if (GetGlobalInt(12)>=3) {''
''if (GetGlobalInt(12)>=3) {''
''Wait(40);''
''Wait(40);''
''NewRoom(62);''
''NewRoom(62);''
''}''
''}''
''if (GetGlobalInt(12)<3) {''
''if (GetGlobalInt(12)<3) {''
''Wait(40);''
''Wait(40);''
''NewRoom(57);''
''NewRoom(57);''
''}''
''}''


0

edits