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 - HandsFree

#41
Most sprites in the walkcycles have the feet touching (or almost touching) the base of the graphic. But some have the character 'floating' in the picture with quite some transparent pixels between the feet and the base of the graphic.
I expected the character to jump around because of this but that's not happening. The behaviour around the edges of different walkable areas is however very unpredictable (for me).

Does AGS see the character's y-coordinate as the lowest non-transparent part of the sprite? Should all sprites in a walk cycle be cropped to have the feet touch the base, or is that not important?

thanks
#42
I have a function view_from_tree() that I want to call from a dialog.
@3
  view_from_tree();
return

I thought the function should be in the global script, but when I put it there I got error in dialog: Undefined token view_from_tree(). So I tried putting the function in the room script from where the dialog is called, but that gives the same error.

How should I do this?
thanks
#43
I'm trying to add some things to a game that already has a lot of scripting done.
It has a function ShowDeathGui(CauseOfDeath cod) that makes the gui visible and shows text and picture depending on 'CauseOfDeath'.

That's all ok, but now we want to add a 'try again' button. What happens when you click it is also depending on CauseOfDeath. So is there a way to make CauseOfDeath available in btnTryAgain_OnClick?

I suppose I can make CauseOfDeath a global variable, but that would change the way it was setup were it was a parameter to the ShowDeathGui function. So I was wondering if it's possible to keep that intact.

thanks
#44
In room_RepExec() I add one to a counter every loop and when the counter is 600 a character enters the room, walking, eBlock.
This is ok, but when there's a gui visible like the inventory, apparently the repexec continues and the game freezes when the counter is 600. The gui is set to 'pause game when shown'.

How can I make sure the game repexec doesn't execute when there's a gui visible? Note this is not repexec_always.

thanks
#45
I'm trying to store messages on different subjects in a table and wanted to do something like:
String Message [10, 10];
And then use counters for row and column to find/set the texts:
lblText.Text = Message[iColumn, iRow].
Apparently this isn't supported (yet?).

From the manual it doesn't look like I can use a struct this way.
Is there a way I can do something like this? Navigating a table using two counters?

thanks
#46
I found a lot of posts dealing with something like this, but I'm still not sure what I should do here.  (wrong)
I want to reset some things after a leftclick if it has caused the mouse.mode to change. For instance when you pick something up and the mouse changed from interact to useinv.

I tried
function on_mouse_click(MouseButton button) {
  if (button == eMouseLeft){
    iLastCursor = mouse.Mode;
    ProcessClick(mouse.x, mouse.y, mouse.Mode);
    if (iLastCursor != mouse.Mode) ResetCommands();
  }
}
But the ResetCommands() doesn't happen. Without the condition it doesn't work either.
If I put the ResetCommands() in the interact function it works:

function oOpenDrawer_Interact()
{
  cEgo.AddInventory(iBook);
  cEgo.ActiveInventory = iBook;
  ResetCommands();
}

But of course I like to have it in one place. Is there a way to get it to work in the on_mouse_click function?
thanks
#47
In my last game I used a gui label for all text output. That way I had all text nicely displayed in the same gui. That worked fine for me and I would like to do the same thing in a next game.
But what if I decide to add voice acting? Is it possible to add voiceacting when there's no dialog and no .say commands?

Instead of cEgo.Say("&10 Hi! How are you?");
Can I do something like lblText.Text = "&10 Hi! How are you?";?
#48


The people of Issegeac believe that their good fortune depends on the spellbook that has been in their village for over nine centuries. When the keeper of the text, your grandfather, is killed and the Grimoire stolen, the villagers ask your help.
Now it is your task to find the Black Sect's hideout and return the spellbook to Issegeac.

Lankhor's Black Sect is a great game. It has however a few features that where normal in 1993 but aren't so popular today. The game is timed, has dead ends, only 5 save slots, 20+ action icons, no smart cursor and you can die.

To make the game accessible to more players this remake features among other things:
- Timeflow based on player actions, so no dead ends
- Unlimited save slots (Well, I don't know that. More than 30 anyway)
- 2 action cursors
- Smart cursor that lights up over interactive areas
- Extra puzzles
- Changed puzzles to suit the new interface
- Updated hint system
- New sound and music

And kept from the original game:
- first person exploration
- Lankhor's art and animations (mostly)
- 31 locations to explore
- day and night cycle

Thanks to Cat and Arj0n for testing and additional graphics.

Download the game here

Hope you like it. :)

26-6-2012: Arj0n wrote a walkthrough for this remake. You can find it here
#49
Searching the forum gave me this code:

if (GUIControl.GetAtScreenXY(mouse.x,mouse.y) == buttonname) {
    mouse.Mode = eModePointer;
}

This works but I like to change the cursor on any guibutton, not a specific one.
How do I check the coordinates to find if there's any button or not?

Also this way the cursor doesn't change back when the pointer is no longer over the button. I tried mouse.SaveCursorUntilItLeaves() but that doesn't work. I assume that is because it's in repeatedly_execute(). Any ideas on this?

thanks
#50
Don't know if it has to do with the site upgrade but when I try to edit the page of my game in the database I get the error "Forum verification failed. Your session may have timed out. (Auth=)" (and that's only after a few seconds).

I wanted to change the url to my game because the RON site seems to be back to it's 2008 state, when the game wasn't yet there...
Any idea what's happening?
thanks

#51
I have a few adjacent rooms that should have the same sounds playing.
In the room_load of each room I have:

  if (iHours < 20){
    if (Daysound == null || !Daysound.IsPlaying){
      Daysound = aBirds.Play();
    }
  }
  else{
    if (Daysound != null && Daysound.IsPlaying) Daysound.Stop();
    if (Nightsound == null || !Nightsound.IsPlaying) Nightsound = aNight.Play();
    if (Crickets == null || !Crickets.IsPlaying) Crickets = aCrickets2.Play();
  }

