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

#2701
Am I missing something, or should all the code after #sectionend interface_click  // DO NOT EDIT OR REMOVE THIS LINE (if (interface == 3) { ..... } and if (interface == 4) { ..... } be in interface_click? As it is, it's not actually attached to any function, which may be why it's an 'unexpected if' error.
#2702
Ah, I see, and I may have misunderstood the problem as well. Do you mean when it calls dialog 1 the second dialog, it just says it without you having to click anything, then goes back to the first dialog?
If so, that's perfectly normal behaviour for dialogs with only one option. The only way round it would be to add another.
And the second question: Do you mean you then don't want the player to get the second dialog, if thaey ask the question a second time?
If so, try (I'll put it here so you don't have to reply just to say yes or no):

dialog 0:// dialog script file
@S  // dialog startup entry point
guard: Oh good, your awake.
return
@1  // option 1
guard: My names John. I'm a security guard here at the club.
return
@2  // option 2
guard: Were in the basement of the club right now. Do you remember anything from before?
christian: No I just woke up a second ago in that little room. How did I get in there?
guard: You were upstairs before with some of your friends I guess when these two men approached you.
guard: Now I was standing around at the time talking to a friend of mine but I started to notice them acting a bit strange to you, like you knew them and they were there to kill you or something.
guard: I dunno. All I do know is a few seconds after they approached you one of them grabbed the back of your jacket and dragged you through the crowd and down the stairs to this hallway.
guard: When I saw that I followed them down here. It took me a minute to get through the crowd but on my way down the stairs they were heading up. When I got to the backroom you were sprawled out on the floor unconcious.
christian: Holy shit...
guard: Yeah man...so I've just been standing around here waiting for you to wake up.
christian: Thanks a lot. I appreciate it.
guard: No problem
@3 // option 3
guard: Not really. They were distant the entire time and when they passed me on the stairs it was really quick and I didn't even realize they just passed by for a second or two. By that time they were gone.
christian: I see.
option-off 3
return
@4  // option 4
guard: Anytime man.
stop
#2703
What wasn't precise about JBurger's code? I've created a little 'test game' to show you how to put it into effect. Look at the room script (Ctrl-E, or the '{}' button), and the repeatedly execute script (also visible in the room script):
http://www.geocities.com/whoismonkey/AGS/Time.zip
For the moment, it's limited to while the player's in one room (as that's all I did), but you'd just need to move the int declaration into the Global script, and the rep_ex script into the global rep-ex to make it follow you around the game.
#2704
What if you change goto-dialog 1 to goto-dialog 2, since that's the different dialog? (Calling dialog 1 from dialog 1 wouldn't do anything, after all.)
And, why are dialogs 0 and 1 the same anyway?
#2705
See, now you're moving away from what I know, and from what you're really meant to ask here, like Scummbuddy said, but:

a) Depends, basicly go with what you feel most comfortable with. Personally, I use Paint Shop Pro (but not very well). Try THIS THREAD for other ideas.

b) Same as above - if you're a musician, or just have a microphone, you can easily make your own sounds, but it's up to you. There are plenty of free sound site on the 'net, though - just use Google.

c) Use the 'Scaling' function of the Walkable Areas, as Scummy said. Specificly, 'Continuous Scaling' will give the 'smaller with distance' effect.

d) (Totally wrong forum, but...)Half my family support Liverpool, the other half Everton. I'm one of the (seemingly) small handfull of people in Liverpool that honestly couldn't care less either way.
#2706
 think the GUI thing was just an example of something he's tried to do.
