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

#201
Err... I think that would make some of the script's functioning diffictult to handle.  For example, normal text is black, because commented text is green, and numbers and messages are red, and int, short, string, etc are blue.

If you were to be able to change everything to green, it would make reading the script very difficult.
#202
That would only work if the 'current_bg_music' had the exact same value as the playing music though.  I didn't think he would really have all the possible bg music lined up as 1, 2, 3, 4, etc.
#203
Update!!!

Four new levels, three new ships, and a whole new game interface are now available.  Please, tell me what you think of the new interface.  I look forward to many critics and comments on this release, because quite a bit has changed.

If you haven't tried out any beta's yet, start now.

(All new screenshots too  :D)

-Regards, Akumayo
#204
Declare a variable called 'int current_bg_music' in the top of your room script.

Set it to whatever the starting bg_music is, for example, if you start with music 1:

Code: ags

int current_bg_music = 1;


Then, when you interact with the radio:

Code: ags

if (current_bg_music == 1) {
  PlayMusic(2);
  current_bg_music = 2;
}
else if (current_bg_music == 2) {
  PlayMusic(3);
  current_bg_music = 3;
}
else if (current_bg_music == 3) {
  PlayMusic(4);
  current_bg_music =4;
}
else if (current_bg_music == 4) {
  PlayMusic(1);
  current_bg_music =1;
}


This will play four songs by interacting with the radio.  The first time will play song 2, second time, song 3, third time, song 4, and fourth time will start over with song 1.

Hope that helps

-Regards, Akumayo
#205
Hey, even I didn't know that it would keep running during dialogue, that's pretty cool.  I'm glad you're happy with it!
#206
Nothing's happening, start a new comp before we forget about this one... I'm addressing no one in particular... but someone should start a new comp...
#207
Small thing here, in the lastest update, I might have accidentaly enabled the player to unlock two of the three upcoming Class B ships after all the levels have been completed.Ã,  Thus allowing them to play any of the 8 levels just beaten with one of the Class B super-ships...

But again, it was all an accident.

-Regards, Akumayo
#208
Sorry, I forgot to mention, the Emit_Particles function has been renamed to Single_Emit_Particles.  That should fix your problem.
#209
Try this:

In Player Enters Screen (before fadein):

-Use Edit_Particle_Values to set up the smoke
-Call Continuous_Emit_Particles_Go to start up the smoke.

You may want to call it in (after fadein), if it gives you any trouble.
#210
Updated to version 1.5

Now it allows to call Continuous emmision, and define how many particles are to be used.
#211
I added noloopcheck just now, to see. Ã, The script doesn't get hung, I think, I'm not sure. Ã, The effect is nasty. Ã, After a very long period of humming (about 8 seconds) and doing nothing, control returns to the normal script. Ã, I'm not sure what exactly is happening. Ã, I removed the noloopcheck. Ã, Then I changed the 'Particles_To_Use' value down to 200. Ã, It runs now, fine, looks good actually. Ã, So, I guess that particular variable should be kept low for now.

That still doesn't fix the problem though. Ã, What is resetting 'particle_check'?

EDIT:

Just saw other replies.
dkh:Ã,  That may actually be the problem, with the way I had the display set up.Ã,  I'm going to tinker some more and see what else comes up.Ã,  The while shouldn't cycle over 1000 times, but it is anyway.

RE-EDIT:

Tinkered a bit.  The while IS only running 1000 times.  For some reason, the engine just THINKS it's running more than that.  Maybe, as dkh said, because it's in repeatedly_excecute.  I dunno, but that's the problem.
#212
General Discussion / Re: Ninja School
Wed 24/05/2006 19:07:12
That was... probably one of the top ten weirdest things I've ever seen....

Congradulations!
#213
I seem to have many difficulties with the while function, but here's a new one...

I have the following code, a quick check to get me the number of 'game_particles' that are 'alive' at the moment:
Code: ags

function Num_Particles_On_Screen() {
Ã,  int particles_on_screen = 0;
Ã,  int particle_check = 0;
Ã,  while (particle_check < Particles_To_Use) {
Ã,  Ã,  if (game_particle[particle_check].alive == true) particles_on_screen ++;
Ã,  Ã,  particle_check ++;
Ã,  }
Ã,  return particles_on_screen;
}


As you can see, the while runs until it has exceeded the number of 'Particles_To_Use', and then returns the total number of those found 'alive'.Ã,  However, when I run the function, I get an error because the while loop appears to be hung.Ã,  I have assured that 'Particles_To_Use' is not a number above the while loop limit before noloopcheck needs to be used.

I tried placing a display command inside the while loop, after the line "particle_check ++;"
It displays "0, 1, 2, ... 998, 999, 0, 1, 2, ..."
'Particles_To_Use' is set to 1000 at this point.Ã,  So, why on earch is the script jumping backwards and re-setting 'particle_check' to 0?!

I suspect the 'return' function, but the manual only refers to 'return' as a dialog command.

-Thanks for any help, Akumayo
#214
Everything is called globaly.  Do you need to export array definitions?  It's strange really, the other variables assigned in the Team struct are called without problem, it's just the String var that they have a problem with.  It's really quite irritating...
#215
I have the following bits of code in my script:
Code: ags

//in global header

struct TeamStats {
  ...
  String Name;
  ...
};


Code: ags

//top of global script

TeamStats Team[Max_Num_Teams];


Code: ags

//game_start script

Team[Team_A - 1].Name.Format("USA Army");
Team[Team_B - 1].Name.Format("Red Army");
Team[Team_C - 1].Name.Format("British Army");
Team[Team_D - 1].Name.Format("Nazi Army");  


Code: ags

//within a function

if (regular_damage != 0) {
    if (Unit[unit_ID].Defense >= regular_damage) {
      if (Unit[unit_ID].Team != Neutral) Display("%s of The %s has recieved 1 damage to its armor.", Unit[unit_ID].Name, Team[Unit[unit_ID].Team - 1].Name);
      Unit[unit_ID].Armor --;
    }
...


Notice the Display command in the last code.  I have similar display commands all throughout my functions.  That is, display commands that should display the String Name of the team of the variable unit_ID.  However, whenever any of these commands are called, where the team name should be, '(null)' is displayed.  However, I defined them in the game_start.  What am I doing wrong that the game thinks that they are (null) still?
#216
General Discussion / Re: Christopia
Mon 22/05/2006 06:06:19
All jokes aside though, that BYOND engine looks promising, if, of course, someone who isn't as lazy as me attempted to build an AGS hotel thing.  (I stopped trying when I couldn't make the map appear anything but black  :'()
#217
I was simply looking for a more direct way  :)
Thanks for letting me know I wasn't wrong, it doesn't happen very often.
#218
Quote from: Farlander on Sun 21/05/2006 22:49:41
When I said "theis has been tried" I meant the huge colaborative projects. They allways fail. A pìtty, but true.

I don't think he means for this to be colaborative.  It sounds to me like a year-long comp of individuals building something for the comp.
#219
I'm not sure exactly of what you're asking, but I'm quite positive that you can pass the view name in place of the number, like:
Code: ags

player.ChangeView(NORMAL);
#220
I think Krysis has the best idea.  You shouldn't have to be "invited".  If it's a long-term contest, where you know many challenging entries are going to appear, and you STILL think you can measure up, then by all means, enter and prove it!
SMF spam blocked by CleanTalk