2 sugestions, each one more pathetic than the next. :p

Started by rtf, Sun 06/06/2004 06:08:02

Previous topic - Next topic

rtf

1.  So I was workin on my game a few seconds ago, and my grandparents come up, wanting to check out the source code for "5- O'clock Lock".  So I open it up in the already running AGS editor.  When I'm done, I open up my game again, to find all of my data lost.  So I thought:
  "There should be a "Save the Game?" dialog box when you load up a new one!  :D

2.  One other suggestion.  It can be done with global variables, but I figured I might as well post it here anyway, as I am already asking for something.  Anyway.

 
Code: ags
 if (IsPlayerCharacter[EGO] == 1){
               //yada yada yada...
           }


What do you think about them both?
I fail at art.

Mr Jake

I have a suggestion, but instead of starting a new thread Im just gonna post it here mkay?

Well, in my game everytime the player does an unscripted interaction with an object (such as TALK on a bookcase) if displays a message along the lines of: 'I wont dignify that with an answer'. To do this I cannot find any way other than using a global int to check if the interaction was scripted. This is all fine but I have to remember to put this in each interaction. Would it be possible to have 'Any Non-scripted Click on Hotspot/Object'. This isnt urgent, but would be nice to cut down on the repeated if (GetGlobalInt () == *){ etc.

strazer

2.

function IsPlayerCharacter(int charid) {
  if (GetPlayerCharacter() == charid) return 1;
  else return 0;
}

or

if (GetPlayerCharacter() == EGO) {
  // yada yada yada...
}

Wolfgang Abenteuer

Quote from: Hotspot on Sun 06/06/2004 08:19:11
I have a suggestion, but instead of starting a new thread Im just gonna post it here mkay?

Well, in my game everytime the player does an unscripted interaction with an object (such as TALK on a bookcase) if displays a message along the lines of: 'I wont dignify that with an answer'. To do this I cannot find any way other than using a global int to check if the interaction was scripted. This is all fine but I have to remember to put this in each interaction. Would it be possible to have 'Any Non-scripted Click on Hotspot/Object'. This isnt urgent, but would be nice to cut down on the repeated if (GetGlobalInt () == *){ etc.

Have you tried using unhandled_event?  Just set it up once in your global script and it's set for the rest of your entire game.  Quite a handy thing.  Or are you thinking of something else?

~Wolfgang

strazer

Hotspot:

function unhandled_event (int what, int type) {
  if (what == 2) { // objects
    if (type == 2) { // talk to
      DisplaySpeech(EGO, "I won't dignify that with an answer.");
    }
  }
}

Check the manual for unhandled_event.

rtf

Thanks for the code, Strazar.  I will be using it.  :)
I fail at art.

Mr Jake

unhandled event??

lol, didnt notice that :D

*feels stupid*

SMF spam blocked by CleanTalk