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 - Ashen

#2721
If you haven't used it, don't bother, it's probably not the problem I thought it was.

What did you mean by "when i close it", then? How have you set up your Inventory GUI (especially if you haven't gotten into the script)?
#2722
Critics' Lounge / Re: Drawing hands: Help!
Fri 03/12/2004 15:50:31
Characters aren't my strong point either, but ... One thing that stands out to me is that the hands (in the second frame) look like they're pointing the wrong way - the palms should be facing inwards, not outwards, with the thumbs pointing up and out, rather than down and out. A little thing, but it doesn't look quite natural as is, to me at least.
You might also want to raise them a little, making the bend in his arm more obvious. As it is, it might look like he's flapping them at his waist, instead of gesturing, as I assume he is.
Just a couple of thoughts.

EDIT:
Ah, I see. Makes more sense now, but I still say you need to bend the arms a bit more - it looks very uncomfortable to have the palms that far round, that close into his waist, if you get me. Maybe try adding a slight 'hunch' to the shoulders, to raise the arms slightly without having to over-bend them?
#2723
When you say you 'close' it, do you mean with a GUIOff() command? (Or equivilent, if you're using the Interaction Editor)

If so, that might be your problem right there - as far as I know, doing that will disable Ypos GUIs so they don't pop up again, rather than just turn them off temporarily. Try leaving that command out - surely it will close on it's own when you move the cursor off it, anyway.

Alternatively, or if that's not practical, change the 'off button' script to turn the GUI off, then right back on again (e.g GUIOff (INV); GUIOn (INV);). This should close the inventory - and move your cursor so it won't turn it back on - but leave the GUI able to be opened when you move the cursor back to the Ypos.

If you didn't mean you used the GUIOff () command or equivilent, just ignore me.
#2724
You use the Use inventory on... interaction like you guessed, but you set it in the thing you're using the item on (e.g. the flower), not in the Inventory Item (e.g. the Key).

So, to use your example:

1) Open up the Interaction list for the flower object. ('Room Editor' section, 'Objects' window. Select the right object and click the 'Ineractions' button).

2) Select 'Use inventory on object' and add an interaction - Conditional - If inventory item was used. Set the item to the number of the Key inventory item (1, if you're just using the default items).

3) Under that condition, add whatever you want to happen when you use the Key. So, you might have something that looks like:

  - Object 0 (flower)
    Look at object
    Interact object
    Talk to object
    - Use inventory on object
      - Conditional - If inventory item was used (1)
        Character - Move character (EGO, 4, 160, TRUE)
        Game - Display Message (2)
        Character - Quick animation (EGO, 2,0,3)
    Any click on object
    Pick up object
    Usermode1 object
    Usermode2 object

And that's about it. It's pretty much the same for using inventory items on Hotspots (like the tree in your example), Characters (to give the item to someone else), or even other Inventory items.


Oh, and a couple of links you might find useful:
http://www.garage.co.nr/ - Portugese translation of the manual (might be a bit better for you than the English version?)

http://adan.iefactory.com/foros/viewforum.php?f=9 - An AGS forum in Spanish.
#2725
I vote for JudgeDeadd, because it feeds my distrust of people with overly shiny shoes.

And it's not a flaw, so much as ... well, OK it's a flaw. The original version was about twice as long, but I cut a lot out which is why you can send the poor Guest to his stoney doom. I'm kind of tempted, however, to re-write the full version (which I deleted, for some bloody stupid reason), and make a short game out of it. What does anyone else think?
#2726
So, are we voting?
#2727
Well, without more details as to what you have done, these are the first things that come to mind:
1) Have you set Move Character to affect the right character?
2) Have you set it to use the right inventory item?
3) Have you set the interaction in the right character?
4) Is there a walkable area for her to move to? Is she on it to start with?
#2728
Advanced Technical Forum / Re: Money Manager
Thu 02/12/2004 13:18:14
To break it down a little:
'money += Random (100) + location_value'

money is a variable you create to store how much money the character has
+= is scripting for 'add the following amount to that variable'
Random (100) generates a number between 0 and 100
location_value is another variable you create, representing the minimum amount you'd get at the present location.

