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

#21
I have a few functions in the top of my script.  Only one of them is imported in the header, because it's the only one that is needed elsewhere in the script.  I call that function in repeatedly_excecute:
Code: ags

...
Display("Some message.");
Display("Some other message.");
My_Function();
...


Now, within the function is a display message:
Code: ags

...
Display("A message.");
}  //<--- this bracket closes the function
...


When I run the game, the two messages in repeatedly_excecute are displayed, but the one that is from the function never shows up.  This is incredibly aggrivating.  Does anyone have a clue of what I'm doing wrong?

Thanks for any help in advance.

-Regards, Akumayo
#22
Why not have a page on the main AGS site for modules, that's set up like the one for games?  One could still upload a screenshot, and give a description of what their module does, etc.  I think that would be most helpful for those looking for modules in general, rather than for a specific task.
#23
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
#24
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?
#25
I have the following line in my code:

Code: ags
RawDrawLine(FloatToInt(x_origin + x), FloatToInt(y_origin + y), FloatToInt(x_origin + x), FloatToInt(y_origin + y));


x_origin, y_origin, x, and y are all defined as float values.Ã,  Now, when I run my game, I get an error off of this line:

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

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 Global script (line 16)
from Global script (line 33)


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

Line 33 calls the function that contains line 16, which is the offensive code quoted up top.

Does anyone see the problem?

-Thanks in advance, Akumayo
#26
I have the following code in my On_Mouse_Click:

Code: ags

if (mouse.Mode == eModeChoose) {
		Ã,  int current_item = 0;
		Ã,  while (current_item <= GetGameParameter(GP_NUMINVITEMS, 0, 0, 0) - 1) {
		Ã,  Ã,  if (InventoryItem.GetAtScreenXY(mouse.x, mouse.y) == inventory[current_item])
		Ã,  Ã,  Ã,  player.ActiveInventory = inventory[current_item];
		Ã,  Ã,  current_item ++;
		Ã,  }
Ã,  Ã,  }


When I click on an inventory item, however, it doesn't become my active inventory, as it should.Ã,  (I have confirmed that the cursor is eModeChoose, before anyone asksÃ,  :P)

Does anyone see something I'm missing?

-Thanks in advance, Akumayo
#27
Quote
---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x0046B345 ; program pointer is +6, ACI version 2.71.894, gtags (1,11)

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 Global script (line 150)
from Global script (line 233)


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

Global Script line 150:
Code: ags

Display("%d, %s | %d, %s", AI_Unit, Unit[AI_Unit].Team, Bogey, Unit[Bogey].Team);


Global Script line 233 runs the function that line 150 is contained in.

What have I done this time?

-Thanks in advance, Akumayo
#28
Is it possible, even with a workaround, to make AGS draw an unfilled circle, rather than the filled ones it draws currently.Ã,  The ability of the engine to do this is crucial to the user-end of my game...

-Thanks in advance, Akumayo
#29
(This was the winner of the Particle Engine coding competition.)

This engine centers around the rendering of realistic-looking fire and smoke effects.Ã,  I've also managed to make it draw some water-based effects, and I'm sure that the end user, with some tinkering, can make even better and more diverse effects than I have managed.

Updates so far:

Version 1.5:
Ã,  -Added the ability to spawn particles continuously, rather than having to call the emision from repeatedly_excecute every time
Ã,  -User can now define how many particles to emit, rather than always having to emit all available particles
Ã,  -Cleaned up some minor errors and re-wrote the commentary

Some screenshots:

'Torch Flame' from the demo game:


'Rising Smoke' from the demo game:


'Falling Water' from the editor interface demo:


'Rising Fire' from the editor interface demo:


--------------------

Notable Features:

*User can define how many particles to render, so that different systems can render more or less particles
*Every part of the particle movement can be customized, so no two effects have to have anything in common
*Particles have the ability to 'fadeout' as they move across the screen, making fire/smoke far more realistic than particles that have a static transparency
*Changeable X and Y gravity allow particles to fall sideways, up, down, and at almost any angle
*Particles can be emited continuously by a function, for easier user-control
*Number of particles to emit can be defined
*The entire module is commented, so that the user can better understand how it works
*The .rtd that comes with the download details every function in full, and offers examples of how to implement each one
*Editor Interface Demo allows the user to play around with the module without having to upload it to a game, and lets them tinker with every variable that the particles use.
*Effects Demo lets the user jump right in and see five of the effects in action (geyser, rising smoke, campfire, torchfire, and waterfall)
*By tinkering with the variables, the user can make fire/smoke for every occasion, water effects, and beyond!

