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

Topics - arj0n

#161
I have an if, else statement for 1 object.
But I have several objects for the same if, else statement,
so that statement now needs to be copy-pasted for each object.

How can I group them first, for example as X and then run the if, else statement
only once for X in stead of running the statement all objects1, then running it for object2, etc.?

I hope my explanation makes any sense  :P

Arj0n.
#162
The following code causes an object to move, how can I add "aClick.Play();" to this line?
The object should move and aClick should be played...


else if (((myobject.X+120<=oBlock4.X && myobject.Y-60==oBlock4.Y-120) && myobject.X <=420 &&
             myobject.ClickedRightHalf())) myobject.Move(myobject.X+60, myobject.Y, 10, eNoBlock, eAnywhere)

Sorry if this question is a bit silly but I can't figure it out myself at the moment... :-[
#163
Another question:

Say object1 moves only left or right and object2 can be in it's path.

How can check to prevent 2 objects colliding with each other?
Tried 'IsCollidingWithObject' but that doesn't prevent.
#164
Object should only be allowed to move when object.x is withing 20 and 530 [having the object horizontal size: 90].
Horizontal room size: 640.

This doesn't seem to work...:

function Block_AnyClick()
{
 Object* myobject = Object.GetAtScreenXY(mouse.x, mouse.y);
 if ((myobject.X <=530 && myobject.ClickedRightHalf())) myobject.Move(myobject.X+100, myobject.Y, 10, eBlock, eAnywhere);
 //move left
 else if (myobject.X >=20)  myobject.Move(myobject.X-100, myobject.Y, 100, eBlock, eAnywhere);
 //move right
}
#165
In order to get an object to move right or left x pixels I'd like to know,
if it's possible to determine if the mouse pointer clicks on the right half
or on the left half of an object.

#166
I'm trying to get a vertical scrolling room working.
Gameresolution: 640x480, room background resolution: 640x5421
Can't figure out why this piece of code doesn't work...:


function room_RepExec()
{
if (mouse.y <= 20) { //if mouse is near top of screen
 SetViewport (GetViewportY() - 10, GetViewportX()); // scroll down 10 pixels. Change this for quicker or slower scrolling.
}
else if (mouse.y >= 300) { //if mouse is bottom of screen
SetViewport (GetViewportY() + 10, GetViewportX()); // scroll up 10 pixels. Change this for quicker or slower scrolling.
}
}
#167
Does someone know if I can find Background Blitzes on this old forum?
The search option didn't gave me any proper result...
#168
..:: Background Blitz Collection Screensaver.

..:: Containing 261 background blitzes from 2003 - 2010. Blitzes are shown in a random order in an infinite loop.
    Images are all changed into 640x480, letterboxed when needed. v1.2: 23-bit (true colour).

..:: I always follow the "Background Blitz" forum thread and I'm always amazed by the fantastic entries.
    So I made this screensaver in order to immortalize their great work.

..:: Options:
    Set Background Blitz info on: Theme, Date & Background Blitz by are shown.
    Set Background Blitz info off: No info is shown, you are able to set the slide duration [1 to 8 seconds]

..:: Note:
    [ESC] quits the screensaver but due to wait functions this can be a little difficult.
    So if [ESC] fails just use [ALT][X].

..:: Updates:
    22 Juli 2010: v1.3:
    * Fixed room bug.
   
    19 Juli 2010: v1.2:
    * Changed the colour depth from 16-bit (high-colour) to 32-bit (true-colour),
    * Contributors lists now scrollable.

    08 Juli 2010: v1.1:
    * Removed one BB entry on demand
    * Fixed 2 name typos in the list.

..:: Size:
    Zipped...: 90.0 Mb
    Extracted: 128 Mb

..:: Thanx!:
    Khris, monkey_05_06 & tzachs: for helping me out with the randomizer :-)
    Dualnames: for hosting [mirror]
    ProgZmax: for let me use his "underwater rocket thingy" as intro pic

..:: Download:
    from the gamepage

..:: Screenshot:
   


..:: Mosaik compilation of [almost] all the entries used in the screensaver:
   
#169
I'd like to have the playercharacter goto to the next room when the timer is expired.
Say I have 10 room and the player starts in room1.
After the timer has expired, the player should automatically go to room2.
After the timer has expired again, the player should automatically go to room3. And so on.
There should also be a check for the maximum room number [room 10 for now],
in order to quit the auto-change.room.

I tried:
function repeatedly_execute() {
if (IsTimerExpired(1)) player.ChangeRoom(cEgo.Room) + 1)

Which results in an error: GlobalScript.asc(74): Error (line 74): Parse error in expr near '1'

