Hello all, long time no see! I was wondering if an Android port of AGS runtime exists? I remember something JJS made a long time ago that worked, is that still the go to? I would love to play some games again!
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
// Main header script - this will be included into every script in
// the game (local and global). Do not place functions here; rather,
// place import definitions and #define names here to be used by all
// scripts.
int health; //enemy health
export health;
// Called when the game starts, before the first room is loaded
function game_start() {
// Put the code all in a function and then just call the function.
// It saves cluttering up places like game_start.
initialize_control_panel();
// Use the KeyboardMovement module to, per default, replicate the standard
// keyboard movement of most Sierra games. See KeyboardMovement.txt for more info
KeyboardMovement.SetMode(eKeyboardMovement_Pressing);
health = 100; //declared enemy's HP
}
function repeatedly_execute() {
// Put here anything you want to happen every game cycle, even when
// the game is paused. This will not run when the game is blocked
// inside a command like a blocking Walk()
if (IsGamePaused() == 1) return;
// Put here anything you want to happen every game cycle, but not
// when the game is paused.
//checks enemy's health to make him disappear when it's 0 or below
//doesn't actually do anything; you can still hit the enemy, but it's
//for demo purposes
if (health <= 0){
if(cFoe.Transparency > 0){
return;
}
cFoe.Transparency = 100;
return;
}
}
function repeatedly_execute_always() {
// Put anything you want to happen every game cycle, even
// when the game is blocked inside a command like a
// blocking Walk().
// You cannot run blocking commands from this function.
//this whole next block is for displaying the int health on the statusbar on label3
//and checking when to check for hit detection while Link is in his
//attacking view and apply damage by subtracting from health
Label3.Text = String.Format("%d", health);
if (cLink.Frame == 6){
cLink.ChangeView(VIEW2);
}
while (((cLink.View == ATTACK) && (cLink.Animating == true) && (cLink.Frame >= 4))) {
if (cLink.IsCollidingWithChar(cFoe)){
health = health-4;
}
return;
}
}
function on_key_press(eKeyCode keycode) {
// The following is called before "if game is paused keycode=0", so
// it'll happen even when the game is paused.
//for animating Link's attack
if (keycode == eKeyX){
cLink.ChangeView(ATTACK);
cLink.Animate(2, 1, eOnce, eNoBlock, eForwards);
}
}
// Main header script - this will be included into every script in
// the game (local and global). Do not place functions here; rather,
// place import definitions and #define names here to be used by all
// scripts.
import function AddHealth(int amount) {
player_health += amount;
btnHealthMeter.Height = player_health;
}
function room_AfterFadeIn()
{
int trans = object[0].Transparency;
Wait(120);
cRobot.Walk(54, 225, eBlock, eAnywhere);
cRobot.FaceLocation(54, 100);
Wait(120);
Switch.SetView(3, 0, 1);
Retro.Visible = true;
while(trans >0){
trans--;
object[0].Transparency=trans;
}
cRobot.Walk(425, 225, eBlock, eAnywhere);
}
//managing movement values and gravity--
if (gravity < 6) {gravity=gravity+1;}
if ((IsKeyPressed(375)==1)&&(xmove>-3)) {xmove=xmove-1;}
if ((IsKeyPressed(377)==1)&&(xmove<3)) {xmove=xmove+1;}
if ((IsKeyPressed(375)==0)&&(IsKeyPressed(377)==0)&&(xmove>0)) {xmove=xmove-1;}
if ((IsKeyPressed(375)==0)&&(IsKeyPressed(377)==0)&&(xmove<0)) {xmove=xmove+1;}
//jump----------------------------------
if (IsKeyPressed(32)==1){
player.y=player.y+2;
if (GetWalkableAreaAt(player.x-GetViewportX(),player.y-GetViewportY())==1) {gravity=-12;} // jump
player.y=player.y-2;
}
}
function on_key_press(int keycode){
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.076 seconds with 14 queries.