--------------------

Now, a brief overview of how it works:

Akumayo's Particle Engine works by emitting particles at a user-specified point, and giving them user-specified stats that control how they behave.Ã,  The particle transparency values can change by the fadeout value, so that things like fire and smoke can get more transparent as they reach the end of their lifespan.Ã,  The particles' speed counteracts gravitational forces acting on them, so a higher speed makes a particle more independent.Ã,  The particles' speeds will drop though, as they succumb to gravity, and then they will fall/rise accordingly.Ã,  The particles' ability to deviate gives them a more natural look.Ã,  Deviation on one axis or another can be the difference between a flat column of fire, and a roaring blaze.Ã,  A user-defined lifespan can remove particles after they have been on the screen for a while, allowing flames/smoke to disappear after rising on the screen for a bit.Ã,  They can also be removed by crossing user-defined x and y lines on the screen.Ã,  By default these values are the edges of the screen, but for effects such as waterfall, the particles would need to disappear as they hit the water, rather than when they left the screen.Ã,  When Emit_Particles is called, all inactive (dead) particles are placed on the screen at the user-defined coordinates, with the user-defined stats, and begin to move about.Ã,  Combining all these variables and stats together, realistic looking bodies of particles can be rendered in your game with the tinkering of a few functions.

--------------------

The download features:
-Akumayos Particle Engine Bulk File

Ã,  Ã, -Effects Demo Game (Uses V1.0)
Ã,  Ã,  Ã,  -Demo game of effects (.exe)

Ã,  Ã, -Effects Editor Demo (Uses V1.0)
Ã,  Ã,  Ã,  -A nice little editor that lets you create and test effects without having to code them (.exe)

Ã,  Ã, -Akumayo's Particle Engine Documentation, a help file containing information about all the functions that come in the module, and how to use them together to make effects (.rtf)

Ã,  Ã, -Effects Demo Sourcecode (Uses V1.0), the sourcecode of the Effects Demo game.Ã,  This will allow the user to view the way the effects in the demo were generated.

Ã,  Ã, -Akumayo's Particle Engine V1.5(.scm) The module itself.

--------------------

User Experience Recommended:
-Basic understanding of the RawDraw commands, especially RawSaveScreen()
-Basic understanding of how the sprite manager works

Advanced User Experience Recommended:
-Understanding of how the module works, by reading the comments within it

Download Here (2.7 Mb when unzipped) Contains all the stuff listed above

(Mirrors removed because the last upload was slightly corrupted, this has been repaired in the download above)

--------------------

I hope you enjoy it!

-Regards, Akumayo
#30
First, the technical stuff...

Here are the rules:
1. Must be open-source. We can hardly inspect your coding if we can't see it.
2. Must contain instructions for how to add to an existing game; this will obviously be easier if the scripting is done as a module.
3. Only use of the 3D, TCP/IP and maths plugins are allowed.
4. Must provide sample game using your code.
5. Team efforts are allowed, and you're probably expected to get help for sprites, etc from elsewhere.
6. As far as possible, entries will be judged on their scripting and gameplay rather than GFX, SFX, music, etc.
7. Winner will be decided by 1 week of voting at the end.
8.Ã,  Please add your entry to the wiki page upon entry.

Right then, now down to the good stuff.

We've already had a comp for turn based battle... but not everyone likes turn based, some people I know hate it... so...

This biweekly's topic:
Real-Time Battle

I want to see real-time battle systems, like in Legend of Zelda, even like in Mario/Sonic, just some type of battle in which the player and enemy do not have to take turns attacking, but can attack at the same time and dodge each other's attacks, such as in old space-style shooters, etc.

So, do your research and planning, build your system, and let's have at it!

Good luck to all participants (yes, I DO expect participants...Ã,  :P)Ã,  There will be trophies for 1st, 2nd, and 3rd, assuming of course, that at least three people enter...

-"Nerezza Acqua" Akumayo
#31
Firstly,

NAGer - Not someone who nags a lot, but rather, a Non-Adventure-Gamer.Ã,  One who makes, or prefers to make, non-adventure games from time to time.

At the needs of a few people in the RPG thread from Beginner's Tech Ques, I have created a small resource (forum based) for all the NAGers in the AGS community.

If you have a module or template that you think would be useful in a non-adventure game (such as a battle-system, first person shooter template, platform engine, etc) then feel free to post it and its information in the "Contributions" section.

