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

#781
In that case, shouldn't he use on_event(eEventEnterRoomBeforeFadein) and maybe eEventLeaveRoom to destroy it manually and re-initialize it. And then, he can even specify certain rooms where he doesn't want it.

~Trent
#782
Have you tried looking at the Verbcoin template that comes with AGS?

~Trent
#783
I, like most other gamers, don't like these situations.

However, I think if a game does allow such things, you should be EXPLICITLY WARNED. Take QFG1, you can break into the brigands fortress rather soon(if you know how), but you're told multiple times that you need to make a dispel potion. If you don't have the potion when you enter the main section of the fortress, you're in a walking dead.

~Trent
#784
But what if you declared an Overlay pointer in the global script and initialized it in game_start?

~Trent
#785
General Discussion / Re: Woo... 18.
Mon 10/11/2008 12:03:51
Holy crap I'm older than you?! I've been 18 since Jan...
Not to mention that I went into my first casino when I was 7, and I'm Mormon!!


~Trent
(My family likes to vacation to Vegas)
#786
Critics' Lounge / Re: Background c&c
Mon 10/11/2008 12:00:51
Honestly, I'd agree with every single point that Nikolas just made. Quite literally every word.

~Trent
PS-As useless as this post may be, there's nothing else I think I could add. Except for the fact that the poster made me laugh.

[Edit]: Above...
#787
The RemoveTint only needs to be above, if an object isn't under the mouse. If they're next to each other? I personally think that that would be poor design (another form of pixel hunting).


~Trent
#788
Quote from: KhrisMUC on Sun 09/11/2008 23:20:06
Create a custom property, type bool, initial value false, call it "tint".

Then add this to rep_ex:

Code: ags
// this line before rep_ex:
int troom, tobj;

// the following inside
  Object*o = Object.GetAtScreenXY(mouse.x, mouse.y);

  if (o == null) {
    if (troom == player.Room) {
      object[tobj].RemoveTint();
      troom = 0; tobj = 0;
  }
  else {
    if (o.GetProperty("tint")) {
      if (o.ID != tobj) {
        o.Tint(150, 150, 0, 100, 100);
        tobj = o.ID;
        troom = player.Room;
      }
    }
  }

Not tested!
       


I quoted Khris's code, cause your tabbing is messed up. Putting 5 } brackets in a row is not clean code.

But from Khris's, there needs to be one more } on the line before the else. Otherwise, there should be enough.


~Trent
#789
Hahahaha, love 'em both. I like how Matti's has something come back out at the same moment.

~Trent
#790
I always figure that you should design a game based around the interface. If a game has a verbcoin, then you design it for that. If it has the Sierra 5 icons, then you design it for that. If it has a parser, you design it for that.

I think that looking at a bunch of interfaces and saying, "This is the best possible, my games (and all others) should be like this because it's the best" is bull. That's my opinion at least.


~Trent
#791
Search focus- I don't always want to search the same thing, so sometimes F3 is useful, sometimes it's not. But it's minor.

Variable Debugging-OMG I'd love to have this feature. I'd rather forego all other suggestions to implement this. (Including my stupid search request)

Intellisense- When does this get compiled to use? I've tried to figure it out (Save, F5, etc) but so far I'm not seeing a pattern. But I'm also an idiot, so who knows?


~Trent
PS-Your infiniteloop function made me laugh out loud.
#792
Even though the issue solved, I have to ask why use a global variable? Why not "if (player==cJohn)" ?


~Trent
#793
General Discussion / Re: Deluxe Paint II
Sun 09/11/2008 09:23:31
I've never used DP, but I usually find that once I get good enough with a program I can watch tutorials of related programs and figure out the rest myself.

~Trent
#794
Should
Quote- on verbcoin icon release: speak/do action
be - on verbcoin icon release: speak/look/do action ? It's been a while since I've played CMI or any Verbcoin game, so I could be wrong.


~Trent
PS-That was a crappily written post. Hopefully you got what I meant.
#795
Search entries: It keeps 20 entries? I didn't figure that out, I just noticed that it was keeping some of my 'pointless' searches. Thanks for the reply.

Debug Console: Ya it's old, and as soon as Dualnames can upload it I hope to be using the Console2b module instead. But right now I'm coding my battle system and I show the console as an extra tool. It doesn't get in the way for me, so I just leave it there.


~Trent
PS-One thing that annoys me with the new search is that focus priority goes to it when it's visible. I'd like to be able to search, and then click the script and edit it--while leaving the search still open to search for the next thing.
#796
Just saw your reply after making my big edit. What are you running for your function? Can you post the lines of script where the error is? (remember that you can use the [ code] tags (without the space) on the forum like I did above).

~Trent
#797
Except that I think he still might want the walkable areas for the 'player'. I don't see why he can't scratch the Keyboard Movement Module and just put cCam.x or y and increment them using ++ or --. If it's too slow, change it to += and -=


~Trent
#798
This script is assuming you have a GUI with a ListBox named lstMemo. Then, if an npc tells the player they need a flower, run the function AddReminder("Get flower."); This will add the text in quotes to your list box.

You actually don't need an array. But using one will help keep your game organized.


~Trent


I gave this a bit more thought, and I personally would do it all manually. Here's a random untested script that I think would work:

GUI named gReminder.
Label named lblReminder.
Button named btnExitRemind. 30pixels wide, 20pixels high.
Change eFontWhatever to your font of choice.


Code: ags

function ResizeGUI () {
  int txtWidth = GetTextWidth(lblReminder.Text, eFontWhatever);
  int txtHeight = GetTextHeight(lblReminder.Text, eFontWhatever, txtWidth+5);
  gReminder.SetSize(txtWidth+10, txtHeight +40);
  gReminder.Centre();
  lblReminder.Width=txtWidth;
  lblReminder.Height=txtHeight;
  lblReminder.SetPosition(10, 40);
  btnExitRemind.SetPosition( (((txtWidth+10)/2)-15), 10);
}

function AddReminder (String textToAdd) {
  if (lblReminder.Text==null)  lblReminder.Text="";
  lblReminder.Text = lblReminder.Text.Append(textToAdd.Append("["));
  ResizeGUI();
}

function RemoveReminder (String textToRemove) {
  String lookFor = textToRemove.Append("[");
  lblReminder.Text = lblReminder.Text.Replace(lookFor, "");
  ResizeGUI();
}

I'll semi-document it soon. BRB
~Trent



As fun and interesting this code was to write, it's currently broken. The GetTextWidth function doesn't take line breaks '[' into account. I can work around this, but I'm sure there's better ways to do this.

~Trent
#799
I could be wrong, but I believe those still work for upgraded games, and that you can't make that type of global variables.

So yeah, just use the name of the var, just the same as any other.

~Trent
#800
So you declared all of those in the global script and you want access to them in rooms?

Bad way: At the end of the global script, write
export INTNAME
(or at least after the declaration). Then in the global header, write
import int INTNAME


Good way: Make your global variables in the Global variables pane and set an initial value. Then reference them in script by their name.



[Edit]:Are you trying to use GetGlobalInt and SetGlobalInt?

~Trent
SMF spam blocked by CleanTalk