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 - Trent R

#381
I think the best thing would be to read manuals. There are AGS awards for the best Documentation, I'd check those out too.

[Edit]: AGS Awards Wiki page


~Trent
#382
Don't forget AGDI Ghost!

~Trent
#384
I was going to suggest a lot of what m0ds has said: movie script. It's a format that can very easily be adapted to games, especially if it's a very linear game. I was looking for a site that had a really good guide for beginner's but it is sadly down.

~Trent
PS- Eejit's Guide to Film-Making, if anyone's interested. I've loved it in the past, so I'll be watching for it to come back up.
#385
Yeah, and I'm just pointing out that there are other ways to do it. Sometimes, it won't work with an extender.


~Trent
#386
Or tell her to join the forums :D

~Trent
#387
General Discussion / Re: Watchmen Film
Fri 06/03/2009 20:21:18
I'm way excited for it. My bro introduced me to Watchmen a couple years back, and I've been waiting to see it since I saw the first trailer (on an IMAX screen no less!). I don't feel like I have any expectations of it--good or bad--so I'm sure I'll enjoy it no matter what.

~Trent
#388
Quote from: bspeers on Fri 06/03/2009 13:02:11
All you've done is rephrased my question.
Did you read my edit? I basiaclly said what Khris wrote code of, but as Rick says, that probably won't work.

QuoteI'm trying to figure out... without putting an individual script in each room.
That's what the on_call does.... ::)

QuoteThere is no documented "did something print on the screen" check that I am aware of, at least as far as I am aware.
I think you'd have to write your own Display/Say function. You could try dynamically resizing a GUI and print to a Label, or using Overlays is another option.

Hopefully this post isn't as nearly a waste of time and space as its predecessor.  :D
~Trent
#389
Without an extender function, you could still use either an int (along with the character[] array) or a pointer.
Code: ags
function Scale (Character* toScale, float factor)
function Scale (int charID, float factor)



~Trent
#390
I wish there was a String.Split function. But you can't really do that without foreach or List<String>. For AGS as it is now, you'd have to store them into String[], which should be doable.


~Trent
#391
General Discussion / Re: Anika's Odyssey
Fri 06/03/2009 19:28:47
Really good game.

Did any of you guys find any of the extra interactions?
Spoiler
Scratch hairy man.
Faster rolling rock (after enough times)
Cuddle w/ Bunny
Kiss mountain man
Goat in back after credits (not an interaction, but an extra nonetheless)
[close]

~Trent
#392
Loving the game so far, but I wanted to post some bugs I found before I forget (cause I almost forgot the first one, despite it being such a short game).

1) When you save on the stones on the pipe island, the get reactivated when you restore your game.
2) If you activate the door after talking to Rochelle, the cutscene starts over--including Rochelle warping to the edge and walking back on screen.


~Trent

Finished it. Loved it. Can't wait to see more.
~Trent
#393
Have you read the manual on callroomscript? It tells you what you need to know. Put function on_call (int value) into your room script. To check if it's been run (acutally, it seems like it gets set if you call on_call at all--so you may way to use another variable in addition) check game.roomscript_finished==1

[Edit]: I realized I misread your question. I'd use the callroomscript as the example in the manual. But inside each if (value==1) set another variable that tells you that a response was printed to the screen. If not, then you can print a generic response.


Note that I haven't used a parser, so I may have gotten some things wrong.
~Trent
#394
Garage's post made me wonder... If there's going to be a new Audio object, will we be able to have pointers to it? (In his case, storing the currently played music into a pointer, then calling it when the pause menu is removed)


~Trent
#395
Quote from: TheMagician on Thu 05/03/2009 23:13:16
QuoteCombine Music and Sound into a single Audio folder
I'd like to see what 'Trent R' suggested: the possibility for subfolders in the audio folder. At least one for music and one for sounds.
But you can prefix your filenames with something like soundBigExplosion.ogg

Like I said before, I haven't used Audio much at this point. But I think your final decisions sound good.


~Trent
#396
There was a recent topic about this, but Scaling is the only way to go I believe. A character.resize would be very low priority since there's other ways to solve your problem (besides, you're being lazy and it'd be better in the long run to do it other ways.)

Few ideas: 1) Right click your sprites, 'Copy sprite to clipboard' then paste into your favorite program. Resize, Ctr-A, Ctrl-C, right click your sprite again, 'Replace sprite from clipboard'

