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

#1
Hello all-

You guys have been great answering my questions on my current game but I also have another idea that's in the planning stages. Where my current game is a first-person Myst style project, this one would be a classic Sierra style point and click with graphics from its early 90's era (think SQ4/LSL5 or 6/KQ5.)

Visual assets for my first game were done with AI (a controversial choice, I know, but it is mainly a learning project) and for the few motion characters I'm creating them with FMV actors on a greenscreen. For the next one I need someone or something to do actual pixel art designs for the characters. I do a little digital airbrushing myself and I've considered trying to hire actual models to act out the character movements for me to then animate over rotoscope style a'la OG Mortal Kombat but that seems like an insane amount of extra work and probably wouldn't have the authentic vintage Sierra VGA look I'm going for.

AI pixel art generators that I've found are limited- they can do great still frame pixel designs but that's about it. I could do backgrounds with MidJourney but I need animation for characters. Is there anyone on these forums that does that? This project would be a year or two away at the earliest.

Also, the idea I have is an adult comedy game in the vein of Leisure Suit Larry so someone willing to animate nudity/adult situations and innuendo would be a must.
#2
Hello all-

I'm working on a puzzle where the player is pushing a button to alter the position of a hatch that is blocking the flow of lava. The temperature and height of the lava within the pipe is determined by moving int counters. Each segment of the pipe has an odd number counter (the temp) and an even number counter (the height.) I've put all of this on an X/Y grid which I then transferred into a code, the first two segments of which are below. Right now I'm trying to have the code respond to a simple set of variables: "object 1" (the first hatch blocking flow from segment one to segment two) being visible should cause object 11, the segment, to show the graphic for 4/4 on the X/Y chart. That works. The problem is that I can't get the same response when object 2 is made visible.

Any help would be greatly appreciated.

Code: ags

