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

#141
Quote from: KhrisMUC on Mon 11/05/2009 13:23:37
I tested both versions and they work fine. It seems I completely forgot that one can declare functions that return pointers though. ;D
And I forgot to add in null checks ;D so a combo of both codes would be best.

Matti, it's great that the RunInteraction works, but you're gonna be doing a lot of duplicate code that way. Best to add a system under on_mouse_click that will work with any character and any item.

~Trent
#142
Well, you could leave it in the script file. It won't really matter if it's sitting there. But if you forget to remove the event (lightning bolt) then you'll get an error when it tries to call the script (whatever it may be)


~Trent
#143
@Joe Carl http://www.wikisend.com/
Temporary upload space (up to 90 days) for up to 100 MB.


~Trent
#144
What happens when you set the Enabled or Clickable properties of the textbox? Granted, those deal with mouse clicks....


~Trent
#145
Check out ClaimEvent in the manual.

Based off of your other thread (which you could've posted this question in, since it's the same topic) you should put a code something like this in your room script:
Code: ags

function on_key_press (eKeyCode keycode) {
  
   if (keycode == eKeySpace) ClaimEvent();
}


(sorry there's not much of an explanation. I'll return later, or just wait for someone else to reply)

~Trent
#146
I just threw a Display(""); call into gamestart, and nothing happened. Apparently you have to display at least a space, but the best way is display the script lines and variables. Until we can view runtime variables while debugging (a feature I want very much, but CJ has said will require rewriting the compiler), String.Format and Display calls will be your best debugging friends. Also, if you just need to know if the lines are firing, (and not care what variables are and such) you can use breakpoints instead. Check out the manual entry 'Debugging features'


~Trent
#147
General Discussion / Re: Twitter
Sun 10/05/2009 01:04:14
I'd much rather follow a blog (which I rarely do). I think it's pretty stupid when the only news about a site like HOTU disappearing is found in 9 words.


~Trent
#148
General Discussion / Re: Lens flare!
Sun 10/05/2009 01:02:37
Neato! Now I'll pass it off as my own, and I'll get tons of comments on my status! (manically laughs)

~Trent
#149
I'd start throwing breakpoints and/or Display checks everywhere and see what is being called and what isn't.


~Trent
#150
Unfortunately, since this is such a huge community of authors--if a game is down it's harder to fix it. But we do have a thread where you can request AGS Games called GAMESEEK - find old/missing adventure games. Perhaps a mod will come by and merge this with that thread anyway.


~Trent
#151
Luckily, there's a manual entry entitled Distributing your game that explains it better than I ever could.

~Trent
#152
Maybe something with GUIControl.AsInvWindow (or whatever the command is). I'll look in the manual and see what I can throw together.

[Edit]: I think this might work, modify as needed. (Like an InvItem extender or such)
Code: ags

Character* ItemOwner() {
  GUIControl *control=GUIControl.GetAtScreenXY(mouse.x, mouse.y);
  return control.AsInvWindow.CharacterToUse;
}



~Trent
#153
Ah, sorry about the wrong parenthesis. That's what happens with you try to write code straight into the reply box (I usually find it easier to open up AGS, cause then I have manual access too). Fixed my previous post.

Why do you have both a Room_BeforeFadeIn() function and a room_load() function? Also, did you link the function with the lightning bolt and the (...) button?


~Trent
PS-You can format code for the forums by putting them inside [ code ] [ /code ] tags (removing the spaces first, of course)
#154
I think there's some glitch in the version of AGS that is available on the website where the acsprset will get huge. IIRC, there was a thread in the Tech Forum not long ago reporting it. I also believe that it's supposed to be fixed in the beta release.

Of course though, betas are usually risky.

[Edit]: You may want to disregard what I've written. I think I may have gotten some things mixed up, but the mentioned thread is found here. And what is mentioned from the beta thread is
Quote* Fixed sprite cache corruption if you had a single sprite larger than 20 MB
So I'm probably wrong... :(


~Trent

#155
As of this posting, the linked thread is only minutes old. But the question was how to change backgrounds from day to night like Quest For Glory. Since this is a stickied thread, I figured I past the link here so it wouldn't be lost--and because it's super relevent to AGS RPGs.
Colour Cycling of day and night


~Trent
PS-Bush_monkey, I've only looked at Part 1 so far, and it looks pretty interesting. However, I'd be careful not to quad-post and start editing your posts. Image
PSS-I'm not a mod, just some friendly advice. :)
#156
Woo-hoo! Nice thread. I've thought about this problem before(for my own QFG-like game), but haven't decided on how to do it.  Very cool Garage!

~Trent
#157
If I understand your question correctly, then the answer is easy.....

Variables!!!!

Lemme see if I got the scenario right: Click on objects in Room1, it zooms in on the to room2, pick up the zoomed objects and they disappear, when you go back to room1 the objects are gone. Right?

I'd suggest using any of Global Variables, Game.DoOnceOnly, and/or player.HasInventory. For example:
Code: ags
//Room2 object interaction
function oZoomMirror_Interact () {
  player.AddInventory(iMirror);
  oZoomMirror.Visible=false;
  if (oZoomVase.Visible==false) ChangeRoom(1); //this will provide the auto changing if you've gotten both items
}

//Room 1 Before Fade-in
function room_load() {
  if (player.PreviousRoom==2 && player.HasInventory(iMirror)) oMirror.Visible=false;
  if (player.PreviousRoom==2 && player.HasInventory(iVase)) oVase.Visible=false;
}


As I was typing the code above, I got some ideas on how (in my opinion) to best do it, and added some other commands. Read the manual entries to understand them (HasInventory, PreviousRoom, Operators, etc)
Also, don't forget that you can't just copy and post the entire code and expect it to work. You have to link the functions via the Events Pane (the lightning bolt)

And lastly, this is just how I would do it. There's plenty of ways to script each problem, and some may work better for you.


~Trent
PS-Welcome to the Forums!!
#158
This looks great! DLing right now, and I'll toss my projects into it tonight.

Quote from: Joe Carl on Thu 07/05/2009 19:05:06
How do I open the "CrashInfo.3.20.1080.dmp" file?
You don't. Upload it to a space and send it to CJ.


~Trent
#159
Dang, that was cool.

~Trent
#160
Quote from: Dualnames on Tue 05/05/2009 11:48:57
Quote from: Nikolas on Sun 03/05/2009 07:45:17
PS.

Woah!
Hannah looks hot!  :o

(not a serious comment by any means!  :=)

She does.

(a not-so serious comment by all means)
Vote #3 for Hot Hannah.


Quote from: Dualnames on Tue 05/05/2009 11:48:57
Quote from: Layabout on Sun 03/05/2009 11:58:01
They need to be shown the path to enlightenment that is 80's films.

Put some Ferris Bueller on the DVD tray then. You better get a head start now Vince. Get them a Viewmaster too.
Don't forget The Breakfast Club, and if you want to censor some of it, it comes on TV all the time.


~Trent
SMF spam blocked by CleanTalk