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

#361
I'll hopefully have time to scrap together an entry, so much to do right now...Ã,  :-\
I look forward to seeing the entries in the meantime.

I'm not quite sure I really understand the topic.  We're supposed to build a module/template that contains an engine for turn based battle systems?  Or are we supposed to build a game that uses a turn based battle system?  What are we aiming at?  An engine?  A game?  A system?  I'm confused...
#362
Quote from: RickJ on Wed 22/02/2006 00:56:54
The easiest workaround at the moment is to just dump data into a file and then read it back using the on_event() inteaction in the global script or in a module.Ã, 

Could you describe how exactly I would go about doing that?Ã,  I'm completely new to AGS's I/O commands.Ã,  I'm not even sure how I would set up the file to dump contents into, much less how to read it back.Ã,  I'm studying what the manual has to offer, but it doesn't really make much sense to me.Ã,  I'm trying though...

EDIT:  A new approach to the problem led me to a solution.  By converting all my local variables to global variables, and calling ResetRoom(); for all rooms from the starting room, then changing ResetGame() lines to lines that alter the character room to that of the ResetRoom(); room, I succesfully reset the game, but kept all the variables.  (I'm very glad my game is room based now  ;D )

Thanks for the help anyway guys!
#363
Hrm... It is being fed directly back into the game, but if the player is crafty, I think they could get around and change the values.  Perhaps there is another way to pass the variables on after a restart?
#364
Thanks Ashen, I'm looking into the file functions.  Perhaps they will serve the purpose, for now I realize that I need much more than just that one variable to be saved.  Perhaps ten or twenty will have to be saved to disk.  The player can't edit the files can they?
#365
Is it possible?Ã,  It would be about 300x more convenient for me if I could call RestartGame(); and somehow keep one of the variables I've defined.Ã,  Manually resetting everything will take ages, even with a defined function.Ã,  Is there an easier way to do this?

EDIT:
I just thought of this, a solution to my problem, but I'll still need help to do it.Ã,  How would I store the contents of the variable into an external file, and then upload the contents back after the game is finished resetting?
#366
Thanks  ;D
Pardon my stupidity  :-[
#367
I know this is stupid but even using the 'search' feature, I was unable to find the announcement thread telling the results of the FORGO's.  I missed the IRC ceremony, and would like to know who won what.  Is the thread even out yet?  I MUST know the winners! 
#368
The Rumpus Room / Re: Best ROCK song ever!
Mon 20/02/2006 18:35:16
Yay!Ã,  Someone recognizes it!Ã,  (And I know perfectly well what it's about, but that won't stop me from posting it, for it is one of the greatest rock songs ever IMO)
#369
The Rumpus Room / Re: Best ROCK song ever!
Mon 20/02/2006 17:35:38
LIAR!
LIAR!

Banana Banana Banana Terracotta
Banana Terracotta Terracotta Pie!

Banana Banana Banana Terracotta
Banana Terracotta Terracotta Pie!

Is there a perfect way of holding ya' baby?

Vacinity of Obsenity in your eyes

Terracotta Terracotta Terracotta Pie

Is there a perfect way of holding ya' baby?

Vacinity of Obsenity in your eyes

Terracotta Pie HEY!
Terracotta Pie HEY!

Do we all...
Learn defeat...
From the whores...
With bad feet...
Beat the meat...
Treat the feet...
To the sweet...
Milky seat...

LIAR!
LIAR!
LIAR!
LIAR!

Banana Banana Banana Terracotta
Banana Terracotta Terracotta Pie!

Banana Banana Banana Terracotta
Banana Terracotta Terracotta Pie!

Banana Banana Banana Terracotta
Banana Terracotta Terracotta Pie!

Banana Banana Banana Terracotta
Banana Terracotta Terracotta Pie...........
#370
Well, it's been awhile since anyone's voted.  I declare the voting closed! 

The winner and creator of the next competition is to be:

Rocco for his AGS Invaders Module

I hope we have a great topic and many entries upcoming!
#371
Well, times up.  I declare the voting OPEN!!!
I'll cast mine.



Though colxfile's game was interesting, rocco's seems much more able to do what the topic asked, so I cast my wholehearted vote for:

AGS Invaders, a Shoot'em Up module, by Rocco

Don't forget to vote people!
#372
Excellent, we have entries!!Ã,  ;D
I had begun to worry.Ã,  There's still a few hours left for the rest of you, if you're going to enter, you'd better hurry!

Colxfile:  Where's your source?  The module?  I can't inspect your coding to see how you did it!  How can I cast a proper vote if I don't properly know all the entries?  We need to see the source.
#373
That was indeed the problem Ashen!  Thank you both for your help.  I appreciate it to a great degree!
#374
Well, the error is no longer being generated thanks to Ashen's help... but... CHAOS errupts on my screen!  Every character in the room constantly re-organizes it's position to a new random location!  It's madness!!!  What's wrong with my script that makes them think they're always touching?!

Code: ags

int characterone = 7;
int charactertwo = 8;
while (characterone <= GetGameParameter(GP_NUMCHARACTERS, 0, 0, 0)) {
  if (character[characterone].IsCollidingWithChar(character[charactertwo]) == 1) {
    character[characterone].x = (Random(xboundb - xbounda) + xbounda);
    character[characterone].y = ((Random(ybound / 20) + 1) * 20);
  }
  if (charactertwo != GetGameParameter(GP_NUMCHARACTERS, 0, 0, 0)) {
    charactertwo ++;
 }
  else {
   characterone ++;
    charactertwo = 8;
 }
}  


My my, my head hurts just from looking at that madness.
#375
I'm sure that would fix it, but searching the manual I can't find "Game.CharacterCount" or it's equivalent.  I know there's a way to return the number of characters, but I can't find it.
#376
Hrm... I suppose that would be rather easier, on the user's part.  I may change it later, when I'm not so busy.  Thanks for pointing it out though.
#377
This was an entry in the last coding competition.  I thout I'd share with any who didn't see it (it won!)

Here's a copy of the entry post, which includes documentation and download links (the update script includes docs on the lightning functions):

Akumayo's Weather Module sports functions that have literally no limit on their usage!  The possibilities are endless I tell you!  Now, allow me to clarify each function (This module uses functions from the Advanced Randoms Module, which is included in the download):

Code: ags

BeginEnvironmentalEffect(int slota, int slotb, int slotc, int slotd, int slote, int slotf, int slotg, int sloth, int envfallingspeed, int envwindspeed)


"slota" through "sloth" are the integers representing the sprite slot number of each weather piece.  This means you can have eight different designs of snowflake/raindrop/leaf, etc.  envfallingspeed is the integer representing how fast and what direction the weather pieces will fall.  Passing a positive direction will result in weather from the sky.  Passing a negative one will result in weather from the ground up (like bubbles).  The higher the absolute value of the integer, the faster the effect happens.  envwindspeed is the integer which controls how fast and what direction the weather pieces will move.  Passing a positive integer will result in movement to the right.  Passing a negative integer will result in movement to the left.

Code: ags
ChangeEnvironmentSpeeds(int newenvfallingspeed, int newenvwindspeed)


This function allows you to reset the speeds of an enviornmental effect, withough resetting it.  (Like for changing the direction of the wind.)  newenvfallingspeed allows you to redefine how fast and what direction weather piecies fall.  newenvwindspeed lets you redefine how fast and what direction weather piecies move left or right.

Now for examples:

Code: ags

  BeginEnvironmentalEffect(8, 9, 10, 8, 9, 10, 9, 8, 3, -2); 


Assuming 8, 9, and 10 are spriteslots of snowflakes, the above function would make slow falling snow moving slightly to the left as it falls.

Code: ags

  BeginEnvironmentalEffect(8, 9, 10, 8, 9, 10, 9, 8, 5, -4);  


This, however, would make snow falling pretty fast and moving pretty sharply to the left as it falls.

Now, if you were to integrate the other function in, then through repeatedly_execute you could make something more complex.  After creating a variable called weathergoing and setting it to one after calling BeginEnviornmentalEffect from elsewhere in the script, and making another integer called "w" and setting it to 0 by default:

Code: ags

  if (weathergoing == 1) {
    if (w == 5) {
      w --;
    }
    else if (w == -5) {
      w ++;
    }
    else if (w != -5 && w != 5) {
      w += RandomWeightedDice(-1, 10, 1, 10, 0, 80, 0, 0);
    }
    ChangeEnvironmentSpeeds(2, w);
}


This would end in weather that was moved left and right by gusts of wind, rather than having a constant windspeed.

IMPORTANT:  To end weather effects, pass BeginEnvironmentalEffect with all the "slot" integer values as 0, or a spriteslot that is blank.  Don't worry, the game runs at a normal speed still.

The demo game included in the download has the following effects to preview:
Rain
Snow
Heavy Rain
Heavy Snow
Sea Bubbles
Sandstorm
Meteor Shower (more like an apocalyptic doom of a meteor shower...)
Option to switch on code for varying windspeeds

A note on the side, and the only downside I've noticed so far, effects look sort of clumped together their first time across the screen, but they get better and more realistic quickly after that.

This module would also be ideal for leaves falling slowly, or something of that nature.

User Experience Recommended:
-Basic knowledge of the sprite manager

UPDATE:

Akumayo's Weather Module now contains, the CastLightningBolt!!! function!!!  Now... who wants to get fried?  Here's the specs on the CastLightningBolt function and it's affiliate.

Code: ags

function CastLightningBolt(int boltseed_x, int boltseed_y, int boltstop_y, int boltstrike_speed, int boltstrike_xoffset, int bolt_color)


This is CastLightningBolt.  CastLightningBolt does just what it says, but works off Raw functions instead of overlays, meaning you can Cast lightning bolts when it is raining, snowing, etc.
-boltseed_x:  The x position of where the lightning bolt will begin
-boltseed_y:  The y position of where the lightning bolt will begin
-boltstop_y:  The y position of where the lightning bolt will end
-boltstrike_speed:  How fast the lightningbolt will fall (must be > 0)
-boltstrike_xoffset:  How much the lightning bolt will waver as it grows (must be >= 0)
-bolt_color:  The color of the lightning bolt

*NOTE:  Never, Never, Never call a CastLightningBolt function while one is already running, doing so will result in the bolt that was running sticking to the background, and a new one starting.  That's where this function comes in:

Code: ags
function IsLightningGoing()


This returns 1 or 0.  1 means a lightning bolt is playing, so DON'T call CastLightningBolt.  0 means no lightning bolts are playing, so you can CastLightningBolt if you want to.

Now, by merging these together, we can create a Lightning Storm!!!  (Demonstrated in the demo game):

To start up the storm, place this in any interaction:

Code: ags

  Display("Let the reign of lightning begin!");
  lightninggoing = 1;
  hlight.Enabled = false;
  CastLightningBolt(Random(319) + 1, 0, 200, RandomBoundries(5, 15), RandomBoundries(1, 5), 65472);  


Then place this under repeatedly_excecute:

Code: ags

  if (lightninggoing == 1) {
    if (IsLightningGoing() == 0) {
      if (timerone == 0) {
        SetTimer(1, Random(40) + 1);
        timerone = 1;
      }
    }
  }
  if (IsTimerExpired(1) == 1) {
    timerone = 0;
    CastLightningBolt(Random(319) + 1, 0, 200, RandomBoundries(5, 15), RandomBoundries(1, 5), 65472);
  }


And BOOM!!!  A lightning storm is born!!!  Check it out in the demo!!!  And remember, don't get caught in the lightning!

Download Akumayo's Weather Module Plus the Lightning Function (Advanced Randoms Module included) and the demo game previewing some of the possibilities:

HERE!

Download the README which contains all the stuff in this post here (before Lightning update):
http://www.2dadventure.com/ags/AkumayosWeatherModuleREADME.zip


Well... there it is, enjoy.

-Regards, Glacies Akumayo

Edit by strazer:

Quote from: Akumayo (Will return by July 20th) on Thu 22/06/2006 23:15:18I don't plan on going back to the Weather Effects module.

Try his Lighting module.

Edit by Dualnames:

-Replaced all links that didn't work. Unfortunately I have not been able to retrieve the readme, if in any case someone has it, let me know and I shall update this topic.
#378
I have the following while function in a room's repeatedly_excecute script:
Code: ags

int characterone = 0;
int charactertwo = 1;
while (characterone <= 299) {
  if (character[characterone].IsCollidingWithChar(character[charactertwo])) {
    character[characterone].x = ((Random(13) + 1) * 20);
    character[characterone].y = ((Random(6) + 1) * 20);
  }
  if (charactertwo != 299) {
    charactertwo ++;
  }
  else {
    characterone ++;
    charactertwo = 1;
  }
}  


It, in theory, should check to see if any characters in the whole game are colliding, and if they are, will move one two a randomized position.  The problem is that it generates the following fatal error:

Quote
---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x0042E0B7 ; program pointer is +6, ACI version 2.71.894, gtags (1,2)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and notify CJ on the Tech forum.

in Room 9 script (line 402)


Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.
---------------------------
OK   
---------------------------

NOTE:  Room 9 script line 402 is the following line from the while function above:
Code: ags

  if (character[characterone].IsCollidingWithChar(character[charactertwo])) {


Thank you for any help you can offer.
#379
Just wanted to post and remind everyone of the upcoming deadline.  Only 4 days left, there'd better be a blowout of entries between now and the 15th!
Good luck to all!
#380
Like Samara, you never sleep Chris.  Amazing stuff!  Kudos!
SMF spam blocked by CleanTalk