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

Messages - Scavenger

#161
Yeah, put this in the Global Script, near the top, before you call it at any point.

You should also put this in the Global Script Header (the ASH file that goes with the global script):

Code: AGS

import function SayAnywhere (this Character*, String text);


And then you'd be able to call this function in rooms as well.
#162
Something like this?

Code: AGS


function SayAnywhere (this Character*, String text)
    {
        int prevroom = this.Room;
        int prevx = this.x;
        int prevy = this.y;
        if (prevroom != player.Room)
            {
                this.ChangeRoom (player.Room,-1000,-1000);
            }
        this.Say (text);
        this.ChangeRoom (prevroom,prevx,prevy); //does nothing if the character is already present.
    }


I haven't tested it, but it should work. Use it anywhere you would usually use Say for any character who is going to be speaking through rooms.

It is a little bizarre that the Sierra mode of speaking doesn't use a portrait if the character isn't in the room, though. I wonder why it does that.
#163
Bring them into the room, but have them be offscreen, such as at -100,-100, so they never actually are visible in the room. Then, when you are done with them, move them back to their original room.
#164
Alright! I might do more, but this is what I got so far:

[imgzoom]https://dl.dropboxusercontent.com/u/50882197/art/raccoon_sidekick.PNG[/imgzoom]

An early 90s hi resolution adventure game in which you play a private investigator, with their pet raccoon. Need something opened, stolen, or otherwise messed around with? Your buddy is always there to lend a helping paw to do things that doing yourself might not be strictly legal! His fingerprints aren't permissable in a court of law! Probably!
#165
Tested it out on my game, Heatwave. It works fine (apart from the obvious colour issues in fullscreen), however....

Code: ags
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x004B6EC5 ; program pointer is -41, ACI version 3.4.0.6, gtags (0,0)

...

in "Room26.asc", line 8


happens when you switch from fullscreen to windows mode while PlayFlic () is running, as soon as the Flic playing ends. Line 8 in the script is PlayFlic. I'd check it out with PlayVideo as well, but I don't have any builds on me that use that. Also, the palette never gets fixed when you enter windowed mode while PlayFlic is playing.

Will the script API be able to switch the display resolution from, say, 320x200 to 640x400, similar to how early games did that in order to display high resolution low colour graphics or text? Because I could think of loads of things I could do with that.
#166
Quote from: miguel on Fri 15/04/2016 11:30:42
Art and humans are connected and some people even consider art to be what makes us humans. Technology changes and that's great but true art is only understood by humans like you and me even with our different tastes. No robot will ever "understand" art like humans do, it can emulate what we do and think but that's completely different.
We can feed a computer with all the great phrases ever written by literature masters but that will not make a good book. The same with music, painting and all of artistic expressions there are.

Well, that's just it - art is only art if it is percieved by a human. A computer doesn't have to appreciate art, it only has to create it for humans to appreciate. And humans can imprint meaning on the meaningless just as well as they can see meaning in something intended.

Art is art if someone looks at it and has an emotional reaction to it. They don't need to see an artist's singular brush strokes doing whatever the heck thing you'd ascribe to a brush stroke. Art is bigger than that. A human could press a button a thousand times and then see something beautiful and then say "that's art" and it will be.

Also, literature made by a computer isn't as coherent as human written literature, but it sure is artful in it's own way:

Code: ags
VIOLA:
Why, Salisbury must find his flesh and thought
That which I am not aps, not a man and in fire,
To show the reining of the raven and the wars
To grace my hand reproach within, and not a fair are hand,
That Caesar and my goodly father's world;
When I was heaven of presence and our fleets,
We spare with hours, but cut thy council I am great,
Murdered and by thy master's ready there
My power to give thee but so much as hell:
Some service in the noble bondman here,
Would show him to her wine.


Now that's art.
#167
The answer is "technically yes" but put the world's largest asterisk next to the yes.

