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

#241
That sounds like a better way to handle this indeed.
#242
My thought was it should be placed in a rep exec. in order to check that the key is still pressed.
But I'm sure you'll have a better solution  :)

EDIT:
Wait, I did assume that the 3 actions are fired only once when frame == 10, because the frame than is set to frame 0 and the loop breaks.
#243
 >>I assume oCast.Frame increases by a non-blocking animation?
Yes.

>>Also "while (oCast.Frame == 10)" means "loop while Frame equals 10"
isn't the frame set to 0 when (oCast.Frame == 10) is met?

The purpose of the example was to set frame to frame0, run the shooting animation and the Monsterdamagedisplay while frame reaches frame10 while a specific key is pressed...
#244
Why not use a do-while?

In this example oCast's last frame (when bar is full) is frame nr. 10:

Code: ags

if (mouse.IsButtonDown(eMouseRight))
{
  do 
  {
    oCast.Frame = 0; //set oCast to first frame again
    shoot(3.0*damageplayer, armorMonster); //shooting animation
    Monsterdamagedisplay(IntToFloat(finaldamage)); //display function of the damage
  }
  while (oCast.Frame == 10); //when oCast reaches its last frame, so bar is full
}
#245
I would use a label instead indeed.
I usually use a Textbox to get input from a player, like the savegame gui where you type in a savegame name.
#246
AGS Games in Production / Desolate
Sun 14/03/2021 23:08:04
DESOLATE



Story:
'Desolate' takes place in the distant future. A time when long distance space travel is possible and
frequent...

You must escape the derelict space craft. On the way you will have to overcome various challenges
and obstacles throughout over 70 rooms.
Your struggle for survival is escalated by your need to figure out two things:
What happened to the ship, and who 'you' are...



Introduction:
Desolate is a top-down perspective adventure game with arcade and puzzle elements served in a
hybrid TI83-Game Boy monochrome green palette. Or in short, a spaceship crawler.

This is an official port of the original game made in 2004 by Patrick 'tr1p1ea' Prendergast for the
TI-83 & TI-83+(SE) calculators.



Specs:






License:Freeware
Supported OS:Windows & Linux
Resolution:320x240
Colors:4 colors (hybrid Game Boy monochrome green palette)
Input devices:keyboard only

Extra features compared to the original game and the ZX Spectrum remake:

  • re-definable keys (2 sets)
  • music and sound effects
  • improved behaviour of enemies
  • animated doors
  • new sprites and animations for enemies
expected release date: March 2021
#247

  • "Seal the Elephunk" (Creamy)
  • "Mermaid" (Sinitrena)
  • "Fancy a shrimp?" (Creamy)
#248
Quote from: Crimson Wizard on Sat 13/03/2021 17:12:50

arj0n, the code you posted does not change anything in practice, except you store the returned channel pointer in the variable, but you are not using it for anything either.
Also, Stop() function does not return anything so "music = aAtmospheremusic.Stop();" should not compile.
You're correct, I accidentally removed the .Play part and added the channel name in the stop while posting.
I should have re-read it before posting. Fixed.
#249
Although your title says Audio Channels, you're using AudioClips without AudioChannels.

So, in stead of using AudioClips I would create 2 AudioChannels so you can separate the music from the sfx and create fading in/out.

in global script:
Code: ags

AudioChannel *music;
AudioChannel *sfx;


then to play (and stop) music:
Code: ags

music = aAtmospheremusic.Play(eAudioPriorityNormal, eOnce);

  &
Code: ags

aAtmospheremusic.Stop ();


and play sfx:
Code: ags

sfx = aCamera.Play(eAudioPriorityNormal, eOnce);
#250
The Rumpus Room / Re: Exciting exotic animals
Fri 12/03/2021 23:21:09
Meet the fish with humanoid teeth, the Pacu a.k.a. the Nutcracker fish:


#251
Not sure how the 'different walkable areas' are connected to your question,
and if I understood your question correctly, but why not just use this check
in your event of the clicked hotspot:

Code: ags

if (Hotspot.GetAtRoomXY(player.x, player.y) != hYourHotspotName)  //player is not standing on clicked hotspot
{
  Display("Out of my reach");
}
else //player is standing on clicked hotspot
{
  //your event code here
}
#252
Ah, ok.
I've tried to add more silence, but apparently I it was still too short cause the issue was still there.
And as using a quick loop might indeed become a problem, I'll go with the wav version.
Thanx for the answer  :)
#253
I have a gun sfx OGG sound file which has a duration of 180ms.
After importing it as audio>sound it plays correct in the preview pane.

When playing the gun sfx via AudioClip.Play or AudioChannel* AudioClip.Play, only a short click is heard.
When playing a longer sound, for example a BG music track (OGG), all works fine.
After converting the OGG into WAV and importing that into AGS, the WAV version of the gun sfx plays fine via AudioClip.Play and AudioChannel* AudioClip.Play.

So, is there an issue with OGG files that have a certain (too) short duration?
#254
Quote from: Blondbraid on Fri 26/02/2021 22:42:04
Something I've always been weirded out by is the feet of coots, they just don't look right to me, they look like absurdly long claws with some leftover skin scraps haphazardly attached to them;
Anyone else find this creepy-looking?
Not so much creepy-looking, but odd.
These leftover skin scraps do give them the ability to run over water, which is awesome  ;)

#255
And then you suddenly come eye to eye with the illusive Platypus Tentaclus...
[imgzoom]https://dam1976.home.xs4all.nl/AGS/CBall/PlatypusTentaclus.png[/imgzoom]



Quote from: Sinitrena on Fri 05/03/2021 03:05:23
I don't know if this is a problem on my end but Creamy's images always get blurry when trying the zoom function (while mine stay sharp). Anyone else see this?
Yep.
#257
Add something like this after adding an inv item to the players invbox:

Code: ags

int i;
do
{
  invMain.ScrollDown();
  i++
}
while (i < invMain.RowCount);


(invMain is the inv window within the inv GUI)
#258
Quote from: Crimson Wizard on Thu 25/02/2021 14:10:46
What do you call "custom script"? :) I was thinking there's some dedicated script module for listbox, but maybe I should not use word "custom".

Because of your question...:
Quote from: Crimson Wizard on Thu 25/02/2021 11:16:21
Are you sure this is not controlled by some custom script?

...I was assuming you meant any script other than a room or global script...  :)
#259
Quote from: Crimson Wizard on Thu 25/02/2021 13:54:42
Ok, so there is a script that controls this.
sorry for the confusion, yes there is a script but no custom script.

Quote from: Crimson Wizard on Thu 25/02/2021 13:54:42
From the look of the scripts, the problem seems to be that selectedItemText is not set when you make list box visible?
Drat, I tried that but somehow made a mistake by setting the SelectedIndex instead of the selectedItemText.
This is working correctly: selectedItemText = ListBoxInv.Items[0];

Thanx for the info!
#260
And here's the Enter key part for displaying a custom description for a selected listbox item.
When no focus, the line "no item selected" is shown. After using up or down to scroll first, the description line is correctly shown.

Code: ags

else if (keycode == eKeyReturn)
{
  if (gInvListBox.Visible == true) // gInvListBox
  {
    if (selectedItemText == "data cartridge #01") Display ("'I'm hurt bad...'");
    else if (selectedItemText == "data cartridge #02") Display ("'For security reasons I had to change the Level 2 Access Code.'");
    ...
  }
  else Display ("no item selected");
}
SMF spam blocked by CleanTalk