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

#1
Oh awesome!

That makes everything better. Thanks a million, my friend.
:)
#2
Just like the title says... well, there's more to it.

It's been a while since I have worked on my code and the last time that I did was in a prior AGS. When I attempt to load the inventory window, it loads the default Inventory window that comes with the AGS compiler. It's ugly. It needs to go away.

I'm a little lost in the process, currently. I can't seem to set up the button to load the new Inventory GUI that I've created to replace the old default. All the old commands are obsolete and I feel genuinely lost, now.

Anyone else had this problem that you can link me to a solution?
If not, anyone have an answer for me?
#3
My image editing software crashed outside of the AGS program. I think there was a corrupted .bmp file involved. Nothing happened to the AGS program when the other program crashed. It closed and saved normally. But the error began to occur the next time I started it up.
#4
I opened up game.agf in notepad and found that it ended like this:

      <PaletteEntry Index="20" Type="Gamewide" Red="56" Green="56" Blue="56" />
      <PaletteEntry Index="21" Type="Gamewide" Red="68" Green="68" Blue="68" />
      <PaletteEntry Index="22" Type="Gamewide" Red="80" Green="80" Blue="80" />
      <PaletteEntry Index="23" Type="Gamewide" Red="96" Green="96" Blue="96" />
      <PaletteEntry Index="24" Type="Gamewide" Red="112" Green="112" Blue="112" />
      <PaletteEntry Index="25" Type="Gamewide" Red="128" Green="128" Blue="128" />
      <PaletteEntry Index="26" Type="Gamewide" Red="144" Green="144" Blue="144" />
      <PaletteEntry Index="27" Type="Gamewide" Red="160" Green="160" Blue="160" />
      <PaletteEntry Index="28" Type="Gamewide" Red="180" Green="180" Blue="180" />
      <PaletteEntry Index="29" Type="Gamewide" Red="200" Green="200" Blue="200" />
      <PaletteEntry Index="30" Type="Gamewide" Red="224" Green="224" Blue="224" />
      <PaletteEntry Index="31"

And it just ended there! So I copied game.agf.bak over it and everything works fine again.
#5
So, there I was, happily programming away in AGS 3.0.1. Then, when I loaded up the program today, I received this massive error upon loading my game:

"An error occurred whilst trying to load your game. The error was:

'.', hexadecimal value 0x00, is an invalid character. Line 1860, position 46."

I had been setting up functions for hotspot interaction but had put nothing in the brackets yet.

I had also changed the gui bar to display hotspot names and game score.

I'm not sure if either of those could be the cause but I'm at a loss and I can't work on my game anymore.
#6
That did it! :) Can't believe that one word was throwing everything off like that. Thanks a ton for your help
#7
I knew it was spelled wrong. But it is spelled "Dialog" in the program so I went with that to try and avoid confusion with what I was referring to. Guess it didn't work ;) Anywho, this is how I have it all set up.

Room Code:

String pw[6];
int pwi;


#sectionstart on_call room_a // on_call
function on_call(int p) {
  if (p!=pwi) return;
  // open door, etc.
  oLabdoor.Move(143, 60, 0, eBlock, eAnywhere);
}
#sectionend on_call room_a

#sectionstart room_a  // DO NOT EDIT OR REMOVE THIS LINE
function room_a() {
  // script for Room: First time player enters room
  pw[0]="RED";
  pw[1]="YELLOW";
   pw[2]="GREEN";
   pw[3]="BLUE";
   pw[4]="ORANGE";
   pw[5]="PURPLE";
      pwi=Random(5);
}
#sectionend room_a  // DO NOT EDIT OR REMOVE THIS LINE

#sectionstart hotspot3_a  // DO NOT EDIT OR REMOVE THIS LINE
function hotspot3_a() {
  // script for Hotspot 3 (Fishbowl): Interact hotspot
Display(String.Format("There are more %s guitar picks", pw[pwi])); 
}
#sectionend hotspot3_a  // DO NOT EDIT OR REMOVE THIS LINE

#sectionstart hotspot5_a  // DO NOT EDIT OR REMOVE THIS LINE
function hotspot5_a() {
  // script for Hotspot 5 (Compter): Interact hotspot
if (GetGraphicalVariable("password")==1)
   player.Say("ENTER PASSWORD");
  dpw.Start();  // dialog with passwords
}
#sectionend hotspot5_a  // DO NOT EDIT OR REMOVE THIS LINE

Dialog Code:
// dialog script file
@S  // dialog startup entry point
@1  // option 1
run-script 1
stop
@2  // option 2
run-script 2
stop
@3  // option 3
run-script 3
stop
@4  // option 4
run-script 4
stop
@5  // option 5
run-script 5
stop
@6  // option 6
run-script 6
stop