function room_RepExec()
{
if (object[1].Visible == true) { myCounter1 = 4; myCounter2 = 4; return; }
if (object[2].Visible == true) { myCounter3 = 4; myCounter4 = 4; return; }

// Segment 1 integers
if (myCounter1 == 0 && myCounter2 == 0) {object[11].Graphic = 376; return;} 
else if (myCounter1 == 1 && myCounter2 == 1) {object[11].Graphic = 404; return;}
else if (myCounter1 == 1 && myCounter2 == 2) {object[11].Graphic = 398; return;}
else if (myCounter1 == 1 && myCounter2 == 3) {object[11].Graphic = 392; return;}
else if (myCounter1 == 1 && myCounter2 == 4) {object[11].Graphic = 386; return;}
else if (myCounter1 == 2 && myCounter2 == 1) {object[11].Graphic = 407; return;}
else if (myCounter1 == 2 && myCounter2 == 2) {object[11].Graphic = 401; return;}
else if (myCounter1 == 2 && myCounter2 == 3) {object[11].Graphic = 395; return;}
else if (myCounter1 == 2 && myCounter2 == 4) {object[11].Graphic = 389; return;}
else if (myCounter1 == 3 && myCounter2 == 1) {object[11].Graphic = 405; return;}
else if (myCounter1 == 3 && myCounter2 == 2) {object[11].Graphic = 399; return;}
else if (myCounter1 == 3 && myCounter2 == 3) {object[11].Graphic = 393; return;}
else if (myCounter1 == 3 && myCounter2 == 4) {object[11].Graphic = 387; return;}
else if (myCounter1 == 4 && myCounter2 == 1) {object[11].Graphic = 402; return;}
else if (myCounter1 == 4 && myCounter2 == 2) {object[11].Graphic = 396; return;}
else if (myCounter1 == 4 && myCounter2 == 3) {object[11].Graphic = 390; return;}
else if (myCounter1 == 4 && myCounter2 == 4) {object[11].Graphic = 384; return;}
else if (myCounter1 == 5 && myCounter2 == 1) {object[11].Graphic = 406; return;}
else if (myCounter1 == 5 && myCounter2 == 2) {object[11].Graphic = 400; return;}
else if (myCounter1 == 5 && myCounter2 == 3) {object[11].Graphic = 394; return;}
else if (myCounter1 == 5 && myCounter2 == 4) {object[11].Graphic = 388; return;}
else if (myCounter1 == 6 && myCounter2 == 1) {object[11].Graphic = 403; return;}
else if (myCounter1 == 6 && myCounter2 == 2) {object[11].Graphic = 397; return;}
else if (myCounter1 == 6 && myCounter2 == 3) {object[11].Graphic = 391; return;}
else if (myCounter1 == 6 && myCounter2 == 4) {object[11].Graphic = 385; return;}

// Segment 2 integers
if (myCounter1 == 0 && myCounter2 == 0) {object[12].Graphic = 476; return;}
else if (myCounter1 == 1 && myCounter2 == 1) {object[12].Graphic = 504; return;}
else if (myCounter1 == 1 && myCounter2 == 2) {object[12].Graphic = 498; return;}
else if (myCounter1 == 1 && myCounter2 == 3) {object[12].Graphic = 492; return;}
else if (myCounter1 == 1 && myCounter2 == 4) {object[12].Graphic = 486; return;}
else if (myCounter1 == 2 && myCounter2 == 1) {object[12].Graphic = 507; return;}
else if (myCounter1 == 2 && myCounter2 == 2) {object[12].Graphic = 501; return;}
else if (myCounter1 == 2 && myCounter2 == 3) {object[12].Graphic = 495; return;}
else if (myCounter1 == 2 && myCounter2 == 4) {object[12].Graphic = 489; return;}
else if (myCounter1 == 3 && myCounter2 == 1) {object[12].Graphic = 505; return;}
else if (myCounter1 == 3 && myCounter2 == 2) {object[12].Graphic = 499; return;}
else if (myCounter1 == 3 && myCounter2 == 3) {object[12].Graphic = 493; return;}
else if (myCounter1 == 3 && myCounter2 == 4) {object[12].Graphic = 487; return;}
else if (myCounter1 == 4 && myCounter2 == 1) {object[12].Graphic = 502; return;}
else if (myCounter1 == 4 && myCounter2 == 2) {object[12].Graphic = 496; return;}
else if (myCounter1 == 4 && myCounter2 == 3) {object[12].Graphic = 490; return;}
else if (myCounter1 == 4 && myCounter2 == 4) {object[12].Graphic = 484; return;}
else if (myCounter1 == 5 && myCounter2 == 1) {object[12].Graphic = 506; return;}
else if (myCounter1 == 5 && myCounter2 == 2) {object[12].Graphic = 500; return;}
else if (myCounter1 == 5 && myCounter2 == 3) {object[12].Graphic = 494; return;}
else if (myCounter1 == 5 && myCounter2 == 4) {object[12].Graphic = 488; return;}
else if (myCounter1 == 6 && myCounter2 == 1) {object[12].Graphic = 503; return;}
else if (myCounter1 == 6 && myCounter2 == 2) {object[12].Graphic = 497; return;}
else if (myCounter1 == 6 && myCounter2 == 3) {object[12].Graphic = 491; return;}
else if (myCounter1 == 6 && myCounter2 == 4) {object[12].Graphic = 485; return;}


If it helps, here's the code for the whole room:

Code: ags


// room script file

// Segment 1
int myCounter1 ;
int myCounter2 ;

// Segment 2
int myCounter3 ;
int myCounter4 ;

// Segment 3
int myCounter5 ;
int myCounter6 ;

// Segment 4
int myCounter7 ;
int myCounter8 ;

// Segment 5
int myCounter9 ;
int myCounter10 ;

// Segment 6
int myCounter11 ;
int myCounter12 ;

// Segment 7
int myCounter13 ;
int myCounter14 ;

// Segment 8
int myCounter15 ;
int myCounter16 ;

// Segment 9
int myCounter17 ;
int myCounter18 ;



function oObject20_AnyClick()
{
if (object[20].Graphic == 410)
{object[20].Graphic = 411;
object[1].Visible = false;
object[2].Visible = true;
object[3].Visible = false;
return;}

if (object[20].Graphic == 411)
{object[20].Graphic = 412;
object[2].Visible = false;
object[3].Visible = true;
return;}

if (object[20].Graphic == 412)
{object[20].Graphic = 410;
object[1].Visible = true;
object[3].Visible = false;
return;}



}

function oObject21_AnyClick()
{
if (object[21].Graphic == 410)
{object[21].Graphic = 411;
object[4].Visible = false;
object[5].Visible = true;
object[6].Visible = false;
return;}

if (object[21].Graphic == 411)
{object[21].Graphic = 412;
object[4].Visible = false;
object[5].Visible = false;
object[6].Visible = true;
return;}

if (object[21].Graphic == 412)
{object[21].Graphic = 410;
object[4].Visible = true;
object[5].Visible = false;
object[6].Visible = false;
return;}

}

function oObject22_AnyClick()
{
if (object[22].Graphic == 410)
{object[22].Graphic = 411;
object[7].Visible = false;
object[8].Visible = true;
object[9].Visible = false;
return;}

if (object[22].Graphic == 411)
{object[22].Graphic = 412;
object[7].Visible = false;
object[8].Visible = false;
object[9].Visible = true;
return;}

if (object[22].Graphic == 412)
{object[22].Graphic = 410;
object[7].Visible = true;
object[8].Visible = false;
object[9].Visible = false;
return;}

}

function room_Load()
{


 
}

function room_RepExec()
{
if (object[1].Visible == true) { myCounter1 = 4; myCounter2 = 4; return; }
if (object[2].Visible == true) { myCounter3 = 4; myCounter4 = 4; return; }

// Segment 1 integers
if (myCounter1 == 0 && myCounter2 == 0) {object[11].Graphic = 376; return;} 
else if (myCounter1 == 1 && myCounter2 == 1) {object[11].Graphic = 404; return;}
else if (myCounter1 == 1 && myCounter2 == 2) {object[11].Graphic = 398; return;}
else if (myCounter1 == 1 && myCounter2 == 3) {object[11].Graphic = 392; return;}
else if (myCounter1 == 1 && myCounter2 == 4) {object[11].Graphic = 386; return;}
else if (myCounter1 == 2 && myCounter2 == 1) {object[11].Graphic = 407; return;}
else if (myCounter1 == 2 && myCounter2 == 2) {object[11].Graphic = 401; return;}
else if (myCounter1 == 2 && myCounter2 == 3) {object[11].Graphic = 395; return;}
else if (myCounter1 == 2 && myCounter2 == 4) {object[11].Graphic = 389; return;}
else if (myCounter1 == 3 && myCounter2 == 1) {object[11].Graphic = 405; return;}
else if (myCounter1 == 3 && myCounter2 == 2) {object[11].Graphic = 399; return;}
else if (myCounter1 == 3 && myCounter2 == 3) {object[11].Graphic = 393; return;}
else if (myCounter1 == 3 && myCounter2 == 4) {object[11].Graphic = 387; return;}
else if (myCounter1 == 4 && myCounter2 == 1) {object[11].Graphic = 402; return;}
else if (myCounter1 == 4 && myCounter2 == 2) {object[11].Graphic = 396; return;}
else if (myCounter1 == 4 && myCounter2 == 3) {object[11].Graphic = 390; return;}
else if (myCounter1 == 4 && myCounter2 == 4) {object[11].Graphic = 384; return;}
else if (myCounter1 == 5 && myCounter2 == 1) {object[11].Graphic = 406; return;}
else if (myCounter1 == 5 && myCounter2 == 2) {object[11].Graphic = 400; return;}
else if (myCounter1 == 5 && myCounter2 == 3) {object[11].Graphic = 394; return;}
else if (myCounter1 == 5 && myCounter2 == 4) {object[11].Graphic = 388; return;}
else if (myCounter1 == 6 && myCounter2 == 1) {object[11].Graphic = 403; return;}
else if (myCounter1 == 6 && myCounter2 == 2) {object[11].Graphic = 397; return;}
else if (myCounter1 == 6 && myCounter2 == 3) {object[11].Graphic = 391; return;}
else if (myCounter1 == 6 && myCounter2 == 4) {object[11].Graphic = 385; return;}

// Segment 2 integers
if (myCounter1 == 0 && myCounter2 == 0) {object[12].Graphic = 476; return;}
else if (myCounter1 == 1 && myCounter2 == 1) {object[12].Graphic = 504; return;}
else if (myCounter1 == 1 && myCounter2 == 2) {object[12].Graphic = 498; return;}
else if (myCounter1 == 1 && myCounter2 == 3) {object[12].Graphic = 492; return;}
else if (myCounter1 == 1 && myCounter2 == 4) {object[12].Graphic = 486; return;}
else if (myCounter1 == 2 && myCounter2 == 1) {object[12].Graphic = 507; return;}
else if (myCounter1 == 2 && myCounter2 == 2) {object[12].Graphic = 501; return;}
else if (myCounter1 == 2 && myCounter2 == 3) {object[12].Graphic = 495; return;}
else if (myCounter1 == 2 && myCounter2 == 4) {object[12].Graphic = 489; return;}
else if (myCounter1 == 3 && myCounter2 == 1) {object[12].Graphic = 505; return;}
else if (myCounter1 == 3 && myCounter2 == 2) {object[12].Graphic = 499; return;}
else if (myCounter1 == 3 && myCounter2 == 3) {object[12].Graphic = 493; return;}
else if (myCounter1 == 3 && myCounter2 == 4) {object[12].Graphic = 487; return;}
else if (myCounter1 == 4 && myCounter2 == 1) {object[12].Graphic = 502; return;}
else if (myCounter1 == 4 && myCounter2 == 2) {object[12].Graphic = 496; return;}
else if (myCounter1 == 4 && myCounter2 == 3) {object[12].Graphic = 490; return;}
else if (myCounter1 == 4 && myCounter2 == 4) {object[12].Graphic = 484; return;}
else if (myCounter1 == 5 && myCounter2 == 1) {object[12].Graphic = 506; return;}
else if (myCounter1 == 5 && myCounter2 == 2) {object[12].Graphic = 500; return;}
else if (myCounter1 == 5 && myCounter2 == 3) {object[12].Graphic = 494; return;}
else if (myCounter1 == 5 && myCounter2 == 4) {object[12].Graphic = 488; return;}
else if (myCounter1 == 6 && myCounter2 == 1) {object[12].Graphic = 503; return;}
else if (myCounter1 == 6 && myCounter2 == 2) {object[12].Graphic = 497; return;}
else if (myCounter1 == 6 && myCounter2 == 3) {object[12].Graphic = 491; return;}
else if (myCounter1 == 6 && myCounter2 == 4) {object[12].Graphic = 485; return;}




}



#3
Hello all-

I'm trying to set up a simple function where the graphic for a button changes every time I click on it. Clicking on the button three times kills the game. Here's the code:

Code: ags


function oObject20_AnyClick()
{
if (object[20].Graphic == 410)
{object[20].Graphic = 411;
return;}

if (object[20].Graphic == 411)
{object[20].Graphic = 412;
return;}

if (object[20].Graphic == 412)
{object[20].Graphic = 413;
return;}

if (object[20].Graphic == 413)
{object[20].Graphic = 410;
return;}
}

function oObject21_AnyClick()
{
if (object[21].Graphic == 410)
{object[21].Graphic = 411;
return;}

if (object[21].Graphic == 411)
{object[21].Graphic = 412;
return;}

if (object[21].Graphic == 412)
{object[21].Graphic = 413;
return;}

if (object[21].Graphic == 413)
{object[21].Graphic = 410;
return;}
}

function oObject22_AnyClick()
{
if (object[22].Graphic == 410)
{object[22].Graphic = 411;
return;}

if (object[22].Graphic == 411)
{object[22].Graphic = 412;
return;}

if (object[22].Graphic == 412)
{object[22].Graphic = 413;
return;}

if (object[22].Graphic == 413)
{object[22].Graphic = 410;
return;}
}


When the game crashes here's what I get:

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x0048A5F7; program pointer is +72, engine version 3.6.0.48, gtags (0,0)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and contact the game author for support or post these details on the AGS Technical Forum.



Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.

An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums. (code 0)
---------------------------
OK   
---------------------------
#4
Hello all-

I have an idea for my next game that would be, fundamentally, a Sierra style point and click adventure but it would involve several arcade sequences. Like so many point and click mini games the arcade sequences would be send ups of established games. For that reason I'm curious what sorts of arcade sequences are possible in AGS and can you provide examples of games that employ them?

Here's some of the types of arcade sequences I want to do:

1. A top-down maze game in the style of Pac Man where the player runs from enemies.

2. Rail shooter sequences where the player moves a targeting reticle with the mouse and shoots at enemies that jump out from behind cover, a'la Lethal Enforcers. (This would actually be an important and recurring element of my idea)

3. A multi-lane anticipation/dodge scenario where the player is on something like a jet ski and has to dodge oncoming debris and other obstructions, a'la the second level of Battletoads.

These are just a few ideas, curious if you think it's doable and any other cool arcade sequences done with AGS.
#5
Hello all-

I'm currently working on a Myst style game and I have a puzzle where there's a circular table top with concentric circles carved into it. The player drops marbles into the circular grooves and repositions them to affect the puzzle's outcome. So, my question is this: how do I alter the x,y coordinates of each of the marbles in the grooves so that it appears that each time one is clicked on they're being moved gradually around the groove?

Kind regards,
-Jordan
#6
Hi Folks-

Thanks again in advance for helping me with something that is probably second nature to even most beginner programmers. I need help doing booleans and I need it in the simplest possible terms as I am beneath novice level at programming.

Here's the set up: I have a puzzle in one room (room 106) that when solved allows the player to take a blue sphere in another room (room 105) into their inventory. I wanted to accomplish this with a boolean. If the player tries to take the blue sphere without solving the puzzle the sphere swells up and hisses angrily. If the player solves the puzzle the blue sphere allows itself to be taken.

To accomplish this I set up first put this in the global header:
Code: ags
import bool BlueSphereIsTakeable;

Then I put this in the Global Script:
Code: ags
bool BlueSphereIsTakeable = false;

Then I put this in the room 105 code:

Code: ags
function room_Load()
{
 if (BlueSphereIsTakeable)
    {
        object[0].Visible = false;
    }
}

The idea there is that the blue sphere object disappears. Once I can get this to happen I will then have it replace the blue sphere with an identical object that can be taken.

And I put this in the Room 106 code:

Code: ags
function room_Leave()
{
if (object[1].Graphic == 227 && object[2].Graphic == 228 && object[3].Graphic == 229 && object[4].Graphic == 235 && object[5].Graphic == 230 && object[6].Graphic == 231 &&object[7].Graphic == 232 && object[8].Graphic == 233 && object[9].Graphic == 234)
{BlueSphereIsTakeable}
}

I thought I was supposed to specify "BlueSphereisTakeable == true" but ChatGPT disagrees.

Anyway, the game either won't start or starts and then crashes whenever I try to enter either of these two rooms. Pulling my hair out.
#7
Hello all-

Recently I wrote in asking for advice on a 3x3 block puzzle I was making. The question there concerned a set of nine holes in a grid that had to be filled with the appropriate order of boxes. My original question was how to make the nine different blocks appear in all the different holes as the player tries different combinations. The solution was to have an invisible object in each box that would be triggered when the player placed a block object on the corresponding hotspot. The trigger would cause a different image (blocks in this case) to appear as the visual for the object in question.

Below is the code I wrote for each hotspot (copy pasted with the relative numbers update for each hotspot.) Somehow this script works for the first and second block images (graphics 227 and 228) but not the rest. I'm not sure how identical code can only work in two of nine instances.

Thoughts?

Code: ags
function hHotspot1_UseInv()


{
if (player.ActiveInventory == iTomb)
{object[1].Graphic = 227;
player.LoseInventory(iTomb);
return;}

{if (player.ActiveInventory == iHoldingOrb)
object[1].Graphic = 228;
player.LoseInventory(iHoldingOrb);
return;}

{if (player.ActiveInventory == iAngelCity)
object[1].Graphic = 229;
player.LoseInventory(iAngelCity);
return;}

{if (player.ActiveInventory == iGauntlet)
object[1].Graphic = 235;
player.LoseInventory(iGauntlet);
return;}

{if (player.ActiveInventory == iAngelHandshake)
object[1].Graphic = 230;
player.LoseInventory(iAngelHandshake);
return;}

{if (player.ActiveInventory == iCrucifix)
object[1].Graphic = 231;
player.LoseInventory(iCrucifix);
return;}

{if (player.ActiveInventory == iAngelInHead)
object[1].Graphic = 232;
player.LoseInventory(iAngelInHead);
return;}

{if (player.ActiveInventory == iReceivingBlock)
object[1].Graphic = 233;
player.LoseInventory(iReceivingBlock);
return;}


{if (player.ActiveInventory == iDancing)
object[1].Graphic = 234;
player.LoseInventory(iDancing);
return;}
}
#8
Hello all-

I'm working on a puzzle for my game where the player is presented with a 3x3 grid of boxes into which blocks must be inserted in a specific order to advance. So I need each of the blocks (which are contained in the inventory) to be able to be inserted into all nine of the boxes so that the player can try different combinations. I was originally going to make each other boxes a hotspot and have nine invisible objects contained in each of them. The objects in each box would then become visible as the player used the corresponding inventory item on them. This ended up not working because it exceeded the game's limit of 40 items per room. Does anyone have any suggestions? I am very much a novice so some code would definitely help.

Kind regards,
-Jordan
#9
Hello all-

I have a demo of my game ready to go but it's 2.07 gigabytes. I was going to post it to itch but they haven't gotten back to me about getting more space. Is there another website I can upload it to?
#10
Hello all-

I've got cutscenes in my game that I made in Adobe Premiere Elements. I found a website online (https://video.online-convert.com/convert-to-ogv) that can do the conversion but the end result is very choppy and jerky. I want my cutscenes to look like big, epic, latter period Myst game full screen events. Any suggestions about how best to do this? Perhaps a trustworthy app to download?
-J
#11
Hello all-

So I'm doing my first dialogue section for my game. It's actually the dialogue system being used to allow the players to read journal entries from a computer screen. To that end I need to be able to make the text appear on a certain part of the screen and only take up a certain block of space rather than covering the whole screen in the center. Any advice on how to do this?

Also- I have set up the dialogues so that each one goes to a separate screen where the person talking appears on one side of the screen while their words appear next to them in a black void. I did this by making a second room from dialogues. To that end I want to make the last option of each dialogue menu be "EXIT" so as to allow the player to return to the previous screen. Any advice on how to do that?
#12
So I've been getting ready to start implementing videos in my game and I'm noticing that a lot of people have commented on this with things like "use x y and z scripting to get it to play a video." (PlayVideo, that kind of thing.) My question is: where do I need to store my video files so that the game will access them? What file folder does NameofClip.Ogv need to be in for it to be loaded in that context?

*EDIT* So I found that the videos need to be in the main project folder. Done that. But the game still calls them "undefined symbols."

NEVERMIND- I got it to work. You guys are nice to put up with me. ;)
#13
Hello all-

