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

#1721
Quote
If there's anything else that anyone is keen to have in terms of float support, now's the time to speak.
Just did  overflow and undeflow test.  Both conditions handled perfectly, as far as I could tell.   Nice work  ;)

Quote
Yeah, it would be nice to have them all working like that. I propose to add hotspot and region objectisation for the next beta and then call it a day, again unless anyone has good reasoning to do anything else.
Great!  I suppose you are leaving out Walkable and Walk Behind Areas because they have no interactions and so very few functions that do anyting with them?  Future possibilites come to mind though, particularily with regard to Set/Get property type stuff (not the custom property thingy of course).   Leaving this to the future, I think, works for most of us. 

Oh, will regions be geting script-o names or how will they  be handled?   

Quote
Basically, this will be aimed at people who are currently using 2.62 but haven't been looking at this beta thread. Let me know if there are any errors or omissions, or any further detail you think should be added.
How about adding a section called GOTCHAS

New Keywords/Reserved Words
A number of new keywords have been added in this version of AGS.  If any of these are used as variable, function, or parameter names in a game you are upgrading it is very likely you will get compile errors.  Change your names to something else and recompile.  Here is a list of keywords/reserved words
  • object
  • attribute
  • etc

    Using '==' with Floating Point Numbers
    The likely hood of any two floating point numbers being exactly equal is extremely low.  Comparing two floats using the '==' operator  may not produce the results you expect.  Try checking for a range instead.




#1722
Quote
Well, I'm still unconvinced of the need. What do other people think; is it worth objectising the hotspot/region/etc functions? (eg.  hotspot[3].Disable  rather than  DisableHotspot(3)  ) or should they just be left alone?
I would be for it, especially if we would also be able to use script names/pointers as we are with objects, characters, and GUIs; i.e.  hMySpot.Disable();.  Seems like they should all work the same way. 

#1723
Metapad Text Editor - http://liquidninja.com/metapad/
Metapad is a small, fast (and completely free) text editor for Windows 9x/NT/XP with similar features to Microsoft Notepad but with many extra (and rather useful) features. It was designed to completely replace Notepad since it includes all of Notepad's features and much, much more.  Most notably, it seamlessly supports both dos and unix text files and also does spell checking via GNU Aspell (see below).

GNU Aspell Spell Checkerhttp://aspell.sourceforge.net/
GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell. It can either be used as a library or as an independent spell checker. Its main feature is that it does a superior job of suggesting possible replacements for a misspelled word than just about any other spell checker out there for the English language. Unlike Ispell, Aspell can also easily check documents in UTF-8 without having to use a special dictionary. Aspell will also do its best to respect the current locale setting. Other advantages over Ispell include support for using multiple dictionaries at once and intelligently handling personal dictionaries when more than one Aspell process is open at once.

Scite Program Editor - http://www.scintilla.org/SciTE.html
SciTE is a SCIntilla based Text Editor. Originally built to demonstrate Scintilla, it has grown to be a generally useful editor with facilities for building and running programs. It is best used for jobs with simple configurations.  SCIntilla is the basis of AGS's script editor.  Scite is an external program editor that has some of the same features as the AGS editor. 

7-Zip - http://www.7-zip.org/
7-Zip is a file archiver with high compression ratio and is free software distributed under the GNU LGPL.   The main features of 7-Zip are as follows:
  • High compression ratio in new 7z format with LZMA compression
  • 7-Zip is free software distributed under the GNU LGPL
  • Supported formats: 7z, ZIP, CAB, RAR, ARJ, GZIP, BZIP2, Z, TAR, CPIO, RPM and DEB
  • For ZIP and GZIP formats 7-Zip provides compression ratio that is 2-10 % better than ratio provided by PKZip and WinZip
  • Self-extracting capability for 7z format
  • Integration with Windows Shell
  • Powerful File Manager
  • Powerful command line version
  • Plugin for FAR Manager
  • Localizations for 50 languages
#1724
Someone may find the following prgrams handy.   Metapad is a great little text editor that works with both unix and dos text files.   Aspell is a handy spell checker for plain text files.  Dictionary files are available in several languages.  Metapad and Aspell can be used together or Aspell vcan be used alone.  Anyway both are free.  Anyone interested can find them at the addresses below.

#1725
How big is the background sprite?  I believe that  it must larger than the size of the text box as it is not tiled as is done in html browsers.
#1726
Idea:  Could the room id numbers be enumerated constants so that you could use either the room name or the room number? 

So instead of this: 
character[EGO].ChangeRoom(0, 100, 50);

You would something like this:     
character[EGO].ChangeRoom(eIntro, 100, 50);
#1727
Bernie is right about the interactions.  Let me explain about them further.

