I'm building my game on top of an older game of mine, that's why some of the things are outdated. But I fixed it now
Thanks for your help.

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 MenuHotspot *player_hotspot = Hotspot.GetAtScreenXY(player.x,player.y);
int standing;
function repeatedly_execute_always()
{
if (!player.Moving)
standing=0;
}
function on_mouse_click(MouseButton button){
if ((button == eMouseLeft)&&(mouse.Mode==eModeInteract)){
player.Walk(GetViewportX()+mouse.x, GetViewportY()+mouse.y, eNoBlock);
Hotspot *h=Hotspot.GetAtScreenXY(mouse.x, mouse.y);
standing=h.ID;}
}
//then, on the particular hotspot/location walkon function:
function hAnyGivenHotspot_WalkOn()
{
if (standing==hAnyGivenHotspot.ID)
Display("It worked!");
}
Quote from: Snarky on Mon 15/01/2018 12:47:24Speech color: 184; 184; 248
Thanks! Could you also post your speech font and speech color settings, and SpeechBubble configuration?
Also, that white wedge that covers up some of the text in the second image, is there a reason for that or another bug?
function cNacho_Look()
{
player.SayBubble ("I'm looking good!");}
}
function cNacho_Talk()
{
player.SayBubble ("As much as I'd enjoy talking to myself, I have better things to do with my time.");
}
btnAmmo.Width-=20;
Bullets_magazine--;
function Reload_gun (){
//int Bullets_to_load= Maths.Min(Magazine_size - Bullets_magazine, Bullets_total); ERASED THIS BECAUSE IT DIDN'T WORK
if (Bullets_total!=0){
Bullets_to_load=Magazine_size-Bullets_magazine;
if (Bullets_to_load > 0){
if (Bullets_to_load>Bullets_total){
Bullets_magazine=Bullets_magazine+Bullets_total;
Bullets_total=0;
}
else
{
Bullets_total -= Bullets_to_load;
Bullets_magazine += Bullets_to_load;
}
aReloadgun.Play();
btnAmmo.Width = 20 * Bullets_magazine;
}
else{
aEmptygun.Play(); // to be replaced with a "can't reload, full gun" sound, or something
}
}
else
{
aEmptygun.Play();
}
}
Stats personaje [100];
export personaje;
struct Stats{ //character stats
int Health;
int Damage;
int Defense;
int Luck;
};
import Stats personaje[100];
personaje[this.ID].Health-=personaje[player.ID].Damage-personaje[this.ID].Defense; //how much health is the enemy gonna lose
Quote"Shoot.asc(19): Error (line 19): Undefined token 'personaje' "
// new module script
//what happens when you shoot someone
function Shoot (this Character*, AudioClip* sonido, int Velocidad2){ //extender function. usage: cCharacter.Shoot(aSound, X), where X is the amount of speed increase in the character's movement after being shot.
//if you have bullets, and you hit your target:
if (Bullets_magazine!=0){
btnAmmo.Width-=20;
Bullets_magazine--;
Score++;
Velocidad+=Velocidad2; //increasing the speed of the target after being shot, like in classic NES games.
this.StopMoving();
//this.Teleport();
this.SetWalkSpeed(Velocidad, Velocidad);
this.Walk (walkx, walky);
personaje[this.ID].Health-=personaje[player.ID].Damage-personaje[this.ID].Defense; //how much health is the enemy gonna lose
//String HPenemigotxt = String.Format("HP %s: %d", this.Name, Health[this.ID]);
String HPenemigotxt = String.Format("HP %s: %d", this.Name, personaje[this.ID].Health);
lblHPenemigo.Text=HPenemigotxt;
aGunshot.Play();
sonido.PlayQueued();
}
else{ //if you have an empty clip
aEmptygun.Play();}
}
// new module script
function Reload_gun(){ //important: every bullet is 20 px wide in the GUI, which is the origin of the 20's seen below.
Empty_ammo=Maxammo-(btnAmmo.Width/20); //global var representing bullets missing from the magazine, i.e fired bullets
if ((btnAmmo.Width!=Maxammo*20)&&(Bullets>0)){ //don't do anything if magazine is full or you don't have bullets
if (Empty_ammo>Bullets){
btnAmmo.Width=btnAmmo.Width+Bullets*20;
Bullets=0;
}
else{ //we have enough bullets to fill the magazine no matter what
Bullets-=Empty_ammo; //lose the amount of bullets missing (1-6)
btnAmmo.Width=btnAmmo.Width+Empty_ammo*20; //ammo = ammo left + ammo missing
Empty_ammo=0;
if (btnAmmo.Width>Maxammo*20){ //so you can't have more bullets than the size of your magazine
btnAmmo.Width=Maxammo*20;
}
}
aReloadgun.Play();
}
else {
aEmptygun.Play();
}
}
Quote from: Radiant on Thu 26/12/2013 01:08:49Why don't you write a tutorial instead? At least the basics of how to make one...
Well, fellow adventure gamers, let me tell you a little story. Years ago, when I was new to AGS and all I had written so far were some action/puzzle games, I first came across this site and thought it was awesome (and by the way, I still think it is awesome, and more so every year). That's basically because I grew up with adventure games, and I learned English by playing King's Quest and Space Quest and figuring out what commands to type. So obviously I made plans to write a game in AGS, but since I was doing puzzle games I was also looking into other genres than just adventures. And then I noticed this thread or its predecessor: is it possible to design an RPG in AGS? I thought about it for a while and concluded yeah, sure. As far as I know, back then nobody had actually done any RPGs yet, so I decided I would go and write an RPG, and then make a post in this thread here containing just the word "yes" and a link to my game. Well, it took awhile; game design takes up quite a bit of time and real life has a tendency to interject itself every now and then, so it's now almost ten years after I first registered for bigbluecup. That means that there have been several RPGs made before, and nobody has to prove any more that something is possible in AGS because we've all seen how versatile the engine actually is. That said, RPGs are still great and so are AGS games, so there's always room for another AGSRPG; it was fun to write one and I hope other people remain inspired to write more. So without further ado,YES!
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.636 seconds with 17 queries.