[I tried to achieve: changeroom('currentroom') + 1. Which doesn't seem to be ok]
#170
Why is this litle code resulting in a parse error?:

Error:"GlobalScript.asc(72): Error (line 72): PE04: parse error at 'else' [Line72 is the "else if" line]

Code:
function repeatedly_execute() {
mouse.UseModeGraphic (eModePointer);
if (Label11.Text == "Random order, infinite loop"){
 if (IsTimerExpired(1)) player.ChangeRoom(Random(4) + 1); // (highest room number-1) + (1)
 if (IsGamePaused() == 1) return;

 if (IsKeyPressed(eKeyEscape)){
   mouse.Visible = true;
   QuitGame(1) ;
   mouse.Visible = false;
else if (Label11.Text == "Chronological order, no loop"){
}
}
}
}
#171
General Discussion / Screensavers made in AGS?
Tue 04/05/2010 19:27:05
Are there any screensavers or screensaver-like programs made in AGS yet?
The only one I know of is "WOO - World of our own (by Gepard)".
#172
When clicking on button12 in gGuiListC02, gGuiListC02 gets invisible and gGuiListC03 gets visible.
But when gGuiListC03 is shown and I click on the button that will set gGuiListC03 invisible and gGuiListC04 visible [let say button13] that button has no function.
When I first move the mouse a tiny bit and then click button13, the button does function.
Both buttons are at exact the same spot.

Can someone explain to me why this occurs??


code:
function Button12_OnClick(GUIControl *control, MouseButton button)
{
mouse.Visible = true;
mouse.UseModeGraphic (eModePointer);
gPanel.Visible = false ;
gGuiListC02.Visible = false;
FadeOut(10);
Wait(10);
gGuiListC03.Visible = true;
FadeIn(20);
#174
How can I build a check (I guess it needs to be in repeat exec.) that checks whether the
escape button is pressed or not even when fade-in or fade-out of a room is happening?

This part works but not when fading in or out of a room, only when a room is normally show:
------------------------------------------------------------------------------------------
function on_key_press(eKeyCode keycode) {
 // FUNCTION KEYS AND SYSTEM SHORTCUTS
 if (keycode == eKeyEscape) {
   // ESC
   mouse.Visible = true;
   QuitGame(1);
   mouse.Visible = false;
------------------------------------------------------------------------------------------
Thanx.
#175
Is there anyone who has collected the [or some of the] background blitzes that are lost now?
Lost of hosting places for these pictures are gone for example.

The oldest background blitz in the forum starts here

Thanx.
#176
I would like to load a random room with a certain time to show this room and then switch to another random room and repeat this as in a loop. The rooms have no specific connection with each ther and there is no player character.
I'm sure there needs to be more code, cause the "certain time" is also missing...

player.ChangeRoom(Random(5) + 1); //Changes room to a random room between 1 and 6

#177
Can someone tell me why OGG play's fine but OGV results in a black screen using the playvideo command?
#178
I know ogg files can be put in the compiled dir and run by the playvideo command.
But can OGG files be included in the exe file?
#179
Get it for free at: the official site: :)

THE BATTLE FOR THE FUTURE HAS BEGUN!

Set in the early 21st century, Tiberian Sun once again pits the Global Defense Initiative against
the Brotherhood of Nod in a struggle for control of the planet. With an epic storyline that unfolds
as play progresses, players learn the reasons behind the worldwide outbreak of Tiberium and
what happened to the notorious Nod leader Kane, who was presumed dead at the end of the
first Command & Conquer.

KANE IS DEAD. A NEW ENEMY HAS EMERGED.

It's time to head up the Firestorm task force. Nod's experiments have unknowingly released a
horde of cybernetic nightmares upon the world. As GDI and Nod scramble to save themselves,
they realize their only salvation lies in the unthinkable.

Arj0n.
#180
Hey peops, here some info for retro games lovers:

At GOG.com you now can download for free until the 24th of December:
Tex Murphy 1 -  Mean Street &
Tex Murphy 2 - Martian Memorandum

The only thing you need to do is to create a free account and add this Gamepack to your account.
Then you can download the Gamepack and some Extra Content from your account.

Some specs:

Tex Murphy 1 - Mean Streets:
Access Software, Inc. - 1989
Windows XP & Windows Vista (32 & 64 bit) compatible
Graphic modes [VGA256Color 320x200]: Overlay, Surface, Direct3D, DDraw, OpenGL
Quit game: ESC

Tex Murphy 2 - Martian Memorandum:
Access Software, Inc. - 1991
Windows XP & Windows Vista (32 & 64 bit)] compatible
Graphic modes: Overlay, Surface, Direct3D, DDraw, OpenGL
Quit game: CTRL-Q

The Tex Murphy 1+2 installer comes also with a Dosbox v0.73 install option.

Total space required for the Gamepack:       34,8 MB
Total space required for the Extra Content: 13,0 MB

Extra Content:
Manuals (Mean Street & Martian Memorandum) 10MB
Avatars (series) 1MB
Mean Street Detective Information Chart 1MB
Mean Street Map 1MB

Enjoy,
Arj0n  ;)

Edit, some screens:

Tex Murphy 1 -  Mean Street:





Tex Murphy 2 - Martian Memorandum:






SMF spam blocked by CleanTalk