Going purely off of the epub format, AGS does let you write raw chunks of data to a file, but it doesn't come with any libraries to write the ZIP specification, or any file format other than bmp/pcx. You'd need to write:

- A ZIP file reader/writer. Even if you're not planning on compressing the files with zip, you still need to know the specifications of the ZIP format.
- A PNG file reader/writer (if you want images)
- A HTML5/CSS/XML writer. This is the easiest part, it's just plaintext, but it's required for the majority of the epub.

And any one of these would be a pretty big undertaking if you've never done it before. I mean, it would be POSSIBLE. But just not EASY. It depends what you want to achieve in the end.

If you just want to dump text to an epub, like a player's journal, you could make a framework around which you build the end file (by putting static files you want to include in it in the game folder and just copying their data over when the time comes rather than dynamically creating that content), and write the relevant text in the middle. As individual chapters are just XHTML files, apparently, this might be the most workable solution - you'd just need a way to place all the files into a ZIP container.

As for writing a PDF file, I wouldn't even begin to know how to touch that format, it's labyrinthine and inscrutable.
#168
By the time your restore game triggers, the following code will never be run, since when you restore a game, you aren't even at the same point in the script (you're instead at the point just after you saved).

So if you add:
Code: AGS

on_event (EventType event, int data)
{
    if (event == eEventRestoreGame)
    {
        SetTimer(20, 30);
        myOverlay = Overlay.CreateTextual(5, 5, 150, eFontfntTiny, 65535, "Game loaded!");
    }
}


It should work.
#169
That would be the ShowInteractiveAreas module!

I believe this module is the one you're looking for - it displays stuff over the top of everything else showing where all the clickable areas are. It's not too difficult to program something like this, you just iterate through the room's hotspots, objects, and the characters who are currently in the room and draw something to a surface that you display later.
#170
You might be wanting IniFile2 for that, that allows for reading and writing text files like you want.
#171
Right! I've counted up all the votes, and they are in! And... we have a three way second place split! Looks like nobody's going home with a participation trophy, you all get into the top three!

Avirosb!

Creamy, Grok, and Danvzare!

Mouth of War!

Well done to our overall winner, Avirosb, who gets to host the next sprite jam! You all did really good this month, and I've loved each one of the entries.

(Is it okay that there's more than one silver winner? I didn't know how to do it fairly, and no matter what, any tiebreaker votes cast by me would end up with two people with the same amount of votes)
#172
Alright, let's get to voting. Lots of really neat monsters came out of this sprite jam, well done to everyone!
To vote, just name the two entries you like the most! The person with the most votes wins!

Our entrants are:

Grok


Danvzare


Creamy


Mouth of War


Avirosb
#173
Ah, found the issue, CharacterToUse was constantly being set, so it was always being reset to TopItem 0. I had forgotten that I had done that.

Sorry! I didn't know that would happen.
#174
Yes, the functions are being called, they just don't do anything. Everything except the things I need (ScrollUp/Down and TopItem) are being run.

Putting Displays before and after the function calls proves they should be being run, but nothing happens.
#175
There's only one inventory window in my game, it's called invWindow. I even changed it's name to mainInv to see if it was some sort of weird case sensitive thing, because reading variables from it seems to work.

Still no scrolling, though. I can't even manually set it with mainInv.TopItem.
#176
I'm trying to program the UI for my game, and I've run against a weird snag that I can't solve. The inventory window simply does not scroll when invWindow.ScrollUp/Down is called. My InventoryWindow is set to have 2 rows of 4 items, 17x17 in size (the item graphics themselves are 16x16 but I need a 1 pixel buffer between them), and whenever I call the ScrollUp/ScrollDown functions.... nothing happens, even when I have more than 8 items in my inventory.

What could be causing this? There's nothing in any of my rep_execs that sets the Inventory Window, it's all done in the on_mouse_click, and the GUI buttons for scrolling the inventory - and even when I set the ItemWidth/ItemHeight to 16, it still wouldn't scroll. Nothing I'm doing with it is working.
#177
Room_RepExec doesn't run during blocking scripts, so it'll wait for the end of those waits to run. The timer, however, does seem to count down even during wait commands. You'll want to put your repExec code in repeatedly_execute_always instead, which runs even during blocking scripts:

