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

#121
The latest AGS 2.57 beta always shows a scrollbar. Turning the mouse wheel scrolls the options area. No crash.
#122
Hello Chris,

for no reason I used the up-down wheel of my mouse over the dialogs pagem and AGS crashed:
There is a "Sorry, an error has occured" window with no more text in it and a Windows system error window over it which says that the application will be closed.
Details:
AGSEDIT verursachte einen Fehler durch eine ungültige Seite
in Modul AGSEDIT.EXE bei 0177:005317c7.
Register:
EAX=0143d970 CS=0177 EIP=005317c7 EFLGS=00210206
EBX=00eefad0 SS=017f ESP=00df0000 EBP=00df0008
ECX=014496a0 DS=017f ESI=00008af4 FS=4a67
EDX=00000048 ES=017f EDI=00eefa84 GS=4157
Bytes bei CS:EIP:
e8 64 b6 fc ff 89 45 fc eb 0b 8b 4d fc e8 67 bf
Stapelwerte:
014496a0 00df0018 00df0028 00532a24 00df0018 0143d970 00000001 00000e58 00000048 00000000 00df0044 0050ceb9 00000e58 00000e58 00000000 0143d970

This crash occurs no matter over which component the mouse cursor is and no matter which component has the focus.

I tested other pages (GUI, Inventory,...) but they are OK. Also moving the left-right wheel on the dialogs page doesn't crash AGS.
#123
Just an idea for prolonging the built-in fade-in/out:

Could you set the game speed to a lower value before a NewRoom command and set it back to normal speed in after-fadein?
#124
Advanced Technical Forum / Re:Square Root
Sat 25/10/2003 02:09:08
In my test I realized that your algorithm can e.g. give 3 as sqrt (8), because 2 and 3 are alternating in result until maxiterations is zero.

Also sqrt(0) should be zero not one.

Instead of using a maximum number of iterations, the algorithm below stops when alternating values in result are detected.

function sqrt(int number)
{
 int result = 0;
 if(number > 0)
 {
   int previousguess = -1;
   int guess = -1;
   result = 1;
   while((result != previousguess) && (result != guess))
   {
     previousguess = guess;
     guess = result;
     result = (number / guess + guess) / 2;
   }
   if (guess < result) { result = guess; }
 }
 else if (number < 0)
 {
   result = -1; // error
 }
 return result;
}

#125
Well, all masks can be drawn in a paint program and be imported into AGS. These programs offer all stuff like zoom, shapes, brush sizes and more.

Yes, Chris can spend his time in coding such stuff again, so that it is inside AGS. On the other hand I think it's ok, that Chris spends his time in implementing features into AGS that can't be done with other programs. If the bug and feature list ever gets empty then ...  ::)
#127
The flashlight plugin is designed to shade all but a round area. It shouldn't be too hard to change it, so that it shades only this round area. If you need it, I look into it.
#128
If a character X is in a different room than the current player character and I use SetPlayerCharacter (X); in the script, this doesn't change the room immediately (= same behaviour as NewRoom).
#129
Doin it foz's way you can use 2 frames with the same sprite, one with sound and the other without, if you don't have an animation for the ringing phone.
#130
I haven't found anything like RawGetColor (only RawSetColor) in the help file, so I don't think there is such a function.

There is this SaveScreenShot function. With file i/o functions maybe you can do what you want.

Or you write a plugin.
#131
insert silence into the sound file after the phone ring
#132
Have you deleted any sprite, e.g. for a mouse cursor?

There was a similar exception in thread:
http://www.agsforums.com/yabb/index.php?board=2;action=display;threadid=8859;start=msg107896#msg107896

#133
Also the smart scrolling code could be easier as there is simulated such a command (non-blocking).
#134
Have you tried to just copy a complete game (runtime version) onto you pocket pc and start it?
I don't know anything about pocket pcs, so what's the problem with Win CE?
#135
Do you use any GUI-commands in any of your sripts?
If yes, then put display-commands with different texts (e.g. function name and a number) before each command.
Then test the game and note which commands are executed after you click on the save button of your menu bar.
This way you can find out if any of the GUI-commands is responsible for the vanishing.
#136
And the plugin functions ;D
#137
OK, here is the tested script with 2 versions of repeatedly_execute. The first one is easier, but the NPC moves directly ignoring walking areas and stuff. I used 3 waypoints to show how more complex paths can be defined.

// --- room script file ---

int GUARD_CHAR = BERN;
#define GUARD_SX 308
#define GUARD_SY 129
#define GUARD_EX 400
#define GUARD_EY 136

