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

#81
I have a custom save and load GUI in my game. It has six buttons that handle the save or load actions. I'm creating the thumbnails by sending a sprite to the button like this…

Code: ags

butSprite1 = DynamicSprite.CreateFromSaveGame(1, 60, 30); // screenshot resized 120x60 from savegame slot 1


Now when the thumbnail sprite is displayed on the GUI the image has been resized with out any anti aliasing. Is this the way DynamicSprite resizing works? Any work around that would produce a better looking 120x60 screenshot/thumbnail for my save games? I could always do what I did with Fatman and just use my own thumbnails again but that was a lot of extra work.
#82
Excellent work around sir! I shall give it a try.

Edit1: That will work, thanks. :)

Edit2: Ok doing that for every character was getting a bit complicated so in case anyone is reading this I solved the problem a litle more simply by using this instead:

Code: ags

function Speech(String msg, int who = 99) {
  // custom display speech on the screen function
  if (who == 99) {
    who = player.ID;  // defaults to player character
    }
   mad_loop = character[who].GetProperty(“MadLoop”);

etc…  
}


Now my function can display speech based on the default of the player character and have all the custom stuff I need. Not sure why I didn't think of that in first place. :)
#83
Ok, I have a custom function:

Code: ags

function Speech(Character *who, String msg) {
  // custom display speech on the screen function
  }

Now that works. However, I would like to pass this to my function:

Code: ags

// global script
struct ExtendedCharacter {
  int mad_loop;
  int happy_loop;
  Character* Char;
  };

ExtendedCharacter ecFatman;

function Speech(ExtendedCharacter *who, String msg) {
  // custom display speech on the screen function
  }


So this way I keep my function all nice and neat. However, whenever I try to compile the script I get this error:

There was an error compiling your script. The problem was:

In: 'Global script'

Error (line 43): Cannot declare pointer to non-managed type

I just can't wrap my brain around what I'm doing wrong.  :(
#84
Thanks, yeah it would be a great feature to have. I don't want to have to rebuild the entire dialog editor just to add that into the game however. :)
#85
I would love to have the ESC key “stop” any dialog if it's running. Aside from scripting all the dialogs myself, is there anyway to abort the current in-game dialog script while it's running?
#86
I searched the manual and the tech forums, but forgot about searching the wiki. Doh!

Well that answers my question, thanks.
#87
Ok, I have four playable characters all sharing the same GUI called gTxtbox. I change the border graphics colors to match the current player character. For example if the current player character is Fatman then the GUI appears as yellow border. The inside of the GUI is white with black text. Here is my problem...

I want to display the dialog options on this GUI. However, when I do that the options show up as color 15 (white) and are hidden from view because of the white background of the GUI. Changing the background color of the GUI to anything other than white doesn't have that same comic-book feel.

After doing some searches I found that the GUI.changefontcolor command is on the tracker, so it will be added at some point. In the meantime is there any kind of a workaround that I can use to change the color of the gTxtbox's color? Is there perhaps a way to change the dialog options color? I found the game.read_dialog_option_color, but nothing else. :/
#88
No, not at all.

I released the original game as abandon-ware so it can stay that way. Just so long as it remains a free download. If people can't afford the new version and just want to play the original version of the game there's no reason to stop them. Naturally I'd prefer to make a little cash to help fund the new project, so if you can afford it by all means purchase a copy! :)
#89
Quote from: BlueSkirt on Mon 02/04/2007 21:38:04

*Puts on top of precariously long pile of games to play and comic books to read*

You have that problem too? I'm still puzzled why I purchase more comics than I can possibly read. At times I'll find myself spending more time hunting for new ones than I do actually reading the ones I already have!
#90
I feel your pain Chicky. :(

Myself, I have a very unhealthy habit of hitting control â€" s every 30 or so seconds. I'm looking at my keyboard now and on the S key and the left control key the letters are entirely worn off. I'll even be playing a game and find myself hitting control â€" s in a vain attempt at saving my progress. :)
#91
To me the guitar in your sprite looks like more of a bass guitar. If he's holding a regular guitar the neck should be skinnier and it should hang a little lower. Here is an example:



Forgive me for not painting over your sprite, but sprite work takes me years to produce. :)
#92
Truth be told I like the colors of the original one better. It has more of a cartoony feel than the second one. The second is more “correct” if you will, but doesn't look as fresh.
#93
Drat, that's what I was afraid of. Thank you very much KhrisMUC, again! That last batch of code will save me from a massive rewrite. :)
#94
I've run into another problem.

I'm using 4 mouse modes. eModeFatman, eModeSuper, eModeAqua, eModeCyborg, for each of my 4 player characters. These modes are #10-#13. In the editor's general settings I have Walk to hotspot in look mode unchecked. I have the Don't automatically move character in Walk Mode. checked.