So, if location_value was 25, each time you successfully begged you'd add between 25 and 125 (cents, pence, simolians,

whatever) to your total worth (saved as money).

Obviously, you'll need a more complicated equation if you want to take into account appearance, begging message, etc. (For that, I'd suggest you have a limited number of options, rather than give the player completely free choice - for ease of programming if nothing else. Perhaps add a thing that different messages work better in different places, or at different times, if you want it to play a more significant role.)

To handle buying things, the simplest way would probably be to have a SHOPKEERER (or DEALER) character, with their inventory

representing their stock. Then you'd have to switch player character to them, open the inventory and browse their wares.
You also need to compare the money variable to the cost of the item:
Code: ags

if (money >= COST) { // If the money you have is greater than the cost of the thing. (COST is replaced by a number)
  AddInventory (ITEM); // Get ITEM, whatever you just bought
  money -= COST; // Lose that much money. Again, COST is replaced by a number
  // And you might want to add a message saying 'You bought the ITEM', or 'Will there be anything else', or something
}
else { // money is less than COST - you can't afford it
  Display ("You can't afford that just now.")
}


Selling stuff is easier, you just use:
Code: ags

money += COST;
karma -= KARMACOST; // To lower karma on drug deals. Obviously not necessary in a pawnbroker.


Sorry if this is a bit vague about how/where exactly to put this stuff, but that really depends on how you set up the game. If you need more specific help later on, just ask.
#2730
Odd, the background in the 'Import Sprite' dialog appears pink for me.
Anyway, it's not quite the answer you were after, but:
Try organising your sprites a little better, within the image. As it is, some of them are really tightly bunched up, and some are quite far apart, which might cause trouble with selecting them, anyway. Then, add a border around them, to make finding their edges easier, like this:

(Remember, the top-left corner should be the transparent colour.)
#2731
The Idle view doesn't start until the character has been idle (standing around, not moving or talking) for about 20 seconds. Have you waited this long, and it still doesn't work, or do you just want it to start immediately? If you wait and it still doesn't start, you've got a totally different problem.

Otherwise (if you just want the MERCHANT to move as soon as you enter the screen):
1) If you're using the Interaction Editor, open the room's interaction menu ('Room Editor' section, 'Settings' window, button marked with a red 'i') and select 'Player enters screen (after fadein)'. Then, add an interction: 'Character - Set idle animation'. Set the character name (MERCHANT, I guess), the View number (2), and the delay (0, so it starts right away). Make sure the character is facing the correct way (you're using loop 0 - down - which is the default, so there shouldn't be a problem.) Test the game.

2) If/when you feel up to using scripting, look up SetCharacterIdle and AnimateCharacterEx. Run one of them (via 'Run script') in 'Player enters screen (after fadein)'. I wouldn't recommend this just yet, however. Get a bit more used to AGS in general before moving on to scripting.

Hope this helps.

EDIT: About animating items. (Sorry, didn't read all of your post at first, just Candle's reply)
You could just make the spider a character, and set an idle view as described above. However characters are limited, and you might want a lot of background animation, so to animate an object, you need to:
1) Create a View for the object animation, in exactly the same way you create a view for a character animation.
2)Place the object in the room, in the right place ('Room Editor' section, 'Objects' window, 'New Object' button)
3) Assign the View to the object ('Player enters screen (before fadein)' then 'Object- Set object view number', or SetObjectView() in script)
4) Start the object animating. 'Object - Start object animating', or AnimateObject/AnimateObjectEx() are the default commands. With a little extra work, you can make the animation behave in different ways - trigger at random times, or change the animation when the player does something, for example - but I won't go into that now. Ask back here for more details if you want to know how.
#2732
Judging from the number of RPGs in development at the moment, you're not the only one.
There were even a couple of entries in the September MAGS that did something similar (CoolBlue-Gord10 and Sinitrena, that I remember). At least, they both had spells inventorys, but handled them a little differently, from what I remember. Might be worth checking them out for inspiration, or just to play.
#2733
Is this just in Sprite Manger, or does it show up in game as well?
#2734
When you import sprites, you have the option of what to use as transparancy - by default, it's the top-left pixel of the image, but you can alter it (I think the options are top-left, top-right, bottom-left, bottom-right and palette slot 0). It shouldn't matter what colour you surround your sprites with, or what the image's tranparent colour is, AGS will take as transparent what you tell it to.