If you are currently working on, or have completed a non-adventure game, and would like comments/critic, etc on it, or just want others to see a new approach at using AGS, then post the link to the developement/release topic in the "Links to Non-Adventure Games you've completed/are working on" section.

Last and least, if you have any ideas at all on how to improve the NAG forums, then please drop a line in the "Suggestions" section.

So, if your interested at all in making non-adventure games, or just have something to share with your fellow NAGers, feel free to come by and join up.  When you release your templates/modules, keep in mind that you don't have to make them open source, even though we'd like you to, no pressure.


NAG Forums


-Regards, Akumayo
#32
I have the following if statement:
Code: ags

if (inventory[player.ActiveInventory].ID == GetGameParameter(GP_NUMINVITEMS,0,0,0)) {


However, even though I've called for the item's ID number, I still get the error:
Quote
Type mismatch: cannot convert 'Inventory Item*' to 'int'

Is inventory[player.ActiveInventory].ID not an int?
#33
"Good day pilot.Ã,  We need your skill now more than ever.Ã,  The Crrle have returned."

------------------------------------------

Progress:

Graphics:Ã,  100%
Music:Ã,  0%Ã,  (If you're interested in helping out, PM me)
Sound:Ã,  100%
Story: 100%
Coding:Ã,  95%Ã,  (I'm sure there's at least 5% worth of bugs still to be fixed)

Overall Progress:Ã,  79%

------------------------------------------

ChangeList for last updates:

*From Beta .085 to Beta 1.0
Ã,  -Three new levels
Ã,  -Three new ships (Class A & S) unlockable
Ã,  -Created menu screen
Ã,  -Fixed some errors with the forcefield positioning
Ã,  -Fixed some bugs that came about because of massive asteroids moving about
Ã,  -Added sound effects
Ã,  -Fixed a slew of typos (thanks to Colxfile)
Ã,  -Various other little bugs fixed

*From Beta .07 to Beta .085
Ã,  -Four new levels in the Incendium-Feuer system
Ã,  -Three new ships (Class B) unlockable
Ã,  -Added a forcefield around your ship to determine how many times you can be hit before being destroyed
Ã,  -All things in space now move about, making the levels far more dynamic and challenging
Ã,  -Added a status bar of sorts that tells how much power your forcefield has left, and how many seconds you have (if the level uses a timer)
Ã,  -Some scripting inconveniences dealt with

*From Beta .06 to Beta .07
Ã,  -Mouse and Arrow Key ship placement
Ã,  -Explosions upon ship destruction (via my Particle Engine)

*From Beta .02 to Beta .06:
Ã,  -Four new unlockable ships
Ã,  -Four new playable levels
Ã,  -Updated menu colors
Ã,  -Updated menu graphics
Ã,  -New Temporary menu with save/load
Ã,  -Giant asteroids

*From Beta-Beta to Beta .02:
Ã,  -Level and Ship select GUI's
Ã,  -Four playable levels [Mirk System]
Ã,  -Some scripting flaws corrected

------------------------------------------

Screenshots:







------------------------------------------

Download:

Click the link below, then find the link "Reutrn_of_the_Crrlee..>", and click that to begin the download.
http://geocities.com/oyamuka/

------------------------------------------

Please comment/make suggestions here.Ã,  Thank you for your time, and I hope you enjoy!

-Regards, Akumayo
#34
I have the following line of code in my repeatedly_excecute:

Code: ags

if (Hotspot.GetAtScreenXY(character.x, character.y) == hotspot[talktocheck_ak]) {


talktocheck_ak is a variable, I have already ensured that it is set to a number 1-29, so it doesn't violate the hotspot numbers.
The following error is generated for the above line of code:

Quote
'[' expected

What have I done wrong?

Thank you for your time - Akumayo
#35
I'm too lazy to capture any screen shots, deal with it.Ã,  So I'm posting this here, instead of in the Games In Production thread.Ã,  Let's face it, I'm never going to make an Adventure game.Ã,  It's just not in meÃ,  ;D.

This version features:

-A ship to pilot
-Guns to shoot with
-Stuff to shoot at
-More stuff to shoot at
-More stuff to shoot at
(what more could an arcade need?  ;D)
-Stuff to dodge
-More stuff to dodge
-A short synopsis of what's going on, and the controls
-No sound (There's no air in space, therfore there is no sound, so I don't have to make sound effectsÃ,  ;) ... yet)

I hope you play it and find it at least mildly enjoyable.Ã,  I would highly appreciate any comments or ideas you have for it to be posted here.

Download:
http://www.2dadventure.com/ags/space_battle_alpha_alpha.zip

-Regards, Glacies Akumayo
#36
I'm having a problem with the 'if' an 'else if' operators.Ã,  Here's the code:

Code: ags

if (cIronf.Transparency == 0) {
Ã,  Ã,  score ++;
Ã,  Ã,  cIronf.Transparency = 33;
Ã,  }
Ã,  else if (cIronf.Transparency == 33) {
Ã,  Ã,  score ++;
Ã,  Ã,  cIronf.Transparency = 66;
Ã,  }
Ã,  else if (cIronf.Transparency == 66) {
Ã,  Ã,  score ++;
Ã,  Ã,  cIronf.ChangeRoom(-1);
Ã,  }


The problem is that the first time the script is run, cIronf's transparency is set to 33, but after that when the interaction is run, nothing happens.Ã,  Why is this?Ã,  How do I fix it?
#37
Can someone translate this for me, please, I'd really appreciate it, as I can't translate it at all:

"Nous avons également une banque de smileys que vous pourrez mettre dans vos messages sous forme d'un code qui se transformera en image dès que le texte sera posté !
Par exemple :Ã,  Ã,  Ã, :) se transformera en (img)
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, et :lol: se transformera en (img)"

Thank you for your time!
#38
I have the following code in one of my room's repeatedly_excecutes:

Code: ags

if (IsKeyPressed('B')) {
Ã,  if (se_continuous == 1) cBall.ChangeRoom(8);
}
if (IsKeyPressed('C')) {
Ã,  if (se_classic == 1) cBall.ChangeRoom(6);
}
if (IsKeyPressed('D')) {
Ã,  if (one_vert == 1) cBall.ChangeRoom(2);
}
if (IsKeyPressed('E')) {
Ã,  if (two_team_vert == 1) cBall.ChangeRoom(3);
}
if (IsKeyPressed('F')) {
Ã,  if (two_vers_vert == 1) cBall.ChangeRoom(4);
}
if (IsKeyPressed('G')) {
Ã,  if (two_team_full == 1) cBall.ChangeRoom(7);
}
if (IsKeyPressed('H')) cBall.ChangeRoom(10);
}