Let me see if I've got this:
You want to have speech displayed as if coming from a radio (like subtitles for the song / announcer that's playing), and you want what's displayed to change with time, but you want it to be non-blocking?

If so:
For a non-blocking equivilant to Wait() see this thread: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=18027.0 (I actually think it was your question then, as well.) Just remember to declare the variable in the room or global script (depending on whether you want it to measure time across the whole game, or just in one room), and NOT in rep-ex. Basicly a variable is added to in the background, and events are triggered when it reaches certain points.
For a non-blocking way to display speech - look up DisplaySpeechBackground(). Of course, this means you'll have to use a character as the radio, but I think it's the best way to do it. You might also want to look up CreateTextOverlay and related functions. If these fail, then of course using a transparent GUI remains a possibility.
#2707
As I understand it, SetCharacterViewOffset() acts in the same way as setting a hotspot point for the character, so would that be of any more use? Presumably you'd still need the same "moment-to-moment scripting control of all movement", unless you mean setting a hotspot for each individual frame. Also, what resolution are you using? 15 pixels of blank space seems a lot for a step.

Anyway, I don't think there's a way to directly get the character's scaling, but you can use:
GetScalingAt (character[CHAR].x, character[CHAR].y)
Which returns the scaling at the point the character is standing, which is the same thing.
#2708
Yay! Two entrants within a day, that aren't me, Radiant, Edwin Xie or JudgeDeadd. I'd say that was a minor triumph.

DragonRose:
Well, yes but, looking at the ones you linked: Scuthbert's original (doesn't that sound like the name of a sweet?) was virtually a mirror of this one. Rather, this is virtually a mirror of that - deliberately so, since it was, as you said one of the most popular and interesting, which I was trying to recapture. However, if you look at it, it basicly says "You're trapped outside a house. Get in," and gives a few inventory items. Redwall give a nice little set up as to why you're trapped, but basicly says "You're trapped in a temple. Get out," and gives some items to use.

Since I couldn't think of any items that didn't have a fairly obvious use, I left them out - so as not to restrict how the 'player' thought. That's what I meant when I said "Too resrictive = no interest" - refering specificly to the last 5 or 6 (my last one included, I admit), where you were given an idea of where you were, and idea of what you had to do, but also some odd limits on how you had to do it.
In summary: "A detailed set-up is fine, but after that the restrictions should come from the surroundings, and the 'player' themselves, and not be imposed by whoever set the problem", is more what I meant, than "It should be as vague as possible", which is what I actually did here, I admit.
Anyway, as I said above, I got two 'new' people to enter, compared to the last few, to there must be something to it.
BTW: I just read a post on b3ta.com about losing a tasty lunch to some security guard, written by 'dragonrose', who likes old school Sierra games. Is it you, or a large (and quite scary) coincidence?

Oh, and thank you both for entering!
#2709
I think SetCharacterBaseline() only affects how the character deals with things like objects and walkbehinds, not where it's walk-to point is. Also, I think it's in absolute, room-based units, not relative to the character - i.e. SetCharacterBaseline(EGO,15); will set the baseline to 15 pixels from the top of the screen, not 15 pixels up on the sprite.

Look up SetCharacterViewOffset. I think that's more what you want, just change the y-offset value accordingly.
#2710
Click the 'Script' link on the menu bar (as in 'File   Game   Script   Help') , and select 'Edit Global Script'. Ctrl-G works too.
#2711
Rules:
Every couple of weeks, a post will be made with a list of items and a scenario. Using your wit and skill find a way to complete the scenario with the items provided. You can only use a set number of items of your own choice. When I say use your skill, use it.

Voting:
Yeah, I guess. After the deadline, you'll have about a day to vote. Most votes == Winner.

The Grand Prize:
That inner feeling of smugness and self-satisfaction that comes from being told you're better than your peers. And, I don't know, a picture of some kittens or something.

Scenario:
As I said a while ago, I think one of the reasons Puzzle Time has been dropping off lately is that they've been overly restrictive. Mind you, I didn't think Radiant's last one was, and that still didn't get many entries.

Regardless, have this (nearly) restriction-free Puzzle Time:
TRAPPED IN A HOUSE.

You're trapped. In a house. Why, how you got there, and whose house it is, is up to you, just get out of there. You can have a number of small items in your pockets (e.g. money, keys, credit cards, a penknife), and as many other inventory items or background items and rooms as you want.

One thing: Everything you use must be realistic for the room you're in, even if the way you use them isn't.
For example, you couldn't have a Nuclear Reactor in someone's spare bedroom, even if they are a Mad Scientist, or a hand grenade in your back pocket (even if you are). But, you could MacGuyver up some plastic explosive in the bathroom using shampoo, shaving foam and bleach. Although, you'd best not, 'cause it was my idea.

Another thing: I know it's mentioned up there in the Rules, but Be creative. I want to see something slightly more complex than 'KICK DOWN door' or 'THROW LAMP through WINDOW'.

I was going to make this last 2 weeks, but then I realised I'm going away for Christmas on the 18th, and wouldn't be able to finish it up. So, it'll last about a week and a half, ending just in time for me to bugger off until the New Year.

