Have you created another character in the character editor pane? If you have, you may have put him in the same room and at the same coordinates as the player character.
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
@4
EGO: Well, bye.
NPC: See ya.
stop
Quote from: Monsieur OUXX on Fri 23/09/2011 10:20:00
if you don't want to make your own plugin to address the issue (as Calin suggested), then use the Luags plugin (you can find it in Google). Ready-to-use top notch scripting.
void peeps::HitTyler()
{
if (didHit == true)
{
if (double == true)
{
Tyler.hp -= this.damage*2;
}
else
{
Tyler.hp -= this.damage;
}
}
}
//And so on for every other character.
Blain.HitTyler();
void peeps::Attack(Character* person, Character* enemy, peeps* attacker, peeps* victim)
{
//Play attacking animations and sound and show some text.
victim.hp -= attacker.damage;
}
Blain.Attack(cBlain, cTyler);
Tyler.Attack(cTyler, cBlain);
Quote from: Wyz+ on Sat 03/09/2011 15:15:39Code: ags player.AddInventory(iCash); player.InventoryQuantity[iCash.ID] = 200;
Quote from: Khris on Sat 03/09/2011 17:11:34
The second line alone will do, unless there's on_event stuff happening.
player.AddInventory(iPotion);
int x = 0;
while(x != 200)
{
player.AddInventory(iCash);
x++;
}
function repeatedly_execute_always()
{
//Clock animation, other stuff, etc.
}
mouse.mode = eModePointer;
Quote from: Wyz on Thu 02/06/2011 17:15:01
Btw I missed a typo earlier: if (hit = 5) should be: if (hit == 5).
peeps Blain;
//GlobalScript.asc above game_start
function initialisePeeps()
{
Blain.attack = "Punch";
Blain.damage = 30;
Blain.hp = 100;
}
//in game_start
function game_start()
{
initialisePeeps();
}
struct peeps
{
int hp;
String attack;
int damage;
import void attack(Character* person, Object* enemy);
};
Blain.Attack(cBlain, oTyler);
//in void peeps::Attack(Character* person, Object* enemy)
Display("%s attacked %s with %s.", person.Name, enemy.Name, this.attack);
Display("%s caused %d damage to %s", person.Name, this.damage*2, enemy.Name);
/in GlobalScript.asc, repeatedly_execute()
lblBlainStats.Text = String.Format("Blain's Stats: Name: %s | Attack: %s | Damage: %d", cBlain.Name, Blain.attack, Blain.damage); //the label in-game shows "Punch" and "30" respectively.
//in BattleSystem.asc, included the import inside the struct in BattleSystem.ash
void peeps::Heal(Character* person)
{
if (teamHeal > 0)
{
this.hp += 20; //doesn't work
Display("%s healed himself by 20.", person.Name); //does work
teamHeal--;
}
else
{
Display("You have no more healing items left.");
}
}
//-------------------------------------------
//In GlobalScript.asc
if (keycode == eKeyHyphen)
{
Blain.hp -= 1;
}
if (keycode == eKeyPlus)
{
Blain.hp += 1;
}
//both of these work
Quote from: Chosim on Wed 01/06/2011 21:19:04
Okay my first question is, must I make a Game in english?
Quote
Cannot declare pointer to non-managed type
//in BattleSystem.asc
function attack(Character* person, Object* enemy, peeps& peep)
{
hit = Random(15);
Display("%s attacked %s with %s", person.Name, enemy.Name, peep.attack);
if (hit = 5)
{
Display("%s's attack missed!", person.Name);
}
else if (hit == 15)
{
Display("%s hit, and it was critical!", person.Name);
Display("%s caused %d damage to %s", person.Name, peep.damage*2, enemy.Name);
}
else
{
Display("%s hit!", person.Name);
Display("%s caused %d damage to %s", person.Name, peep.damage, enemy.Name);
}
}
//in BattleSystem.h
struct peeps
{
int hp;
String attack;
int damage;
};
import function attack(Character* person, Object* enemy, peeps& peep);
Quote
Parse error at '&' //in BattleSystem.ash, where the "import function" line is.
peeps Person1;
peeps Person2;
etc...
Quote from: Khris on Mon 30/05/2011 20:36:29
But you can run the game from the editor without debug mode by pressing Strg+F5.
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.129 seconds with 16 queries.