The problem is, when keys B-G are pressed, the screen fades out, like it's going to take me to the new room, but then stalls or something.Ã,  The screen stays black.Ã,  F9 and other keypresses are disabled.Ã,  Only Alt-X is pressable.Ã,  However, when key H is pressed, the game successfully moves to room 10.Ã,  I can't figure out what might be causing the error.Ã,  I've never run into anything like this before.Ã,  Any ideas?
#39
I present, the half-completed Smash 'Em game.Ã,  It's an arcade game with a concept similar to the Atari: Super Breakout game.Ã,  This version features falling power ups/downs, an array of purchasable mini-games, save/load score (money), two complete board sets (20 boards), instructions for play in-game (the original release had no tutorial), key/mouse interface, and loads of addictive fun!

Progress Report:

Sound/Music:Ã,  0%
Sprites:Ã,  100%
Engine:Ã,  100%
Boardsets:Ã,  20%
Bugs Fixed:Ã,  ??%

NOTICE:Ã,  The "Reflections" board is available in the shop for a mere 150 points, buy it and try it out!Ã,  It adds a lot more complexity to the game.

Updates so far:

Ã,  From Version "C" to Version "D":
Ã,  Ã,  -Perfected key-based interface issues
Ã,  Ã,  -Fixed some bugs surrounding the mini-games
Ã,  Ã,  -Fixed mini-game menu control messages to a more convinient form
Ã,  Ã,  -Fixed some errors with the "Reflections" board, that I hope you all will enjoy

Ã,  From "B" to "C":
Ã,  Ã,  -Arrow keys can be used to move the paddle, as well as 'A' and 'F' (Adventure only)
Ã,  Ã,  -Mouse interface used only in Save and Load dialogues.
Ã,  Ã,  -Key based interface enabled for the shop
Ã,  Ã,  -New board set "Reflections" added (cost 150 points in the shop)
Ã,  Ã,  -Some bugs fixed


Here's the screenshots/download stuff.Ã,  Have a good time with it, and report any bugs/suggestions here please.Ã,  Thank you!





Download (version "D"):
http://www.2dadventure.com/ags/Smash_Em_v0.5_d.zip

-Regards, Akumayo
#40
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?
SMF spam blocked by CleanTalk