Menu

Show posts

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

Topics - Joacim Andersson

#21
Well, the subject pretty much say it all. I want to get the position in the inventory list an InventoryItem is at, the whole reason is that in my game when you use the item in a special way, it is supposed to change. So I want to replace it with another item, but let the new item be in the same position in the list.

I've searched through the help file but we no success.
#22
I'm trying to have a few constants in my code, the reason is that several of my rooms start a timer, and the on_call function gets an argument that can identify what timer has ended. I wanted to use some named constants for these values for easy maintenance of the code.

I see in the documentation that AGS has some built-in #declare constants and macros, but I don't seem to be able to define my own. I noticed that the const keyword exists, but I can still change the value of that constant, so basically the const keyword doesn't seem to do anything,
Code: ags
const int my_value = 1;
my_value = 2; // <- In my opinion this line should cause a compiler error
Display("%d", my_value); // shows 2

[Edit]
Clarification:
I know I can use #declare, but I want them to be globally accessible, and I don't know how to do that.
#23
Edit: I solved this part but it raised another question, read my own reply post.

Hello, in my GlobalScript file, I have a function like this:
Code: ags
bool KnownNPC(Character* char)
{
  // Some code that loops through an array and checks
  // if the character is in there.
}
In the GlobalScript.ash header file I then have the import statement.
Code: ags
import bool KnownNPC(Character* char);
I then call this function from a Room script, but I get an error with the undefined symbol 'KnownNPC'. Why is that?

I have other functions in a separate script and the import statement in that header file, but I need this function in my GlobalScript.asc file for a specific reason.
#24
Melrin returns and in this adventure game, he is sent out to investigate a rumor that a dragon has returned after two centuries and is now pestering the countryside.

When the game starts Melrin already has three different items in his inventory, his book of magic in which you can read how to create various spells, his cauldron in which you mix ingredients to make the spells, and a magic map on which a new location automatically appears as soon as you've heard of it and you can instantly then travel between different locations.

You have to collect various items spread around the land and often combine different items to create new ones.




It can be downloaded here.
#25
I wanted to import a new Font for dialog boxes however I accidentally imported it over the speech outline font. Is there any way to get that back?
#26
In this game, you play as Melrin a magician disciple. When the game starts Melrin finds himself in a strange place, he has no idea where he is or how he got there. In fact, he has totally lost his memory.

After you've met the Guardian, you will be told that you have magically been transferred to this world to go through the test. A test to see if you are worthy of becoming a full-fledged magician.

You need to find the four crystals of the elements and to do that you have to use all your magic skills, the problem is that you've lost your memory and, because of that, lost all your knowledge about the art of magic. Your magical power has been stored in some spheres that have been spread throughout the land. So you'll need to find them first. You must also find and talk to the Fairy of the Heart, she will guide you throw your adventure.

Download



#27
I don't know if this is a bug in AGS, but I have created a GUI for changing the System.Volume and the Game Speed. However when I open or restore a previously saved game the System.Volume isn't restored to what it was in the saved game. However when I open my "control panel" GUI, the slider for the Volume is still set lower than the maximum.

If I read what System.Volume is set at it reads 13, yet the music and sound effects are playing as if it was set to 100.

As a workaround I put the following code in the on_event handler:
Code: ags
if (event == eEventRestoreGame)
{
  if (System.Volume < 100)
  {
    System.Volume = System.Volume + 1;
    System.Volume = System.Volume - 1;
  }
  else
  {
    System.Volume = 99;
    System.Volume = 100;
  }
}
But it's seems to be a bit redundant to have to do this,
#28
Is it possible to remove and restore Walk-behind areas, just as we can remove and restore walkable areas? Maybe by just changing its baseline via a script?
#29
The game is now released

It's been nearly 20 years since I last used AGS, and boy things have changed. But now that I've picked it up again and have some free time on my hands, I thought I would remake my very first game Melrin: The Disciple Ordeal since the original is not available anymore.

This time it will have completely new graphics since I don't have the original anymore, and it will be in 16:9 format.

If you have played the original there's one big change in this one, the original game had a maze and people hate mazes so I've created a completely new puzzle for that part. Also, you can't die in this game, which you could in the original, instead Melrin will avoid getting in those dangerous situations.

