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 - a-v-o

#41
I can't see where you build the savegameindex. Maybe there's something wrong there.
#42
your GUI looks much nicer than my test GUI.

I saw in your script that you use a picture, but I thought you will find out how to place it. And you got it!  ;D

#43
Make your YESNO-GUI popup modal.

--- script header ---
import function ask_user (int item, int object);

--- global script ---
// name the GUI elements
#define YESNO_LABEL 0
#define YESNO_BUTTON_YES 1
#define YESNO_BUTTON_NO 2

int yesno_item   = -1;
int yesno_object = -1;

function ask_user (int item, int object)
{
 yesno_item = item;
 yesno_object = object;
 string s;
 GetInvName (yesno_item, s);
 StrFormat (s, "Will you take your %s?", s);
 SetLabelText (YESNO, YESNO_LABEL, s);
 GUIOn (YESNO);
}

function interface_click(int interface, int button) {
... other interface stuff ...
 else if (interface == YESNO)
 {
   GUIOff (YESNO);
   if (button == YESNO_BUTTON_YES)
   {
     ObjectOff (yesno_object);
     AddInventory (yesno_item);
     string s;
     GetInvName (yesno_item, s);
     DisplaySpeech (EGO, "You got your %s.", s);
   }
   yesno_item   = -1;
   yesno_object = -1;
 }  
}

In the interaction of the object you just put:

ask_user (INV_ITEM, OBJECT);

with the correct numbers.

The user will be asked, then the object is switched off and the item is added to the inventory.
#44
thanks, got it

hmmm.... how should it look like?

IrfanView only shows black/gray font on white ground (no transparency, though set to show it).
When I import it into AGS, I get much red (transparency) around the black/gray text.
I used it as image of an object and it shows in the editor and in the game white/gray/black text over the background.

But I don't see anything, that I would think is alpha channel like.  :-\
#45
if you want to... then I gonna look at it.
you can use my ftp://a-v-o.selfhost.de/upload
#46
Does any other sound play in your game?
Does it play e.g. music1.mp3 with the music commands?
Can you hear sounds in other AGS games?

Maybe you can provide the script line in which you call the sound. What's the name of the sound file?
#47
Have you reimported the graphics after changing color depth?
#48
shift 1 bit left: *2
shift 1 bit right: /2
#49
Alpha channel only works in 32-bit color, I think.
#50
it could be that he imported the walkable area from a file that he made with a graphic programm which had anti alias on or was using semitransparent masks. Then there can be colors with numbers over 15 (mixed or shaded colors) which aren't allowed.

It isn't visible in the editor that the shade e.g. is a little bit different, but it's a wrong color number and so pathfinder has a problem.

#51
If you like the regions then maybe you can use multiple regions which are like rings with the same center one inside the other.

After the biggest target you show a smaller one and disable the region ring which is most outside... then only the remaining regions trigger the hit event.

This way you can make the target region smaller and smaller
#52
I'm not completely sure what you mean.
1.) Do you want to execute that code for all hotspots at the same time?
2.) Or do you want to execute the same code when the inv item is used on the different hotspots?

In both cases the first part is the same:
Copy your function into the script above the hotspot functions and give it a different name:

function use_inv_on_hotspot (int hotspot_number)
{
if (character[EGO].activeinv == 1)
{
LoseInventory(character[EGO].activeinv);
SetCursorMode(2);
RawDrawImage (87, 89, 3); //draws picture from slot 3 at coordinates 72,172
R1 = 100;         // weerstand van 100 Ohm geplaatst;
}
if (character[EGO].activeinv ==2 ) {
LoseInventory(character[EGO].activeinv);
SetCursorMode(2);
RawDrawImage (93, 90, 5);
R1 = 0;         // Draad geplaatst geplaatst;
}
DisableHotspot(hotspot_number);
}


Then you call this function in one of the following 2 ways, depending on the effect that you want to realize:

1.) Loop
function ??? ()
{
int i = 1;
while (i <= 10)
{
use_inv_on_hotspot (i);
i++;
}
}

2.) Call this function from the hotspot function:

function hotspoti_a()
{
// script for hotspot1: Use inventory on hotspot
use_inv_on_hotspot (1);
}

function hotspoti_b()
{
// script for hotspot2: Use inventory on hotspot
use_inv_on_hotspot (2);
}
...
#53
Advanced Technical Forum / Re:Error
Thu 12/02/2004 08:40:08
Did you renumber the sprites?
Do you use sound with the frames?
Is the animation blocking or are other commands executed in the background which could cause the error?
#54
sorry... wrong posting
#55
huh... you're right. I only read the Get... in the helpfile and thought Set... would be the corresponding function, but it's something different.
#56
you can use custom properties.

See characters - properties...

and SetCharacterProperty, GetCharacterProperty
#57
I can't see anything wrong either. Maybe there is something in the game_start or repeatedly_execute.

Feel free to send me the game for testing.
#58
Instead of using a large object you can use a fullscreen GUI which is black and a labe on it. With SetGuiTransparency you can fade it in and out.
#59
you can download the script from:
http://a-v-o.selfhost.de/ags/scripts/xyzzy01.zip

I hope, you like it. ;D
#60
The 2 define:

#define MIN_DISTANCE 30
#define MAX_DISTANCE 100


remember that MoveCharacter isn't blocking:
if (character[XYZZY].walking == 0)
will be true because the character hasn't yet started walking.

You probably call xyzzy_lie_down from repeatedly_execute. Then usually the else-part is executed, so always a MoveCharacter command with new coordinates. Pathfinder has too calculate a new path in each game cycle (-> slowdown, no movement).

#define LS_NORMAL  -1
#define LS_START      0
#define LS_WALKING  1
#define LS_DOWN      2

int l_status = LS_OFF;

function xyzzy_lie_down()
{
 if (l_status == LS_START)
 {
   MoveCharacter(XYZZY, Random(1280), Random(960));
   l_status = LS_WALKING;
 }
 else if (l_status == LS_WALKING)
 {
   if (character[XYZZY].walking == 0)
   {
     FaceLocation(XYZZY, character[XYZZY].x, 0);
     SetCharacterView(XYZZY, 28); //lying down view
     l_status = LS_DOWN;
   }
 }
 else if (l_status == LS_DOWN)
 {
   if (IsTimerExpired(1))
   {
    l_status = LS_NORMAL;
     xyzzyrerandomize = 1; //used by the function which will randomize Xyzzy's action, haven't coded yet
     SetCharacterView(XYZZY, 22); //normal view
     //xyzzy_randomize() [leaving this in comments until I code it]
   }
 }
}

when you want to start the lie down action, then set:
l_status = LS_START;
SMF spam blocked by CleanTalk