Deadline: 15th December.

Good luck to all!
#2712
"Error: A text script run in the Player Enters Screen event caused the screen to be updated. If you need to use wait (), do so in After Fadein"

Well, are you sure you've put the commands in 'Player enters screen (AFTER fadein)'? There's another option - 'Player enters screen (BEFORE fadein)' - which usually generates that error. Make sure it's not that before we go any further.

And secondly, just make the room wider than the screen (e.g. make it 640 by 240, if your resolution is set to 320 by 240, or 1280 by 480 if you're using 640 by 480). Now, the room view (the 'Camera' if you like) will follow your character when it moves off screen - the 'panning' effect you wanted.
#2713
1) Import the images into AGS.
2) Put them into a view, so they animate as you want them to.
3) Assign that view to the character. Go to the 'Character' window, and change the 'Normal View' to the number of the view you just created.
4) Read the manual, and the Beginners FAQ. This is explained in more detail in one of them, I'm sure.
#2714
So I won? Yay!
Thanks to everyone who voted, congrats to the losers other entrants.
Look for the next installment of Puzzle Time later today.
#2715
Hello again!
1) You're right, it's done with variables. To use the barrier example from before:

- Use inventory on object
      - Conditional - If inventory item was used (1)
           - Conditional - If variable is set to a certain value (barrier, 0)
           The barriet is closed, so open it.
               Game - set variable value (barrier, 1)
               Run script (RestoreWalkableArea(2); )
               (Add a command to animate the barrier object opening)
               Stop running more commands
               As 'barrier' is now now set to 1, this line stops the next bit running until you click again.
           - Conditional - If variable is set to a certain value (barrier, 1)
           The barrier is open, so close it.
               Game - set variable value (barrier, 0)
               Run script (RemoveWalkableArea(2); )
               (Add a command to animate the barrier object closing)

Have another try for yourself, but if you really can't get variables to work, it's possible I didn't explain properly, or you're doing something wrong - is it possible for you upload your game somewhere, so I can see what's happening? If you don't have anywhere to upload to, zip it up and e-mail to me (my address is in my profile, just click on my name to get it.).