The story: Our hero, Melrin (yes, it's Melrin NOT Merlin) finds himself in a strange land, he has no idea how he got there or why. In fact, he has totally lost his memory. So the first task is to find out where he is and why he's there. After a while, after speaking to a certain character he finds out that he is a magician disciple and he has through magic been transferred to this land to go through his final test to find out if he is worthy of becoming a full-fledged magician.

He has to find the four crystals of the elements and offer them to the gateway of the worlds. To accomplish this he must use all his magical powers, the problem is that since he has lost his memory he has also lost all his knowledge of magic. Thankfully his knowledge of the art has been captured in some magical spheres that are spread all over the land, so he must find these to be able to locate the crystals.





The interface is pretty simple, left click means "walk to" or "interact with" an object or an NPC, and the mouse cursor will flash when you hover over something you can interact with. Right-clicking on an interactive area means "Look at" otherwise the right mouse button will toggle between the regular mouse cursor or the last active inventory item (you can also use the spacebar to do this toggle).

You can see your inventory list by moving the mouse cursor to the top of the screen, where you can also save or restore a game, quit the game, or show some help information.

Progress

Story: 100%
Scripting: 100%
Graphics: 100%
Sound/Music: 100%
#30
When I try to build an EXE for my game I get the following error:

Unable to set EXE name/description: Unable to replace resource: EndUpdateResource for 00000001 failed: 0000006E

What's going on here?
#31
Hi,

I haven't used AGS for almost 20 years, so many things have changed.
I started a new project from an empty game template, and I've added a GUI that will be the toolbar which is displayed when the mouse moves to the top of the screen. I've added an Inventory Window to this. This works, so that when the mouse moves to the top, the GUI is displayed and the Inventory Window shows my Inventory list.

However, I didn't want to cycle through different mouse pointers for different actions, so I only have one Walk mouse pointer, which is animated (it flashes) when over a hotspot or other character. I also have a Pointer mouse cursor, which is correctly shown when over a GUI.

I have written the following code for the mouse:
Code: ags
function on_mouse_click(MouseButton button)
{
  if (IsGamePaused())
  {
    return;
  }
  
  if (button == eMouseLeftInv)
  {
    player.Say("Inventory Item");
    player.ActiveInventory = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
    mouse.Mode = eModeUseinv;
  }
  else if (button == eMouseLeft)
  {
    if (Game.GetLocationName(mouse.x, mouse.y) != "")
    {
      Room.ProcessClick(mouse.x, mouse.y, eModeInteract);
    }
    else
    {
      Room.ProcessClick(mouse.x, mouse.y, eModeWalkto);
    }
  }
  else if (button == eMouseRight)
  {
    Room.ProcessClick(mouse.x, mouse.y, eModeLookat);
  }

}
The problem is that when I click on an Inventory item it doesn't get selected and the GUI just closes, I've added the line player.Say(...) if the button is eMouseLeftInv just to debug the code, but the character never says anything. What am I doing wrong here?
 
#32
I origionally only wanted to make three Melrin games but since I've got so much response from people begging me for more I've desided to make a fourth.

The working name is Betraying the Crown, and even if this is the fourth installment of Melrin it is actually set in time before the first game. So Melrin is still just a magician disciple and as such he sometimes makes a mess of his spells.

The story: Prince Eevail has just tried to kill his own brother, the king, by poisoning his pea-soup. However the king refuse to believe that his brother was behind the attempt. Eevail has left the royal castle and the magician council is convinced that he now plans a new attempt to assasinate the king, so they deside to send out Alfgand, Melrins teacher, to stop him. However this must be done in secret since they can't convince the king of his brothers betrayal. But Eevail has a spy in the magician council and he steals the pages from Alfgands book of magic. Alfgand now needs the help of his disciple, yes that would be Melrin, to find the lost pages and to stop Eevails plans and also to find out who the spy in the council are.

Game play and GUI: In this game you control both Melrin and Alfgand on their quest. They are forced to take different paths so you will need to find a way for them to share inventory items. Like in the earlier games Melrin has his book of spells and his small cauldron in which he creates his spells. However since he's not a true magician yet many of the spells might not have the desired effect. Alfgand on the other hand use a wand for his spells however he can only perform them if he finds the lost pages of his book.

Screenshots:




Fun (?) fact: In the year 1577 King Erik XIV of Sweden died of posioned pea-soup.
#33
I have just updated AGS to the latest version. I opened one of my game made in an earlier version and then the script for one of the rooms stopped to work.

I have a room with just a message that should be shown for a short while and it should then move on to the next room. I use the following code in Players enter screen (after fadein):
  Wait(100);
  NewRoomEx(1, 160, 203);

This worked in version 2.56 (I at least think that was the version I had) but now it just doesn't change room and because of that the game freezes since there is no other way to move on from this "message room".
#34
The third installment of Melrin is now done and ready for you to enjoy or hate....

This time a rumour has reached the royal court that a dragon is pestering the country side. So the king sends out our hero Melrin to investigate.

The GUI is very simple, Left Click = Walk, Talk, or Interact with. Right Click (on an object or other character) = Look at.
The cursor flashes when you're over a hotspot or character with which you can interact.
Move the mouse to the top of the screen to see the inventory list and to be able to save and restore a game.

If you've played Melrin 2 : The Pendant Quest, you know how to handle the magical spell bits, but if you haven't here's a short explanation:

You have a Book of Spells in your inventory, right click on it to see the magical spells available. Pick one of the spells to read on how you create it.

To actually create a spell you need to put the correct items in your bowl (or couldron). Right click on the bowl to create a spell (if you have the correct items the spell is created) or to empty the bowl (and restore the items to your inventory list).

In this game you also have a magical map on which new locations turn up as soon as you hear about them. Right click on it to have a look at it and click on a location to immediatly be transported there.

This game have more puzzles then the earlier Melrin games. Here's a couple of screen shots:





To those of you that have played the demo version I earlier release of this game: Don't think you will have such an easy time during the first part of the game.... I've made some changes and also added a couple of puzzlesÃ,  ;)