Now if I set iHours to 20 in the global variables pane this works fine. The sounds don't restart when I change rooms.

But If I set iHours to 19 and do some in-game things that set iHours to 20, then the sounds restart on every changeroom.
As if the (Nightsound == null || !Nightsound.IsPlaying) condition is true every time.

Any ideas why this happens?
thanks
#52
I'm using a label with @OVERHOTSPOT@. According to the manual that should give the hotspot name (but instead it gives the description, which is fine).

But I like the description to change during gameplay. Is that possible?
hotspot.description = "new name" doesn't work cause it's read only.

thanks
#53


Long ago, people were disappearing in the small French village of Issegeac. The villagers lived in fear and finally went to the Great Homerius, renowned exorcist for help. After exausting the many spells from his spellbook, Homerius declared Issegeac safe again.
Before leaving, he told the villagers: "Good people, peace has returned. Do not be afraid! I have to go but I'll leave this grimoire. It will be your protection, do not misplace it." With these words, he left Issegeac and the spellbook was given to the village elder, who was none other than your grandfather.

For many years, Isségeac lived in peace, until... one evening a stranger arrived in the village. The next morning, your grandfather was dead and the spellbook gone.
Now it's up to you to find the Black Sect's hideout and return the spellbook to your village.


Yes, another remake.
Lankhor's Black Sect is insanely difficult, at least by today's standards.
The whole game is timed and you can die, but there are only 5 saveslots.
There are over 60 inventory items, but you can only hold 5 at one time.
And it has 16 different action icons plus a few extra.
In addition, some hotspots are only 1 pixel big and a smart cursor wasn't yet invented in 1993.

Even following a walkthrough to the letter I had a hard time finishing it, and in the end I wondered what the game would have been like if I could have just experienced it the normal way, finding things out myself.

So the remake will have a smart cursor, only 2 action icons (look/act), no timing and an upgraded gui and inventory system. I'm keeping the original art, including background animations, but sound and music will be updated.
This way the game may end up extremely easy but I'll worry about that later. :)

Overall status: 40% done.

NB Did anyone here ever play Black Sect?

30-5-2012: The game is now ready for testing. (testers found)
#54
I found a topic with the exact same question but still I seem to be missing something.  >:(

I have:
// main global script file
struct Hint{
  bool done;
  String description;
};

Hint Hints[50];
export Hints;

I can work with the struct as long as it's from the global script, but not from the room scripts.
I tried putting "import Hint Hints[50];" in the room scripts and in the GlobalScript.ash, but it keeps saying "expected variable or function after import, not 'Hint'."

What am I doing wrong?

thanks
#55
I've been playing around with the idea of doing a Black Sect remake and for that I took quite a few screenshots and loaded them in AGS. Now I just found out that the screenshots (and the objects and cursors) have a bit depth of 32.
The game's color depth is set to 16 bit by default.

Will this become a problem? Do I have to change the game's color depth? Does this have any consequences?

thanks
#56
Cat reported a crash in my game: room38 line 5 Error: MergeObject: unable to merge object due to color depth differences.
She used DirectDraw 5 while I tested with Direct 3D 9.

The code for room 38 is:
function room_AfterFadeIn()
{
oTownsquare.MergeIntoBackground();// this is line 5
Wait(40);
...
}

Is there anything I can do to prevent this?
thanks
#57
A mysterious advertisement in The Realiser fails to shock the citizens of RON.
Is Elandra Desmond the only one that sees the danger facing Reality-on-the-Norm, or do the townspeople have their own agenda?
And how does the disappearance of Davy and Mika connect to it?

Night and Day is my first attempt at learning AGS.
Thanks to Renegade Implementor and Ponch for testing and advice!

Download the game here

Hope you like it. :)



#58
Beginners' Technical Questions / crashinfo.dmp
Wed 02/11/2011 23:55:32
I have this in Room_Load:
  if (cLan.PreviousRoom == 3){
    int ran=Random(150);
    aJukebox.PlayFrom(ran*1000);
  }
To test it I entered and left the room several times. After a few times the system crashed and I got a message the file crashinfo.dmp was created. I found the file but can't read it.
The sound file is longer then 150 seconds, so that can't be the problem.
Is this code wrong? Any ideas why this crashed?
What's the use of the dumpfile?

thanks

NB I tried it again but no crash after about ten times...
#59
In room_AfterFadeIn() for room 21 I have:
if ((cLan.PreviousRoom == 19) || (cLan.PreviousRoom == 36) || (cLan.PreviousRoom == 8 )) aNight.Play();

The soundfile only plays if the previous room was 36, but not coming from 19 or 8.
The only difference I can think of is that room 36 also has an ambient sound file playing (and 19 and 8 are silent).

In room 36 I have:
if ((cLan.PreviousRoom == 21) || (cLan.PreviousRoom == 34)) aCrickets.Play();
And that gives no problems.

Any ideas why aNight only plays when coming from room 36?
This is version 3.2.1.
#60
In unhandled_event I have:

else if (mouse.Mode == eModeUseinv){
      if (GetLocationType(mouse.x, mouse.y) == eLocationNothing) return; // do nothing
      if (player.ActiveInventory == iMoney){
        player.Say("That's not for sale");}

This ensures that you only get the response if you click the money on a hotspot or object.
But... if there is a scripted response for another inventory item on that hotspot, nothing happens.
I understand that that is how this code works. But is there a way to script it so you also get the response "That's not for sale" if there's existing code for another inventory item?

thanks
SMF spam blocked by CleanTalk