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

#1
Awesome thanks- I'll start working with that! :)
#2
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!
#3
I used the script with the advised formatting and it worked like a charm. Guess you have the magic touch!
#4
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.
#5
That worked- thanks! And yes, I agree about ChatGPT. HAL has a long way to go before he gets to 9000.
#6
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