Or have I misunderstood the problem?
What paint program are you using - it should be possible to change the transparency colour in there, before you save the image.
#2735
Just to add to what Radiant said (since I'd already typed this out):
1) What would the message say? Would it just be the name of the object / hotspot?
2) Where do you want it to pop up?

If I'm right about 1), the easiest way is to use a GUI label set to @OVERHOTSPOT@. Provided you set the GUI background & foreground colours to transparent (colour = 0), it will be invisible the rest of the time. Now, if you want the message to always appear at the same place on the screen, just set the GUI co-ordinates and you're good to go. If you want it to move (e.g. to appear above the object/hotspot, or follow the mouse) you'll need to do some scripting - what exactly, depends on what you want to happen.

If I'm wrong about 1) - what should it say?

Either way, if you need more help, you'll have to be more specific about what you want to happen.
#2736
Well, the reason I said those, is -Ã,  with or without NumLock on, my numeric pad always passes as those keys, rather than numbers.

Obviously, it's not worth worrying about if it's only me (or a version issue?), but it seems a shame to get it working as you want it, only to find it doesn't work for other people anyway.

EDIT: Wait, I'm confused here. I was actually making sense? Good God, how did that happen? I barely understood this post.
#2737
According to the ASCII code references in the manual, and my keyboard:
Numpad 1 = End =Ã,  379
Numpad 3 = Pg Dn =Ã,  381
NumPad 7 = Home = 371
Numpad 9 = Pg Up = 373

Any good?

EDIT:
Also (maybe):
2 = Down arrow, 4 = Left arrow, 6 = Right arrow and 8 = Up arrow. 5 stays the same, apparently.
#2738
No problem, that's what I'm here for. Glad you got it sorted.
#2739
Now the code is outside of the repeatedly_execute function, so the engine doesn't know how to deal with it - hence the 'unexpected if' error. Move it back in, so that section of code looks like this:
Code: ags

// main global script file

#sectionstart game_startÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function game_start() {
Ã,  // called when the game starts, before the first room is loaded
}
#sectionend game_startÃ,  // DO NOT EDIT OR REMOVE THIS LINE
// Code was here, for some reason.

#sectionstart repeatedly_executeÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function repeatedly_execute() {
Ã,  // put anything you want to happen every game cycle here
Ã,  if ((character[SIDE_KICK].walking == 0) && (character[SIDE_KICK].loop != 0)) {
Ã,  Ã,  // if SIDE_KICK isn't moveing, and isn't already facing down
Ã,  Ã,  FaceLocation (SIDE_KICK, character[SIDE_KICK].x, character[SIDE_KICK].y + 20);
Ã,  }
}
#sectionend repeatedly_executeÃ,  // DO NOT EDIT OR REMOVE THIS LINE
#2740
OK, I see it. It needs to go before the #sectionend repeatedly_executeÃ,  // DO NOT EDIT OR REMOVE THIS LINE line, like so:
Code: ags

#sectionstart repeatedly_executeÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function repeatedly_execute() {
Ã,  // put anything you want to happen every game cycle here
Ã,  //if ((character[SIDE_KICK].walking == 0) && (character[SIDE_KICK].loop != 0)) {
Ã,  Ã,  // if SIDE_KICK isn't moveing, and isn't already facing down
Ã,  Ã,  //FaceLocation (SIDE_KICK, character[SIDE_KICK].x, character[SIDE_KICK].y + 20);
Ã,  }
} // This one right here.

#sectionend repeatedly_executeÃ,  // DO NOT EDIT OR REMOVE THIS LINE


And don't forget to un-comment the code (remove the //).
For future reference, you could use the 'Match Brace' function in the script editor ('Edit -> Match brace' or 'Ctrl-B') to check for you. I always forget about it though, which is why I didn't mention it earlier.
SMF spam blocked by CleanTalk