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

#121
That seems like a lot of extra work Sasuke... Though if you wanted to use sprites, I'd suggest using a integer that counts down (as discussed in the linked threads) along with something like if (countdown<240) button.NormalGraphic=ONE_SEC_SPRITE;. That'll give you much better control over the timer and the display (sprites or not), rather than trying to use .Animate and hoping it syncs.


~Trent
#122
Quote from: Ghost on Sat 16/05/2009 22:13:14
It should also be added that there is no pre-made functionality for the shotgun using ammo, hurting enemies, the player being able to pick up health packs and ammo packs, and other shooter-related mumbo-jumbo: If you plan to make gunfight an important part of your game, you'll need to script at least the basic stuff.
To add to that, I'd suggest checking out the sticky "Can I make an RPG in AGS?". Your game may not be an RPG, but it's very helpful for making any type of non/hybrid-adventure in AGS.


~Trent
#123
Actually, it'd be better to use the 'when player leaves room' function rather than copying and pasting the function in two multiple other rooms

~Trent
#124
The Flashlight Plugin was Modularized a long time ago by monkey_05_06. Also, it includes a manual that is very easy to understand.

And Khris's suggestion would most likely work the best, in addition to being the simplest.

~Trent
#125
I'll tutor anyone who needs help in scripting. :D I'm good, and love doing it (which is why I hang around the Tech forums so much).


~Trent
#126
Quote from: Cluey on Fri 15/05/2009 18:39:29I've been without internet  for ages in my house, I've been poring over the manual for days and finding little, what should I search for?
Well, you can always just start reading, whether straight through or jumping through 'See Also' links.


For ActiveInventory, you can search 'inv' in the Index and the second item that pops up is 'Inventory Item events'. It says:
Quote from: ManualYou can use the player.ActiveInventory property to distinguish which item they used.
Which links directly to the ActiveInventory property.

Quote from: Cluey on Fri 15/05/2009 18:39:29The page I found on the subject had one = mark.
I take it you mean the Example on the ActiveInventory entry? Well, if you read what it says,
Quote from: ManualGets/sets the character's current active inventory item. Setting it will update the mouse cursor if appropriate.
Quote from: Manualwill make the inventory item iKey active
Both will tell you that the you can set the ActiveInventory, not just getting it (which is its most common usage). Combine that with basic scripting knowledge (look up Operators if you don't know) and you'll know that you use = for setting (and a semi colon) and == for checking (combined with brackets). This is the reason we don't like script kiddies on the forums that say "Give me teh code!!! Dont point me to a supid manual entry, or RTFM!!" because they don't understand the code that's give to them.

Also, if you had run a forum search, the first result of 'parse error' would give you your answer. Not to mention two others in the first 5.


I realize I sound condescending, but the best thing for you is just to start reading (have you seen the Scripting Tutorials?). I don't think you're a n00b, and I'm just trying to help you become better at scripting. (and I'm willing to help anytime)

~Trent
#127
Quote from: Cluey on Fri 15/05/2009 13:29:31There isn't any real documentation on using the use_inv function or the Active Inventory value. So I'm stumped.
Actually, there's plenty. But too many newbies (and n00bs) skip over the manual, ending up in the same questions over and over again.

~Trent
#128
For the hotspot, you'll have to use  hotspot[HOTSPOT_ID] instead of its scriptname, since you can only use those in a room script and you're in a dialog script (unless you used CallRoomScript or such, but that's not worth it)


~Trent
#129
Oops, the region events only work for the player. However, you can use Region.GetAtRoomXY in the rep_exec (if you didn't want to wait for 280 frames, and just wanted it to happen when they got to the region).

The DoOnceOnly is to make sure it only happens once. If you never use Timer1 again, then you're fine. (You have 20 timers available).


Btw-I'm just throwing out other suggestions and ideas, but I do think that Khris's way is the best in this case. Never hurts to learn new functions and ways to use them.

~Trent
#130
QuoteOf course there's isn't one, since it's in the editor API, thus nothing happened, visually.
IIRC, this should jump to other areas in the editor too, not just script lines. But of course, your case is an apparent bug, probably due to the fact that custom Properties pop up in an extra window.


~Trent
#131
Another way (actually, its a very specific rep_exec) is to use a region around the points 37, 353. (That is, if I'm understanding your script correctly). Then create a region's while_standing or walk_on function and put your code there.

QuoteIsTimerExpired() will return true only once, then false again, so you don't need to worry about the code being executed more than once.
Unless you reset the timer, so it probably wouldn't hurt to toss a DoOnceOnly in there too. (unless your certain you won't use timers again in your game/room)

~Trent
#132
I threw one of my projects in there and it compiled and played fine. But since I don't have any speech or sound files, I couldn't exactly play with the new functionality. Though I did read the manual entries on AudioClip and AudioChannel and I am excited. (those were the only new additions to the manual, right?)


~Trent
#133
Actually, he had an extra { above the second if statement, and was missing the one at the end (although it's probably in his script and forgot to c&p it over to the forum).

But Sephiroth is right, indenting and formatting your code 'correctly' (cause their's not one way to do it, but there are messy ways) will help make it easier to debug, and to share your code with others.


~Trent
#134
This would probably only be needed if you displayed your speech in a different way than .Say or .Display. But even then, if you had something like Button.Animate you'd most likely be using full sprites.

And, they're not that big.

~Trent
#135
I'd like to join with Khris's suggestion in the last thread like this: Add to the tutorial!

Even densming only recently touched on it IIRC, but that's 30-something vids in.


~Trent
#136
I have two possible ideas, but who knows if I'll get around to them..

Also, congratulations Klaus! You've done an excellent with MAGS.


~Trent
#137
Code: ags
if (player.ActiveInventory == iStick) [
  //do stuff
}


[Edit]:NsMn beat me by mere seconds.
~Trent
#138
What's your script look like?

Quote from: Xenogia on Wed 13/05/2009 02:48:25I got it to work by putting Mouse.Mode = eModeWalkTo at the start of each room, bizarre?
Also, did you know you can create an on_event in the global script to handle this instead of having to put the same code in every room (unless you already have it set up globally)

~Trent
#139
Technically, the module's manual is right in the header, so his acronym still works.

But I do like DAFFS, or maybe STFF to keep in the same rhythm?
[Edit]: Or maybe FITF (Find [it] In The Forum)?


~Trent
#140
If the object is only interactable by the owner, shouldn't that be under an else or else if statement?


~Trent
SMF spam blocked by CleanTalk