2) There are 2 ways to do this - one using rooms, the other objects. Both use the 'Game - pause command processor for a time' command, to make the game walt for a number of gameloops. By default, there are 40 loops per second (thhis changes a bit based on game resolution, colour depth, etc, and speed of the computer, but it's usually around this), so 5 seconds = 5 x 40 = 200 loops.
To use rooms, you'd do something like:

Set up the room 1 (the 'Lucas Arts' screen), and select the 'Hide player character' option on the 'Setings' window. Add these commands:

- Player enters screen (after fadein)
     Game - pause command processor for a time (200)
     Player - Go to a different room (2)

Set up room 2 ('presents'). Again, hide the character, and add:

- Player enters screen (after fadein)
     Game - pause command processor for a time (200)
     Player - Go to a different room (3)
Keep doing that, until you've finished the intro, and reach the menu screen.

To use objects, you'd just have the one room, and use the 'Object - Start an object animating' command to run loops of the text fading in and out :

- Player enters screen (after fadein)
     Game - pause command processor for a time (200)
     Object - Start an object animating (0, 3, TRUE)
     Game - pause command processor for a time (200)
     Object - Start an object animating (0, 4, TRUE)
     Game - pause command processor for a time (200)
     Object - Start an object animating (0, 5, TRUE)
      and so on...

Wher views 3, 4, 5, etc show the stages of the into (Lucas Arts logo, 'presents', game title, anything ele you want to show.)
If you just want the text to appear and disappear, you could set all but object 0 not to be initially visible, and use 'Object - Remove an object from the room' and 'Object - Switch an object back on':

- Player enters screen (after fadein)
     Game - pause command processor for a time (200)
     Object - Remove an object from the room (0)
     Object - Switch an object back on (1)
     Game - pause command processor for a time (200)
     Object - Remove an object from the room (1)
     Object - Switch an object back on (2)
      and so on...
#2716
Using the 'barrier' variable is sort of optional - as you found out it can work just as well without it. All it does is check whether or not the barrier has been open, so you don't have to use the key every time you pass it. If you want the player to have to use the key every time, or if they'll never go back to that screen, you can just leave it out.

Anyway, a little explanation:

- Use inventory on object
Ã,  - Conditional - If inventory item was used (1)
Ã,  This line means it only works if the 'Key' item is used.
Ã,  Ã,  Ã, - Conditional - If variable is set to a certain value (barrier, 0)
Ã,  Ã,  This line means it only works if the barrier is locked, so (for example) you don't get the unlocking response everytime you use the Key, even if the barrier is already open.
Ã,  Ã,  Ã,  Ã, Game - set variable value (barrier, 1)
Ã,  Ã,  Ã,  Ã, This line sets the barrier variable to open, so this script won't be run again.
       As you figured out, the last two lines can be missedout, and it still works fine.

Ã,  Ã,  Ã,  Ã, Run script (RestoreWalkableArea (2); )
Ã,  Ã,  Ã,  Ã, This line turns on the walkable area.

But I think, if you've got it working in a way you're happy with, you should stick with that for now. Leave the more 'professional' ways until you feel more comfortable with AGS, and understand what you're doing more, rather than just making things 'like a robot', as you said, simply copying out the commands someone on the forums gave you.
#2717
Odd, it works for me.
It might be that having 2 Ypos GUIs is confusing the engine, which is why only one works right.

How do you mean, the buttons don't do what they're supposed to? Have they 'swapped' functions (e.g. the Look button closes it, and the OK button changes the mode), or are they just not doing anything?
#2718
Make the road beyond the barrier a second walkable area that is initially turned off, then turn it back on when you use the key on the barrier.

Unfortunately, it doesn't look like you can turn walkable areas on and off in the Interaction Editor, so you'll need to do some basic scripting.

1) Turn the walkable area off. Open the Room interaction list ('Room Editor', 'Settings' window, red 'I' button). Select 'Player enters screen (before fadein)' and add an interaction Conditional - If variable is set to a certain value. Create a variable that will deal with whether or not the barrier is open (I'm going to call it 'barrier'). Choose 'barrier' as the variable, and 0 as the value. In this condition, add a 'Run script' command. Click 'Edit Script' and add this:
Code: ags

RemoveWalkableArea (2);

(I'mm using walkable area 1 as in front of the barrier, and walkable area 2 as behind it.)
Exit the script editor,  and save changes.

2) Set up the Barrier object to respond when you use the key on it. Use these interactions:

    - Use inventory on object
      - Conditional - If inventory item was used (1)
        - Conditional - If variable is set to a certain value (barrier, 0)
          Game - set variable value (barrier, 1)
          Run script
          (Add a command to animate the barrier object, or remove it from the screen)
         
Edit the 'Run script' command, and set it to:
Code: ags

RestoreWalkableArea (2);



That should do it, but ask back if it looks like I've missed anything out, or if it just doesn't work.
#2719
OK, I see - you're using the default GUI, you've just changed it to Ypos?
In that case - the OK button does run GUIOff() in script, without you having to do anything.
You need to:
Open up the script editor. Click 'Script' on the menu bar, and choose 'interface_click' from the drop-down list. This is the bit of the script that deals with clicks on the GUIs. Find the line that says something like:
Code: ags

if (interface == INVENTORY) {

(Might be slightly different, if you've renamed the GUI, for example)
Scroll down a bit more, until you find the bit that deals with the OK button:
Code: ags

if (button == 3) {
      // They pressed the OK button, close the GUI
      GUIOff (INVENTORY);
      SetDefaultCursor();
    }

and add the GUIOn command:
Code: ags

if (button == 3) {
      // They pressed the OK button, close the GUI
      GUIOff (INVENTORY);
      GUIOn (INVENTORY);
      SetDefaultCursor();
    }




I'm not quite sure what your second question means - ICONBAR is Ypos by default, so I don't see how you've changed it to that. What is the 'Popup Ypos' set to?
#2720
Fawful, try:
1) Go to the 'Prisioner of Ice' download page, here:
http://www.the-underdogs.org/downloadfile.php?file=games/p/prisonerice/files/prisonerice.zip&id=1395

2) Scroll about halfway down, until you see a blue banner, with a picture of a dog in a space helmet, and a 5 digit code.

3) Type the code into the text box a couple of lines down, and hit the purple 'GO' button. Remember, the code is case-sesitive - XXXXX is not the same as xxxxx.

4) If that doesn't work, try typing the code into the second text box.

If it still doesn't work, it might be something else with the way your system is set up, sorry.
SMF spam blocked by CleanTalk