I'm working on a game in LW Bass and I wanted some advice on how to do dialogue. The other systems (a'la the Sierra template) seem to have a means to set initiate a dialogue exchange already (ie clicking the talk icon on them.) What do I need to do to initiate a dialogue in LW Bass?

*EDIT*

To clarify, I'm creating a Myst/Return to Zork first person perspective style game and so I'm wanting to do an interface where the player clicks on a character and we are transitioned to a black screen (a separate room) where the images of player and NPC appear along with dialogue options (a'la Gabriel Knight.) So I need to know how to initiate dialogue as soon as the room starts.
#14
Hey all-

I've been recompiling my game in the LW Bass format and I can't seem to find any onscreen save/load option. Is this a keyboard shortcut or will I need to write new code altogether?
#15
Hello all-

I'm restarting from scratch a project I worked on a few months ago. My goal is to do something in the style of Myst or the 7th Guest- just a simple arrow pointer that can be used to pick things up and click on exits from room to room. Being the n00b that I am, I originally went at this by using the Sierra/lucas arts point-and-click presets to begin since the clicking/inventory was already good to go.

My question is this: I don't want the other icons- movement, sight, talk, etc. But I can't seem to get rid of them, either from the pull down bar or the right mouse click. So how do I do that? Or is there a better way to do a Myst style experience? I know there's the the verb coin but I don't even want that.

Any insight is appreciated.
-J
#16
Hello all-

I recently resumed working on my game after a break of several months and when I ran the game I got an unexpected global script error:

GlobalScript.asc(3): Error (line 3): expected variable or function after import, not 'ac'

Here's the code:

Code: ags
// main global script file

import ac;
import ac.Keyboard;


Any help would be greatly appreciated!


#17
Hello-

First may I say that I really appreciate the guidance I've gotten so far in making my first game- this has been a very helpful resource. You have all been great about checking my code, holding my hand through my confusion, etc.

Now I have two bigger questions (or at least they seem that way to me the layman.) I'm designing a puzzle that requires me to learn two new programming mechanics.

1. The puzzle involves a keypad with a 3x3 button grid. Pushing one button causes other buttons to light up and some buttons to go off if already lit. The goal is to find the sequence of buttons that will cause all the buttons to become lit. To accomplish this I made a "lit" version of the buttons that serves as an object within the game. All 9 "lit button" objects start out as invisible and are made visible when clicked on. So the code, in essence, says "When button five is pushed, cause objects 2, 4, 6, and 8 to become visible."

So my question is this: how do I write code which causes the game to become aware when all of the buttons are lit so as to trigger the result of the puzzle?

2. The reward for the puzzle is to open a door that is on a different screen. The open door is an object that becomes visible. How do I trigger a result on a different room from the one I'm on?

Thank you so much for you help!
#18
Hello-

So I have a basic script for using inventory items with hotspots on the screen. It has worked before so I usually just copy/paste it into each place with the item names changed. I used it in a recent room script and it said Failed to save room room37.crm; details below
room37.asc(20): Error (line 20): Parse error in expr near 'iDeadBattery'

Here's the script in question:

Code: ags

function hHotspot2_UseInv()
{
if (player.ActiveInventory == iDeadBattery) {
    player.LoseInventory(iDeadBattery);
object[0].Visible = true; }
}

Any help would be greatly appreciated. I've looked at the manual, coming up empty.
#19
So I'm a first time game creator and I'm attempting to write a script that will, upon using a certain object on another object, remove one object from the inventory and replace it with another. I have previously written scripts that allow me to make objects (closed doors) disappear when I use other objects (keys) on them. In that spirit I wrote the script you see below. For some reason I get an error message that says:

Failed to save room room11.crm; details below
room11.asc(11): Error (line 11): '(' expected

Here's the code I wrote. ChatGPT can't find any errors. Any help would be greatly appreciated. Line 11 is the LoseInventory line.

Code: ags

function oObject0_UseInv()
{
if (player.ActiveInventory == iEmptyBottle) {
       player.LoseInventory = iEmptyBottle;
       player.AddInventory = iBlueBottle;
    }
}


SMF spam blocked by CleanTalk