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

#301
As much as a PC person I am, I have no idea how to do this. On a mac, you can just hook them up via VGA cable (not really, but I forget what the VGA-for-Mac port is called), and according to Ghost's post, sounds like you can probably do the same with a PC.


~Trent
#302
The Rumpus Room / Re: Happy Birthday Thread!
Sun 05/04/2009 01:10:35
Happy birthday monkey!

You may think you're completely legal... but you still can't rent a car! Muahahaha!


~Trent
#303
For a limited space, a simple way would be to create a Global var in the Global Variables Pane. (I've called it InventoryCount)

Then in your global script, in the on_event function (if it doesn't exist, type it in--this is one of the few functions you are allowed to simply type in) add the following.
Code: ags
function on_event (EventType event, int data) { //like I said, if you already have it...
  if (event==eEventAddInventory) {
    if (InventoryCount>=10) { //if you want a limit of 10
      player.InventoryQuantity[inv[data]]--; //this is in case you've reached the limit, it manually removes it
      return;
    }
    else InventoryCount++;
  }
}
  if (event==eEventLoseInventory) {
    InventoryCount--;
  }
}


If you read the manual entry of InventoryQuantity, it tells you that you should use AddInventory and LoseInventory, which you should. InventoryQuantity doesn't call the on_event, which is what you need to keep the limit. Therefore, if you need to add large amounts of Inventory (though I don't see why), you would need to use a while loop.


That should work. Another way would be to keep track of an InventoryItem array (I did that in my unreleased RingInv module, which replaces the normal InvWindow control into a SOM style Ring). But it is more complex, so only if you have a good reason.

~Trent
#304
You're going to need to study and read the code in on_mouse_click, and repeatedly_execute.

Also, you'll want to check out the manual entries for Game.GetLocationType, Game.GetLocationName. Oh, and probably read up on 'Handle inventory clicks' (here and here)

Maybe even look at SSH's Description module?


~Trent
PS-Sorry this is such a RTFM post. I'm a tad busy at the moment, I may come back and type up some more.
#305
Zumi, look up 5 posts.

~Trent
#306
Quote from: The Ivy on Sat 04/04/2009 05:25:49
@Trent, that's actually one of the more normal cursors we had in our game concept. My favourite one was a background image of an incredibly nervous-looking dude and a cursor that was a pair of lips. The task was, "Make the first move!"
Haha, so will we see a demo of an AGS adaption anytime soon?

Erin's First Time? :=


~Trent
#307
Either of them would work. Input box is probably the easiest, but I like a custom Gui the best (cause then it'll fit in with the rest of your game more easily--unless none of that is customized)

The manual entry tells you exactly what you need to know. Game.InputBox returns a string, so, do something like this, along with a region (how you do 'on a certain spot' types of code):
Code: ags

//at the top of the script, outside any function
bool riddlecorrect=false;
String input;

//under the region code (walk onto)
Display("What is 6*7?"); //or whatever the riddle is
input=Game.InputBox("");


//under the room's rep_exec
if (input.CompareTo("42")==0) { //CompareTo will make it so it isn't case sensitive, but read the notes below
  riddlecorrect=true;
  input=null;
  //whatever happens when the riddle is correct, whether moving an object, changeroom, etc
}


Note: This code is untested, and incomplete. You'll want to add a check underneath the region code one whether or not it's been answered, otherwise you'll get an input box everytime you walk onto it. Or you could disable it(region.Enabled=false;) You'll also want to try to account for different types of answers (depending on the riddle). I tried to accomadate slightly for this by using the String.CompareTo, but you may have to take it further.



Of course, someone smarter will probably come along soon and show a better way.  :D
~Trent
#308
$1, is that the Konami code I see written one there? :D


~Trent
#309
Yay for Ivy! Although not was you may have expected for GDC exposure*, that is awesome to win for such short prep time.
*pun not intended.

Garage, that Danish article is the first one I've seen with a picture from the comp. Must say that I love the mouse cursor.


~Trent
#310
General Discussion / Re: Mass email hosting
Fri 03/04/2009 19:07:59
I just googled and found a bunch of RSS to Email services... then your subscribers can choose one or the other.


~Trent
#311
As for the lighting, I personally don't like the 'beam effect' of the floor lights. The only time you see light is either the effect of it on the opposite surface, or because of particles in the air.

I have a feeling this location is too clean for there to be enough dust in the air to see the light.


~Trent
#312
Critics' Lounge / Re: Style critique
Fri 03/04/2009 07:29:35
Overall, I think it looks pretty good.
But, since you want a critique--here goes:

-Trees in the BG stand out way to much. 1, they're way darker than anything. 2, you can tell they were copy-pasted over and over.
-Rework some lighting to work more naturally (not meaning natural light...). Like the wall of the staircase, it should not be that dark at all!
-Shadows on other objects look great. It's just the stark, jarring contrast the angers my soul....
-I like the detail in the rocks, and wood grain. Great job on both of those!!
-Really like the foreground frame. I'd suggest doing similar things on other screens, and *maybe* tweaking the lighting(gasp! I bring it up again!) on them. But that's a maybe, see how it looks, cause it looks good enough so far.


~Trent
#313
Critics' Lounge / Re: Carousel Poster
Fri 03/04/2009 07:21:15
I'd like to reiterate that the show dates are confusing, and can be lost. I'd either drop the 2009, or change it to October 16-18 and 23-25, 2009 or maybe October '09, 16-18 and 23-25. Just something to make it more clear than a list of numbers.


~Trent
#314
Lesson to learn: There are tons of ways to solve a scripting/design problem. Some work better than others, some are simpler than others.


~Trent
#315
Depends on your style, but you could always just read through it. Related entires are linked, and many include a small sample script.

There's also two pages of a Scripting tutorial.

And Densming's vids are awesome.



~Trent
#316
Spoiler
Only one I knew was Grundy... I'm so new!
[close]
:'(


~Trent
#317
General Discussion / Re: victims of recession
Thu 02/04/2009 20:41:11
Not that I'm in a dire position like some ppl out there (or here on this board), but I've been trying to find work for the last two months and no one wants to hire a basic high-school graduate.

So yeah, this recession sucks.

~Trent
#318
Can the General Option to use native co-ordinates be set to true on new projects, but false on imported ones?

Perhaps this will over complicate things, but I've noticed a bunch of BTech problems concerning this... Maybe just a mention in the Scripting tutorials in needed.

~Trent
#319
Gah! I totally forgot about that General Option!  :o

I knew someone smarter would come and point out something obvious in this thread....


~Trent
#320
First off, I'm not a moderator. So this comment is just coming from a friendly forum member:
Ever notice the link at the top right of your posts?

Not only just this keep in compliance with the rules, it's easier to edit than to triple post. :)


Second, did you create a hotspot around you oKey object? Did you name it hKey? Do you even know why you made it?


~Trent
SMF spam blocked by CleanTalk