AGS is what is called "event driven".  The player does something like clicking the mouse on something on the screen or pressing a key on the keyboard.   The interaction editor allows you to assign actions that are executed in response to such events.  The reason he compiler complained about your current code is that FadeIn() was not within the bounds of a function.  If it's not within the bounds of a function it won't get executed.  So you need to use the interaction editor to create interaction functions (sometimes called event handlers).

One of the options the interaction editor provides is "Run Script".   For each of the rooms setup the "Player Enters After Fadin" interaction to "Run Script".   Now when you edit the Room Script you will see an empty function that will be exeuted whenever the player enters the room.   So you would have the following scripts in the three in your example. 

Room-1 Script
#sectionstart room_a  // DO NOT EDIT OR REMOVE THIS LINE
function room_a() {
   // script for room: Player enters screen (after fadein)
   Wait(60);
   ChngeRoom(3);  
}
#sectionend room_a  // DO NOT EDIT OR REMOVE THIS LINE

Room-2 Script

#sectionstart room_a  // DO NOT EDIT OR REMOVE THIS LINE
function room_a() {
   // script for room: Player enters screen (after fadein)
   Wait(60);
   Display("Finished Intro"):
}
#sectionend room_a  // DO NOT EDIT OR REMOVE THIS LINE


Room-3 Script
#sectionstart room_a  // DO NOT EDIT OR REMOVE THIS LINE
function room_a() {
   // script for room: Player enters screen (after fadein)
   Wait(60);
   ChangeRoom(2);  
}
#sectionend room_a  // DO NOT EDIT OR REMOVE THIS LINE


For the FadeIn/Out goto GameSettings->Room Transistion Style and select  the FadeIn/Out option.  Or if you prefer to play around with this in the script select the Instant option as Bernie suggests.

Hope this helps.  Cheers ...
#1728
Thanks khrismuc.   A while back I spent quite a lot of time trying to figure out get the Z-axis right in a perspective drawing.  I got as far as the "triangle/equal distance" thingy but could never figure out how to translate an x or y distance into a z distance. 

I am still a little confused about the relationship between the top view and 3d viewport as far as some of the inital conditons are concerned.  Probably a bit more comentary and what-if's would be helpful.     
#1729
Read carefully and understand Strazer's last post and you will find the knowledge you seek.


"mystrings Blah[150]; // 2D array, width 30, height 5: Blah[30][5]" - Strazer


#1730
Quote
I really don't want to rename the old objects to something else -- that would cause no end of confusion. We do need some way to make it distinct -- perhaps have another word (totally unlike "object") for the script OO objects.
Previously, in this thread, I have used "oobject"  and "object" to make the distinction.   I don't think I could make the case that "oobject" is totally unlike "object" though. ;)   

So instead why not just call them "structures" instead of "objects".  I know that those of us with C or C++ experience will find this suggestion unpleaseant (I do as well.).    However, if we can put our prejudice aside for a moment, IMHO, we may be able to see some merit in this idea.  I think most of the folks will find it easy to make the connetion between "struct" and "structure"  and will be untroubled by the terminology.    Those of us who who have enough programmng experience to not like it should, by definition,  have enough programming experience to get over it. 
#1731
Quote
..  would it be possible to allow import and export individual GUIs rather than always havign to load and save the whole set of GUIs.
I second SSH's suggestion as long as there was an "ALL" option.   I think this would be helpful to some people.

#1732
Gilbot: Thanks for the correction.  I totally missed the blocking argument.   He can still try using the Wait()s for testing purposes to see what is actually happening.

poc301: Gilbot is right.  The blocking argument to the Animate...() function returns control to the engine so tha animation can be run.  When the animation is complete the script continues it's execution. 
 
#1733
General Discussion / Re: Please help
Fri 24/12/2004 07:46:28
This part of the forum is pretty much reserved for questions regarding AGS programming, etc...  so Turbo C is not really in the scope of this forum.  The General topics forum would have been a better bet. 

Since I personally refuse to use XP I am probably not the best person to answer your question but I'll give it a shot anyway.   The first question to ask yourself is "What has changed since just before TC quit working?  Have you installed any other hardware or software or changed your profile or something?   Try uninstalling whatever was installed in the period.  Try to uninstall TC and then re-install it again.  Be sure to backup your programs in a different directory tree so that the uninstall doesn't delete your work.   Lastly open a dos window or command line window and run TC from the command line.   Hope this helps cheers.   
#1734
The problem is that each the AnimateCharacterEx() statements only make a request to the engine to do so, and the requests are not queued.   So when you execute a series of AnimateCharacter() statements, on the same character only the last one will actually do anything.   You could try something like the following to see what I mean:
Code: ags