2) Not sure (cause I don't use scaling) but can't you get the Scaling of the walkable area the character is currently on? You could then use this in conjunction with character.Scaling (I think this is what was done in the other thread)


[Edit]: The recent thread I mentioned, http://www.adventuregamestudio.co.uk/yabb/index.php?topic=36553.0. Khris has a cool code in there too, and Gilbot links an old module that he wrote. Both would be good resources.
Also, the command I was thinking of is GetScalingAt



~Trent
#397
Quote from: Iris on Wed 04/03/2009 20:45:04
Quote from: Rahakasvi on Mon 02/03/2009 20:39:51
Maybe a system that tracks time that player uses for solving a puzzle. Like if player has make no real progress for X minutes, suddenly looking some object the character says: "Maybe I could use this as an some kind of wrench?"
The problem with this is that the user may leave the game on and not play it. I sometimes leave the game on for hours or even a whole day and then come back home and play it. I consider myself an above average adventurer and I'd be annoyed if when I continued playing I was swarmed with hints and not given a chance to figure it out for myself. Its still a good idea, I don't know how many people play like I do.

You could use an increasing variable in rep_exec(which also means it won't increase while the game is paused, ie. Guis shown) or try using the DateTime functions.

Either way, if the player doesn't progress in X amount of time--give a hint, but he if doesn't do anything at all for X amount of time (such as just letting the computer sit there) then don't do anything.

Check out DateTime.RawTime and on_event(eEventRestoreGame) in the manual.


~Trent
#398
General Discussion / Re: HOTU is more dead
Thu 05/03/2009 12:07:40
In writing, you're supposed to put 'him' if you don't know the sex. At least, that's how it is over here in America....


~Trent
#399
I'm bad with words, so that was probably a large factor of the low participation. I'm done, so anyone can start up a new one. I'll edit the first post if you PM me, or you can start a new one and the mods will lock this.


~Trent
#400
Been reading through a ton of old threads, and I found this very useful one by monkey. I explains all 'hidden' keywords in AGS.
~Trent
PS-I removed the quotes to better see the code sections. But monkey_05_06 wrote all of this.



static: This keyword refers to a data member or function of a struct that is not called on an instance of a struct, but rather, directly from the struct itself. In the case of data members, only one instance of this member is created no matter how many instances of the struct are implemented.

Code: ags
 struct MyStruct {
  writeprotected int Var; // writeprotected: The user can only read this variable; attempting to modify its value will result in an error. Its value is set by member functions of this struct. See also 'protected'.
  import function SetVar(int value);
  writeprotected static int StaticVar; // won't actually compile (yet), consider using an attribute
  import static function SetStaticVar(int value);
  }

function MyStruct::SetVar(int value) {
  if (value < 0) return;
  this.Var = value;
  }

static function MyStruct::SetStaticVar(int value) {
  if (value < 0) return;
  MyStruct.StaticVar = value; // since there is no instance of the struct, there is no "this" keyword within static functions
  }

MyStruct MyStructInstance;

// game_start
MyStructInstance.SetVar(18);
Display("Var: %d", MyStructInstance.Var);
MyStruct.SetStaticVar(409);                            // note the static function and member
Display("StaticVar: %d", MyStruct.StaticVar); // are called on the struct, not an instance


void: This is a special keyword used only as the return type of a function that returns nothing. These functions are intended simply to carry out a task; no result is returned from the function whatsoever.

Code: ags
void myfunc(int var) {
  if (var < -1093) return; // the return keyword is used by itself to return manually from a function with a void return type as nothing is being returned
  // do stuff
  }


protected: This keyword refers to a data member or member function of a struct that can only be accessed within another member function of the same struct.

Code: ags
struct MyStruct {
  protected int __data__;
  protected import void set_data(int value);
  import void do_something(int value);
  };

protected void MyStruct::set_data(int value) {
  // this function is non-essential, the data could be set directly from the do_something function, this is just an example
  this.__data__ = value;
  }

void MyStruct::do_something(int value) {
  if (value < 0) return;
  this.set_data(value);
  }

// game_start
MyStruct msInstance;
msInstance.do_something(83); // sets the data
msInstance.__data__ = 97; // crashes; data is protected; no read/write access outside of member functions
msInstance.set_data(111); // crashes; function is protected; no access outside of member functions


Regarding the use of static and protected together:

Code: ags
struct MyStruct {
  protected import static int ReturnFive();
  import int GetValue();
  import static int GetItStatically();
  };

protected static int MyStruct::ReturnFive() {
  return 5;
  }

int MyStruct::GetValue() {
  return this.ReturnFive(); // protected members/functions can only be accessed using the 'this' keyword. Although the function is static, it is still possible to access it through an instance
  }

static int MyStruct::GetItStatically() {
  // return MyStruct.ReturnFive(); // crashes; cannot access protected function unless using 'this' keyword which doesn't exist within static function
  // in other words, protected static functions/members are ONLY accessible through a non-static function of the same struct using the 'this' keyword
  }


Regarding writeprotected: This keyword works essentially the same as the protected keyword, except the user is given read access (no write access) to the data member. This keyword applies only to data members. To set a writeprotected member, you must use the same rules as when using protected: You can only modify its value within a non-static function of the same struct, using the this keyword.

private: This is NOT an AGS keyword. It is used in other scripting languages such as C++. See protected instead.

attribute: This is not an officially supported keyword. It is used internally for use with the managed types. It is possible for them to be used for a few purposes, however as its use is not supported, there is no guarantee that your scripts will continue to work with future versions of AGS. Due to ...well...more my lack of interest with this post at this point than anything else really... the advance nature of attributes, I'll withhold an example for now.
SMF spam blocked by CleanTalk