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

#21
Hello Stew!

It's probably because the Max Channels property for the Music audio type is set to 1. Therefore, you can only have one music track playing at any one time.

On the right-hand pane, go to Audio->Types->Music, and in the properties pane change the 'Max Channels' value.

Hope that helps!
#22
Advanced Technical Forum / Zooming Woes
Tue 05/11/2013 10:06:39
Hello Everyone!

I've been trying to come up with a way to zoom in and out of the background slowly (no problem) with any center point: so the user defines a point and the camera slowly zooms in/out to that point, as long as the image does not move out of the bounds of the screen, in which case the center point is adjusted. (again, no problems there) However, what I am struggling with is positioning of characters/objects in relation to the new 'center point'. I'll go through the theory first to see if that bit is wrong, and if not I'll post up what I've done so far.

The basic assumption I made was that, say, if the zoom level was 2x, the character/object would end up being twice as far away from the 'center point'. I'm using zoom levels 100% (normal) going upwards (so 300% is 3x zoomed in). Therefore, the end XY position of the character/object to the center point would be the initial X distance and Y distance (these distances are calculated on the assumption of a zoom level of 100%) multiplied by the zoom level (so 100% is 1, 150% is 1.5, 167.45% is 1.6745 etc.).

I also figured that as the 'center point' does NOT start at the center (usually), then it's trajectory to the center of the screen would be the point at which the XY of the character/object is calculated from.

So the process on each loop is:
1) Get the zoom level for this loop.
2) Create the new background frame from dynamic sprite (this works fine it seems)
3) Get the position of the 'center point' on it's trajectory to the middle of the screen.
4) Calculate the XY position of the character/object by multiplying the X distance and Y distance by the current zoom level and adding that to the XY value of the 'center point's new position.

It may be an implementation problem, it may even be that the background sprites aren't calculated correctly, but I just wanted to check if the theory was correct first before going further and posting a wall of code.

Thankyou very much for your time!
#23
I'm too tired to look at this properly unfortunately, but some of the programming is a bit obtuse - you have a lot of if/else statements where a single calculation could suffice; EG:
Code: ags
if (dmg==0) monsterz-=1;
 
else if (dmg==1) monsterz-=2;
 
else if (dmg==2) monsterz-=3;
 
else if (dmg==3) monsterz-=4;
 
else if (dmg==4) monsterz-=5;
 
else if (dmg==5) monsterz-=6;

Could just be:
Code: ags
monsterz-=(dmg+1);

Sorry I can't be more help - really very tired!
#24
I had a similar issue running AGS games using the DirectDraw 5 graphics driver - If you are using that, try changing it to Direct3D9 and see what happens...
#25
Quote from: miguel on Tue 03/09/2013 13:50:21
Mine is my inspiration: Leclerc, the onion seller!
I KNEW I recognized him! :D
#26
General Discussion / Re: Board Game Geeks
Tue 20/08/2013 15:57:10
Absolutely love the Shogun board game from 1986, always preffered it to Risk (if you're into that sort of game). Inspired the Total War series apparently too! :) Also, if we don't feel like being dicks to each other at home, there's the co-op Lord Of The Rings board game to hopelessly fail at :P
#27
I think Myinah hit the nail on the head with the issue here from the victim's side: it's not easy to accuse someone of rape if you are the victim. I've dated someone who was raped, and the way she was handled afterwards (was not believed and her parents actively stopped her from bringing the issue further) did leave deep mental scars - I cannot imagine that pain then being brought up again in the courtroom all over again. It's very possible the victim just needed to tell someone, maybe even bring a small amount of justice in a less painful way than going to the authorities.

That being said, the article does suspiciously look like PZ Myers has a definite agenda here which is beyond just warning others. For one, he talks bout his own role, and 'sacrifice', far too much...it's too classically 'look at what I'm doing' and not 'this is reported to have happened'.

Be that as it may, I still think it is just as serious to dismiss a rape claim than it is to accuse someone of rape. What this whole debacle shows is that there definitely needs to be a re-think in the way rape cases are handled (as the article above suggests) - although I don't know the answer as to what the right way would be.
#28
It sounds like you want
Code: AGS
Region.GetAtRoomXY(int x, int y)
to check whether the character is standing on the region when he crosses the bottom edge. Your code would look something like:
Code: AGS
function room_LeaveBottom()
{
 if (Region.GetAtRoomXY(player.x, player.y) == region[1]){ //if the player is on region 1...
   player.ChangeRoom(20, 231,  115);
 }
}


RunInteraction is used when you want to execute the same code that is executed when the player  stands on/walks on/walks off the region, so if you have the room function
Code: AGS
function region1_WalksOnto()
{
  //Some Code
}

Then whenever you call
Code: AGS
region[1].RunInteraction(1)

You're actually executing
Code: AGS
//Some Code

...I think anyway - I haven't ever used RunInteraction (I usually just stick things in separate functions if they are going to be used multiple time) but that's the impression the manual gives...

Hope that helps!
#29
Hahaha! You're all weak, WEAK I tell you - No prissy, namby pamby shiny little deal deal could prise the money from MY cold stingy hands, oh no, I'd rather-THE WITCHER 2 FOR £3.74!?

...

I guess it's never too late to hop on the bandwagon!
#30
[For debugging purposes, you could try copying the mask image to the mirror object every loop instead of at the end (with a display function somewhere), to see how the image is built up.] - EDIT: Sorry, I just realized it wouldn't make a difference...

Other than that, the only explanation I can see is what Khris has already pointed out - that the mask image is drawn onto the mirror object at an oppositely transposed y position...
#31
Ah, they were all Ambient, but Ambient "Max Channels" was set to 1. Changed it to 0 and everything works! :)

