Making an RPG with AGS: Difference between revisions

Jump to navigation Jump to search
Line 64: Line 64:
[[Image:tuto-enemy1.PNG]]
[[Image:tuto-enemy1.PNG]]


Then use these inventory items for the enemies. (The enemies in Asporia was actually hotspots, but you can use Characters as enemies.).
Then use these inventory items for the enemies. (The enemies in Asporia was actually hotspots, but you can use Characters as enemies.) The first scripts you should use for the fireball magic :


The first scripts you should use for the fireball magic:
''PlaySound(1); //plays the sound''


''PlaySound(1); //plays the sound
''Display("You throwed a fireball to the undead.");''
Display("You throwed a fireball to the undead.");
 
SetGlobalInt (5, GetGlobalInt(5)-3); //enemy HP is decreased 3 points
''SetGlobalInt (5, GetGlobalInt(5)-3); //enemy HP is decreased 3 points''
SetGlobalInt (2, GetGlobalInt(2)-1); //your MP (mana point) is decreased 1 point.
 
SetGlobalInt (4, GetGlobalInt(4)+3);//gained 3 exp. for using magic.''
''SetGlobalInt (2, GetGlobalInt(2)-1); //your MP (mana point) is decreased 1 point.''
 
''SetGlobalInt (4, GetGlobalInt(4)+3);//gained 3 exp. for using magic.''


And the second step of the scripts (write them in the next "Run Script" hotspot command):
And the second step of the scripts (write them in the next "Run Script" hotspot command):
0

edits

Navigation menu