Code: AGS

function room_AfterFadeIn()
    {
        SetBackgroundFrame(0);
        player.Say("Hello. This is gonna time out.");
        SetTimer(1, 600);
        Wait(601);
        Player.Say("Huh?");
        Wait(600);
    }
     
function room_RepExec()
    {
    }
     
function repeatedly_execute_always ()
    {
        if (IsTimerExpired(1)==1)
        {
            SetBackgroundFrame(1);
        }
    }
     
#178
Whenever his character what?

0xC0000005 is "Access Violation", most often done when you're trying to read/write outside of the bounds of a dynamic array.

AGS has it's own exception handler for it's AGS script, so it can't be a script error unless something has gone horribly wrong. Does Heroine's Quest use any plugin functions around the area it crashes?
#179
I have a 2D array that deals with lighting in my game, and I'd like to be able to just create a "seed" light and have the dropoff automatically happen, so I can have dynamic lighting and such. Like so:

Code: ags

Seed lights:
0,0,0,0,0,0,0,0,0,0
0,4,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0
0,2,0,0,0,0,0,0,8,0
0,0,0,0,0,0,0,0,0,0

With dropoff:
1,2,1,0,0,0,0,0,1,0
2,4,2,1,0,0,0,1,2,1
1,2,1,0,0,0,1,2,4,2
1,2,1,0,0,1,2,4,8,4
0,1,0,0,0,0,1,2,4,2


But I'm not sure how to do it in a way that wouldn't slow down the game too much if it's calculated often. Does anyone have any advice about how I should do this? I need to do it once every second, at least, since there are objects that move around that give off light, and daylight.
#180
Monstrous Protagonists!

Alright, listen up youse guys, those humies have had it far too easy for far too long. Bein' the shiny 'eroes, gettin' all the games to themselves. When's it our turn to shine? When can we get games of our own? And don't talk to me about elfs, elfs is the worst. Just cause they have pointy ears those humies think they're exotic enough to count as sumfing new. Well, we ain't standin' for it! Bring us yer big hulking brutes, yer furry an' scaly skins, the weirder yer weirdie the better. We'll show 'em, we'll show all those humies that monstas can be just as big of a 'ero as they could ever be!

This time, this sprite jam is all about monsters. The less humanoid, the better. But not just any monsters, these monsters are striking out on their own and being the stars of their own show. Unsatisfied with their bit parts and minor villain roles, these monsters are starring in their own King's Quests, Quests for Glory, Monkey Islands, or even their own Broken Swords. Cast off your human skins, and join the monster party! Are your monsters the good guys, struggling in a world that hates them? Are your monsters still evil, carving out a piece of the world for their own? Are your monsters awkwardly shoehorned into modern society, with hilarious results? Could they even be a monster in a monstery world? That's up to you!



Da Roolz

  • Entries must be some kind of monster. No humans, elfs, dwarfs, or any other creature that was a human or could pass for a human (looking at you, vampires, werewolves, and nominally human cute-monster-girls). Goblins are fine, Orcs are fine. The more monstrous the better!
  • Entries must be sprites that could be put into an AGS game. Concept art in addition is welcome, but the final entry must be a sprite (or a 3D render, so long as it's got transparent bits).
  • Entries must be accompanied with one sentence describing the kind of game that your monster protagonist would star in. It doesn't have to be original. You could take an existing game and cross out all the names if you want! It's not up to me to judge whether or not a monster has eaten an existing game protagonist and is trying to wear their clothes!


Winners will get one of these trophies (which come in Beholder, Rust Monster, and Kobold flavors!), while all participants will recieve a Mimic Pretending to Be a Trophy!


What are you waiting for? Get weird!
SMF spam blocked by CleanTalk