:
:
if (GetGlobalInt(9) == 2){ //Attack
   AnimateCharacterEx(0, 8, 3, 0, 0, 1);
   Wait(200);
   AnimateCharacterEx(9, 15, 1, 0, 0, 1);
   Wait(200);
   AnimateCharacterEx(9, 14, 1, 0, 0, 1);
   Wait(200);
   AnimateCharacterEx(9, 0, 1, 0,0,0);
   Wait(200);
   dmg=Random(5);
}  //CLOSE ATTACK BRACKET
:


A similar thing happens when you use the while statement.  Since your script hasn't completed it's execution and returned to the engine the character hasn't yet started to animate, and consequently your while condition is never met.

#1735
Here are a few possible keywords for the "readonlyexternal" thingie,

  • readonly, readonlyext
  • readext  or readexternal
  • readpub or readpublic
  • writeprotected
  • protectedw
#1736
You might try making the char[]s 201+ bytes as below:
Quote
char name[201]; // Name of the character
char title[201]; // Character's job title

I bet other elements in your struct are zero as well when this problem occurs.
#1737
Kinoko, the reason the "if (sit == 0)"  block is never executed is that when sit==1 it is incremented to a value of 2 before y ou check it.  If you move the "sit++" line to the end of the "if else" block, as shown below, it should work the way you expect.

Code: ags

   if (sit == 0) {
         MoveOverlay(damoverid[it],character[damchar[it]].x,character[damchar[it]].y-30);
         sit++;
   }
   else if (sit>0) {
         if (sit == 1) MoveOverlay(damoverid[it],character[damchar[it]].x,character[damchar[it]].y-30);
         else if (sit == 5) MoveOverlay(damoverid[it],character[damchar[it]].x,character[damchar[it]].y-29);
         else if (sit == 10) MoveOverlay(damoverid[it],character[damchar[it]].x,character[damchar[it]].y-27);
         else if (sit == 15) MoveOverlay(damoverid[it],character[damchar[it]].x,character[damchar[it]].y-25);
         else if (sit == 20) MoveOverlay(damoverid[it],character[damchar[it]].x,character[damchar[it]].y-20);
         else if (sit == 25) MoveOverlay(damoverid[it],character[damchar[it]].x,character[damchar[it]].y-15);         else if (it == 35) MoveOverlay(damoverid[it],character[damchar[it]].x-10,character[damchar[it]].y-10);
         else if (sit == 30) MoveOverlay(damoverid[it],character[damchar[it]].x,character[damchar[it]].y-10);
         else if (sit == 35) MoveOverlay(damoverid[it],character[damchar[it]].x,character[damchar[it]].y-5);
         else if (sit == 40) MoveOverlay(damoverid[it],character[damchar[it]].x,character[damchar[it]].y+3);
         else if (sit == 45) MoveOverlay(damoverid[it],character[damchar[it]].x,character[damchar[it]].y+12);
         else if (sit == 50) MoveOverlay(damoverid[it],character[damchar[it]].x,character[damchar[it]].y+20);
         else if (sit == 55) MoveOverlay(damoverid[it],character[damchar[it]].x,character[damchar[it]].y+15);
         else if (sit == 60) MoveOverlay(damoverid[it],character[damchar[it]].x,character[damchar[it]].y+13);
         else if (sit == 65) MoveOverlay(damoverid[it],character[damchar[it]].x,character[damchar[it]].y+14);
         else if (sit == 70) MoveOverlay(damoverid[it],character[damchar[it]].x,character[damchar[it]].y+17);
         else if (sit == 75) MoveOverlay(damoverid[it],character[damchar[it]].x,character[damchar[it]].y+20);
         sit++;
   }

#1738
Quote
... maybe I can find someone to turn whatever comments I turn out this time into REAL comments...
I can do some of that for you.  We should just mske it part of a review process.  That way I'll understand what you are doing and will have an opportunity comment.   We seem to be getting along so far ...  ;D
 
#1739
I'll second the recomendation for the Firefox browser.   I would also use the companion e-mail client Thunderbird.  Both are open source and excellent.   You can also replace  MS office with OpenOffice.org, another excellent open source software, if you wish. 
#1740
Quote
"More actions than modes" never happens, because only the MODE_USE is ever called.
OK, so you then have the "Use" interaction function with a series of if Said()s? 

Quote
Now that the latest beta is off, I'm converting the whole thing to this new system, plus fixing a coupla bugs and adding ....
If you need any help with the object stuff or want me to look at something jusyt let me know..

Quote
After that, I'll implement the things in this thread, starting with COMMENTING the darn thing.
One tip about generating comments, I prefer doing it at the same time I am producing code.  I find that it is less burdensome this way and often contributes to the coding process by being a kind of mini-design document and keeping me out of trouble.
SMF spam blocked by CleanTalk