Thanks again!
#32
I have the following code:
Code: AGS
//Header of script
AudioChannel *Channel[5];
//Body of script
void AddSound(AudioClip *clip, AudioPriority priority, RepeatStyle repeat, int volume){
  int i, transfer;
  while(i<5){
    if(Channel[i] == null){ transfer = i; i = 10;}
    i ++;
  }
  if(i!=11){ Display("Too many sounds!"); return;}
  Channel[transfer] = clip.Play(priority, repeat);
  Channel[transfer].Volume = volume;
}
void AddSoundAt(AudioClip *clip, AudioPriority priority, RepeatStyle repeat, int x, int y, int volume){
  int i, transfer;
  while(i<5){
    if(Channel[i] == null){ transfer = i; i = 10;}
    i ++;
  }
  if(i!=11){ Display("Too many sounds!"); return;}
  Channel[transfer] = clip.Play(priority, repeat);
  Channel[transfer].Volume = volume;
  Channel[transfer].SetRoomLocation(x, y);
}

then in Room_AfterFadeIn():
Code: AGS
 AddSound(aSound1, eAudioPriorityHigh, eRepeat, 100);
 AddSoundAt(aSound2, eAudioPriorityHigh, eRepeat, 2173, 412, 100);
 AddSoundAt(aSound3, eAudioPriorityHigh, eRepeat, 439, 421, 100);


  The weird thing is, only aSound3 is played. After further investigation, I discovered that the first 3 Channels (Channel[0] to Channel[2]) all have aSound3 as the sound they are playing.

  Annoyingly, the above used to work normaly, but after I replaced some sound files and modified the code like this:
Code: AGS
//Body
void CheckSoundsAreNotNull(){
  int i;
  while(i<5){
    if(Channel[i] != null){
      if(!Channel[i].IsPlaying) Channel[i] = null;
    }
    i++;
  }
}
void AddSound(AudioClip *clip, AudioPriority priority, RepeatStyle repeat, int volume){
  CheckSoundsAreNotNull();
  //same code as above
}
void AddSoundAt(AudioClip *clip, AudioPriority priority, RepeatStyle repeat, int x, int y, int volume){
  CheckSoundsAreNotNull();
  //same code as above
}

Seeing that only the last declared sound was playing, I reverted to the unmodified code, but it seemed the damage had been done and only Sound3 was playing?

Any ideas as to what could be causing this?

Thanks again!

UPDATE: just attempted this code in Room_AfterFadeIn() to replace the previous room code:
Code: AGS
 aSound1.Play();
 aSound2.Play();
 aSound3.Play();

it seems to have the same problem now...
#33
Quote from: miguel on Sat 22/06/2013 00:44:13
> Could you please stop talking? Your breath is like napalm in the morning!
Why sir, YOURS warrants a 3 mile warning!

> Your stupidity is as sharp as your wit dull!
#34
The Rumpus Room / Re: *Guess the Movie Title*
Fri 21/06/2013 00:01:19
Well guessed, the film that probably convinced everyone that Mick Jagger shouldn't be in them...

Your turn!
#35
The Rumpus Room / Re: *Guess the Movie Title*
Wed 19/06/2013 14:40:43
No takers? I'll give a second image (this time with the star 'actor')
#36
Quote from: Ghost on Wed 19/06/2013 13:28:51
My skill is famed in song and tale!
Ay, indeed, you made an impressive lavatory cleaner!

Edit: Whoops, CaptainD got there first...

Edit2: Double whoops, I wasn't aware miguel was responding :D

I take away my challenge, Captain D's is the one to answer folks!
#37
Do you think I could be defeated by a coward like you?
#38
The Rumpus Room / Re: *Guess the Movie Title*
Tue 18/06/2013 14:34:33
This one shouldn't be too hard to guess, so I'll try and make it harder by not showing an image of the star actor (well, 'actor' is a loose term):

#39
The Rumpus Room / Re: *Guess the Movie Title*
Tue 18/06/2013 13:51:25
Is it The Sentinel? (1977 version according to IMDB) based on Micheal Winner's recent death... (the guess...not the film :P)
#40
The Rumpus Room / Re: *Guess the Movie Title*
Tue 18/06/2013 02:18:17
This kind of feels like cheating, because I've never seen the film...the only thing that gave it away was the director's recent death and the fact that he filmed something in my home town (both facts I'd come across recently) - would it still count for me to post the movie, since I kind of googled it based on that info...?  :-\
SMF spam blocked by CleanTalk