function room_a() {
 // script for room: Player enters screen (before fadein)

 // set start position
 character [GUARD_CHAR].x = GUARD_SX;
 character [GUARD_CHAR].y = GUARD_SY;
}

1. version of repeatedly_execute

function room_b() {
 // script for room: Repeatedly execute
 if (character [GUARD_CHAR].walking <= 0)
 {
   if (character [GUARD_CHAR].x <= GUARD_SX)
   {
     MoveCharacter (GUARD_CHAR, GUARD_EX, GUARD_SY);
     MoveCharacterPath (GUARD_CHAR, GUARD_EX, GUARD_EY);
     MoveCharacterPath (GUARD_CHAR, GUARD_SX, GUARD_SY);
   }
 }
}

2. version of repeatedly_execute

function room_b() {
 // script for room: Repeatedly execute
 if (character [GUARD_CHAR].walking <= 0)
 {
   if (character [GUARD_CHAR].x <= GUARD_SX)
   {
     MoveCharacter (GUARD_CHAR, GUARD_EX, GUARD_SY);
   }
   else if (character [GUARD_CHAR].y <= GUARD_SY)
   {
     MoveCharacter (GUARD_CHAR, GUARD_EX, GUARD_EY);
   }
   else
   {
     MoveCharacter (GUARD_CHAR, GUARD_SX, GUARD_SY);
   }
 }
}

#138
To have all the scene together I tried this:

--- script header ---
import function NoiseReaction ();

--- global script ---
int part = -1;
int oldpc = -1;
int npc = -1;
int npc_room = -1;
int npc_x = -1;
int npc_y = -1;

function NoiseReaction ()
{
 part++;
 if (part <= 1)
 {
   StartCutscene (5);
   // 1. Character triggers something noisy
   MoveCharacter(GetPlayerCharacter(),217,129);
   while (character[GetPlayerCharacter()].walking) Wait(1);
   FaceLocation(GetPlayerCharacter(),217,128); Wait(10);
   DisplaySpeech(GetPlayerCharacter(),"They're locked.");
   // 2. Fade to another room, NPC says something.
   oldpc = GetPlayerCharacter ();
   npc = BERN;
   SetPlayerCharacter (npc);
   part = 1;
 }
 else if (part == 2)
 {
   npc_room = character [npc].room;
   npc_x = character [npc].x;
   npc_y = character [npc].y;
   DisplaySpeech (npc, "What's that?");  
   DisplaySpeech (npc, "I better check the room.");  
   MoveCharacterBlocking (npc, 219, 123, 0);
   // 3. Fade to previous room, same NPC enters room, walks to point
   SetPlayerCharacter (oldpc);
 }
 else if (part == 3)
 {
   Wait (40);
   ObjectOn (0);
   character [npc].x = 301;
   character [npc].y = 127;
   character [npc].room = character[GetPlayerCharacter ()].room;
   MoveCharacterBlocking (npc, 246, 132, 0);
   Wait (40);
   
   // 4. Fade to even another room, animation occurs.
   SetPlayerCharacter (LAVE); // LAVE is set to transparent view
 }
 else if (part == 4)
 {
   ObjectOn (0);
   SetObjectView (0, 6);
   AnimateObject (0, 2, 2, 0);
   while (IsObjectAnimating (0)) Wait (1);
   ObjectOff (0);
   // 5. Fade to first room, some conversation, yadda yadda yadda.
   SetPlayerCharacter (oldpc);
 }
 else if (part == 5)
 {
   DisplaySpeech (npc, "Hey...");
   DisplaySpeech (GetPlayerCharacter (), "Leave this room!!!");
   DisplaySpeech (npc, "OK");
   // 6. NPC returns where he came from, repositions himself where he was (this does not occur on-screen)      
   MoveCharacterBlocking (npc, 301, 127, 0);
   character [npc].room = npc_room;
   character [npc].x = npc_x;
   character [npc].y = npc_y;
   ObjectOff (0);
   part = -1;
   EndCutscene ();
 }
}

function repeatedly_execute()
{
 if (part >= 0) NoiseReaction ();
}

--- interaction to start cutscene ---
function hotspot5_a() {
 // script for hotspot5: Any click on hotspot
 NoiseReaction ();
}
#139
MoveCharacterPath might be helpful to create predefined paths. In repeatedly_execute you can check the last coordinates and when the character arrives there, then e.g. restart moving.
Defining several paths you can choose the next path by random.
#140
Well, never work in the middle of the night on a source code that you haven't seen for a long time. :-\
Fixing one bug, I introduced another.   >:(

Build 1.1.1.13 should be ok now. (Same download location)

Quote
Great plugin! My personal favourite
Thank you. :)
SMF spam blocked by CleanTalk