Download from here (~2.1 MB)

Enjoy...

Joacim
#35
This game is now released. Have a look here.

[OLD STUFF]
This is a demo of the third Melrin game I'm currently working on. The demo contains the full part 1 (except there is no music yet) of the game that when it's completed will be in two parts.

The plot: A rumor that a dragon is pesting the country side have reached the royal castle. So the king sends out Melrin (now known as 'The Protector', play Melrin2 to find out why) to find out if this rumor is true or not.

The GUI is the same as in Melrin2, you have your Book of Spells and your small couldron in which you create the spells.

[/OLD STUFF]

Here's a screenshot:



Have fun

Joacim
#36
I've made two games for you guys to try out.

The first is called Melrin: The disciple ordeal. I've actually posted Part 1 of this game before, but this time it has been remade and contains all 4 parts.

What I've changed from the earlier post: Many of you complained about the confusion all the scrolling rooms caused so I've changed the resolution to 640x480 so there is no scrolling rooms. I've also changed the GUI to make it easier to spot all hotspots. Instead of being able to cycle through different cursor to walk, look, talk, or interact there is now only one cursor. Left click means either walk, talk or interact. Right clicking on a hotspot or other character means look at.

The cursor now also flashes when you hover a hotspot or other character.

The story: That I can't tell you because our hero Melrin finds himself in a strange land. He has no idea how he got there or what he's doing there. So your first mission is to find out why he is where he is.

Download 3.97 MB

Here's a couple of screen shots:




The second game is called Melrin: The Pendant Quest

This time Melrin has to find the royal pendant that has been stolen, and he has to do it in three days or a curse will destroy his land by fire and water.

Unlike the first Melrin game you can't die in this. The GUI is pretty much the same as in the first game, but you have two items in your inventory with special meaning. The first is your book of magic, looking at it in the inventory will bring up a list of available spells. Clicking on one spell allows you to read how you can create it. The second is your small couldron in which you drop items to create a spell. Looking at the couldron brings up a GUI that allows you to take out items you've dropped in it or allows you to create a spell (if you have the correct items needed).

This game is in hi-color 320x240.

Download 1.38 MB

Here's a couple of screen shots:





Coming soon:Ã,  Melrin 3: The Dragon Menace

Have fun.

Joacim

#37
Hi gang,
[ *OLD STUFF * ]
I've just completed part one of the first game I've ever made with AGS. It's called Melrin: The Desciple Ordeal, and I can't really tell you to much about it because the game starts with that our hero Melrin is in a strange land and he has no idea how he camed there, or why. Actually he doesn't remember anything, beside his name. So your job is first to find out how he camed there and why?

That's the first mission in the game, and because of that I can't tell you anything more about it.
[/ * OLD STUFF * ]
This is now the full 4 part game. I've changed the GUI a bit and also the resolution to 640x480 so you wont be confused by all the scrolling rooms.

You can download it from here:
http://www.brixoft.net/Melrin.zip (3.xx MB)

Please let me know what you think of it, just keep in mind that this is my very first game... Ã, :)

Cheers,

Joacim
SMF spam blocked by CleanTalk