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

#541
A suitable alternative would be GameMaker, but in theory, a (SNES) Zelda clone is perfectly possible to create with AGS.
You'd have to do a lot of scripting though since you can't really use much of the built in functionality. There's a TileEngine by abstauber that should diminish the workload a bit.
#542
AFAIK, in the template, a left click on an inv item selects the item as active while a right click triggers the "look at" action.
So to use an item (as opposed to use it with something else), one's supposed to click "Use", then the item. If the item doesn't have that action, it defaults to "Use x with".

All this is intentional and IMO a big improvement over the original games. Why would you want to change that?
Why put the same action on two buttons and require an additional click for one of the most prevalent interactions in the game?

Also, to implement your changes, one has to make the player character clickable, which has the downside of them obstructing small hotspots behind them, something LucasArts has always avoided.

(I know, this post isn't helpful at all considering what you asked, sorry.)
#543
The loops in the view are named, make sure that the down sprites are in the correct loop (0, I believe).
Having said that, if the character is moving at an angle rather horizontal than down, AGS will use the side views.

(Btw, this isn't really concerning the template; it doesn't handle walking differently.)
#544
Which version of AGS are you using? Have you linked the function(s) properly to the character's any click event?
To be clear, does this happen if you start a new default game, using the template with the same name that comes with AGS?
#545
Quote from: Phemar on Wed 13/01/2010 17:52:40
Here's me being pretentious.



Dexter!! :)
#548
With ints, if a is less than b, a/b is always 0.
You need to use

Code: ags
  if (Aaron_health > 0) a_hp.DrawRectangle(0, 0, ((Aaron_health*80)/Aaron_health_max)-1, 4);
#549
bush_monkey, while I appreciate the effort, it should be noted that you're using GlobalInts and even old style code, both of which are long obsolete.
You're also using a variable width font without indentations for the code snippets.

So, while I still do appreciate the work you're putting into this, teaching people unclean, obsolete code might do more harm than good.

I'm always a bit sceptical of the various tutorials floating around here in general since they usually contain small flaws, so don't take my opinion as the one of the forum.
But I think that a text that teaches people how to code an RPG should at least use OO code, with it being around since AGS 2.7 I believe.
#550
You rather sound like you're missing the point of this thread... ;)
#551
It should be noted that this tutorial is really old and wasn't exactly perfect when it was published, either (sorry Gord).
You did a good job of adapting it to current script though. :)

For reference: String.Format returns the first parameter with the following ones inserted. So it is exclusively used to the right of a "=" or as parameter of another function.
#552
There's a function called repeatedly_execute() in the global script that is called 40 times per second (40 is the default value, the current setting can be obtained using GetGameSpeed()).

You'd use a variable to count minutes:

Code: ags
// above rep_ex

int timer, minutes; // declare two variables, intial value is 0

// inside rep_ex

  timer++;
  if (timer == GetGameSpeed()*60) {   // one minute of real-time has passed
    minutes++;  // increase minute counter
    timer = 0;    // reset timer

    if (minutes%20 == 0) SwitchDayNight();  // cull custom function that handles day/night

    if (minutes == 60*4) {  // four hours of real-time have passed
      AdvanceSeason();   // call custom function that advances to next season
      minutes = 0;  // reset minutes
    }
  }
#553
AGS allows up to five background frames for each room; instead of using them for constantly animating the background, you can switch between them, so that's how I'd go about having four seasons in each room.

The best way to accomplish a day-night-cycle depends on how sophisticated you want it to look.
A very easy way is to use a semi-transparent, black (or slightly bluish), non-clickable GUI.

If you want to use different background images for day & night, you have to use two rooms per location (since you'd need 8 background frames then).

The technical side is comparatively easy; each room has a before fadein event, in there you'd check the current season (stored in a global variable), then change the room background accordingly.
#554
I don't see the harm in adding another competition; if nobody's going to participate, it's going to die like the other ones. If people do contribute, we gained a popular competition.

I'm a low-spec fan myself, but I don't see the need to impose that on everybody (other than maybe the fact that people are more likely to participate if there are strict guidelines).
#555
"Check player.ActiveInventory to find out which inventory item was used."

"Your room background flashes like crazy? Delete the second background animation frame."

"Got a question you think nobody has ever asked before like 'How to make the player change rooms?'
Post it right away, using the forum search is overrated anyway."

"Want to create a complex remake of a commercial game without any programming experience? Ask for help in the technical forum, others will gladly post huge working scripts so you don't have to bother learning how to 'program'."

#556
Do:
-write nicely structured, properly indented, commented code
-use fitting variable names

Avoid:
-starting off unless you've got fair programming and AGS experience

On a slightly more serious note:
QFGs battle system is not _that_ hard to emulate, since it's relatively simple and uses real-time.
But it's still going to be a good deal of semi-complex coding.
#557
Here's an actually tested version of the main function:
Code: ags
function ron_gets_hit(int damage) {
  ron_hp -= damage;
  if (ron_hp < 0) ron_hp = 0;
  if (ron_hp > 30) ron_hp = 30;
  ron_gauge = DynamicSprite.Create(30, 15);
  DrawingSurface*ds = ron_gauge.GetDrawingSurface();
  ds.DrawingColor = 16; // black
  ds.DrawRectangle(0, 0, 29, 14);  // clear gauge
  ds.DrawingColor = Game.GetColorFromRGB(0,255,0); // green
  if (ron_hp > 0) ds.DrawRectangle(0, 0, ron_hp-1, 14); // draw health        only draw health if > 0
  ds.Release(); // end drawing
  btnHealth.NormalGraphic = ron_gauge.Graphic;
}


Apart from some minor coordinate correction, the main fix is the line used to create the new sprite; I didn't assign a properly sized sprite to the button in the editor (and neither did you, I assume), and thus the sprite was too small and had wrong colors (my guess is AGS used the blue cup sprite 0).
#558
Put the .agt file in AGS's main directory, next to Default.agt and Empty.agt.
Then start AGSEdit, start a new game and select the template.
(If you want to use an old template, try opening it with AGS 2.72 [link further above], then save the game and copy/move the folder to AGS 3.x).
#559
Did you declare ron_hp outside the function?
By putting this above it:
Code: ags
int ron_hp = 30;

#560
He could have anticipated it...
http://www.youtube.com/watch?v=8ZZXslsLDLs
(Not for the faint of heart, pregnant or people with pacemakers ;))
SMF spam blocked by CleanTalk