Dialog_request Code:
function dialog_request(int p) { 
  if (p<=6) CallRoomScript(p-1);
}
#8
What you presented really cleaned up my coding and made it easier to follow. However, it seems that putting "stop" in my dialog script causes the text to not appear at all. On top of that, opening the door happens whether or not anything is clicked. I need the dialog window to appear so that the player can select the word from the list and then cause the door to open.
#9
Okay... it's been three days. I've read all over the forums. I've rewritten several code schemes. I've messed with variables, strings, and the Dialogs options. I'm not a code wizard, but I'm trying to learn and a little help is always appreciated when you are doing this on your own.
So, here is my dilemma:
I have a very standard scene where a password is needed to open a door clicking on a computer in the screen. There is a hotspot in the room that reveals the password to you, at random, from six words. The intention is to bring up a dialog list and the six words appear. Quite simply, click on the right word and the door opens. Wrong word and nothing happens.
I am completely at a loss on how to do this. I have attempted several ideas with no luck at all. I feel like this should be an easier task, so I am certain that I have fallen to over thinking about it and gotten lost in the complication. But, I digress.
Help?
#10
That did it :) Thank you very much
#11
This is a very aggravating setback and I have scoured the help file and Forums for a good 2 hours. So I have somehow accrued two problems:

1. My inventory button, in-game, will not bring up the inventory window. All other buttons on the screen work.

2. As I was trying to find a solution to that problem, the game suddenly began flashing this message: Error (line 63): Undefined token 'show_inventory_window'
I have never even touched this area yet, so I have no idea where it came from. Here is the scripting that it refers to:
#sectionstart btnIconInv_Click  // DO NOT EDIT OR REMOVE THIS LINE
function btnIconInv_Click(GUIControl *control, MouseButton button) {
 
  show_inventory_window();
}
#12
So, here is the scoop:
I am attempting to write a scenario where the main character walks around the map screen and a random event can occur in certain rooms. When the event occurs, a shadow will cross the ground. Afterwards, the player will have a certain amount of time to leave the room before the dragon appears and begins to swoop after him. If the player doesn't make it in time, then a new scene will begin.

So, here are my problems:
I am having difficulty making a gap of time, between the shadow passing and the dragon appearing, to allow the player some time to react.  Instead of waiting for the time I've given, it just tosses the dragon in right when the script starts to run.

My second issue is figuring out how I can get the dragon to move until it's reached a certain point to start the new scene and allow the player to still have control until that point is reached.

Here is the script I've currently got:

  // script for Room: Player enters screen (after fadein)
int ran=Random(4);
if (ran==0) cDragon.ChangeRoom(-1);
else if (ran==1) cDragon.ChangeRoom(-1);
else if (ran==2) cDragon.ChangeRoom(-1);
else if (ran==3) { object[0].Visible = true;
object[0].Transparency = 50;
object[0].Move(380, 145, 3, eNoBlock, eAnywhere);
Wait(200);
cDragon.ChangeRoom(7);}
return;
#13
Is there a way I can easily set up inventory items to be useable on the main character? Or do I have to set up a code for each one?
#14
I would like to add sword fighting to my game in a style very much to the degree of the Prince of Persia. Now, I have problems coding my microwave let alone getting the correct coding down for my game and I know that a fighting part of the game is way out of my league.

So, does anyone have some suggestions, links, templates, etc that may help me work out this kind of feature?
#15
General Discussion / Re: Sprites Needed
Wed 15/09/2004 17:39:24
Heh... yeah... I kind of got it
#16
Advanced Technical Forum / Re: Walking duck
Sat 14/08/2004 20:28:13
Yes! Ashens code did it! Thank you, Ashen! Now my duck is walking around and bouncing off the trees and buildings like a good little ignorant bird.
#17
Advanced Technical Forum / Walking duck
Sat 14/08/2004 08:54:11
I have a duck. I want this duck to walk around the screen. It has no real purpose but to add a bit more decor to the screen it's in. My problem is that my hours of battling scripting has left me without any idea how to get the Duck to walk around randomly on the screen.

How can I get it to just walk around the screen with no set direction?
#18
I figured out the problem. Thanks, though.
#19
I'll try to explain this in the best way that I can: When clicking on the inventory button, it brings up a window of all the items you are carrying. At the bottom of this window are your basic option buttons (look, use, ok).

My problem is that they have all somehow been pushed to the left side and overlap each other. Basically, I can't click on any of them and I can't make use of any of the inventory items.

I've looked over the program and can't even find where to edit that menu listing to fix it. How can I straighten this out again?
#20
I started with the suggested code above.

Then I tried new room and added movetowalkablearea.

Got the same results.
SMF spam blocked by CleanTalk