If I'm correct the player character should NOT move if he's looking at something or walk to it unless I manually script him to move to that hotspot. However, here is what happens…

When I give a hotspot a walk to point in the room editor the character will move to the hotspot every time I click on it. When I remove this walk to point from the hotspot in the room editor it behaves like I want it to. The player will not walk to the hotspot unless I script him to the manual x, y coordinates.

Is this how it's supposed to work? Does giving a hotspot a walk to point over ride all the general settings?

It would be a real pain to script each x, y coordinates for every hotspot visual walk to point provided in the room editor. What am I doing wrong?

*edit*

Further testing reveals that the player characters will auto-walk to any other characters in the room on any action. So removing the walk to points only solved the hotspot problem, there is still an underlying problem somewhere that is causing AGS to handle the walk to events instead of allowing me to control it via script. Grrr.

#95
Thanks very much for the info. Was wondering if anyone can help with another problem.

No matter what I try I can't get the AGS text window to display an alpha blended sprite. With my other GUI's the buttons never display the alpha blending, but the background image at least does.

Is there any kind of work around to have an alpha blended re-sizeable text box? The best I can come up with is a GUI with an alpha blending graphic and a label. However, that would hardly be able to be resized based on the text output. :/
#96
So I'm confused, is repeatedly_execute_always() a built in AGS function that will always repeat? ... or is this a custom function that I would have to make sure gets call from with AGS's rep_exe section?
#97
Yes, you can switch characters in this game. I don't see a spot to add the repeatedly_execute_always section. Do I just edit it into the global script myself with:

Code: ags

#sectionstart repeatedly_execute_always  // DO NOT EDIT OR REMOVE THIS LINE
function repeatedly_execute_always() {

  // code goes here

}
#sectionend repeatedly_execute_always  // DO NOT EDIT OR REMOVE THIS LINE


I assume?

Either way, that above code sample you've given me will work better in the long run. I'll just need to go back through and find the frame(s) I'm looking for. Thanks a million!
#98
Quote from: KhrisMUC on Thu 29/03/2007 06:40:31
Code: ags

Hotspot*h=Hotspot.GetAtScreenXY(mouse.x, mouse.y);

Awesome! That was my problem in a nutshell. I was trying to put that line of code within the hotspot reference instead of assigning it. Thanks again.

Candle: Thanks for the module add-in link. I've downloaded and I'll take a look at it.

*Edit*

Just tested it and it works like a charm! Now I can have custom exit the room sprites based on the exit hotspot in question. (ie. If the hNorth hotspot wasn't true north.)

*Edit 2*

Ok, having another problem with my Exit hotspot routines. :(

Code: ags

if (player.Name == "Cyborg-inator") { // cyborg is the player character
  if (player.Moving == true) { // cyborg is moving
    if (IsTimerExpired(3) == true) { // shake screen
      ShakeScreenBackground(10,1,20); // tiny shake 1 second
      SetTimer(3, 51); // reset the timer
      }
    }
  else { // keep the timer reset so no screen shakes durning non-movement
    SetTimer(3, 41); 
    } 
  }


The above code works perfect for the normal click and walk. However, when I click on the exit hotspot and call an eBlock walk, the timer stops updating and the screen stops shaking?

Does eBlock stop the timer?
#99
Ok, I must be doing something wrong. I need to pull the hotspot property from the global script. Is this even possible?

What I'm trying to accomplish is this. Let's say Room1.crm has a hotspot called hExit. That hotspot has the property called Sprite. That Sprite property stores the variable of the sprite image I want the mouse to turn into when it's over top of the hotspot.

Here is what I have so far:

Code: ags

				if (GetLocationType(mouse.x, mouse.y) == eLocationHotspot) { // mouse over an EXIT hotspot?
						if (Game.GetLocationName(mouse.x, mouse.y) == "eNorth") { // mouse is over the north EXIT hotspot
								Mouse.Mode = eModeEXIT;
								TRUE_mouse_mode = 4; // exit
								Mouse.ChangeModeGraphic(eModeEXIT, GetGlobalInt(1)); // north sprite


Now I want to change that GetGlobalInt(1) to the hotspot property sprite, but I have no idea how. Anytime I try to put hExit in it's place I get compiling errors. Any help with what I'm doing wrong? :/
#100
Quote from: strazer on Mon 26/03/2007 02:37:19
Well, neither the Linux engine nor the Mac port do support plugins. I assume you've used the plugin for the end credits? If so, you can probably play the game up to that point where it will crash.

Yes, that is what I did.

Thanks for the heads up. I'm going to make sure that I don't use any plugins with my next game to ensure compatibility.
SMF spam blocked by CleanTalk