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

#2621
As you've discovered RunDialog commands aren't actually executed until the end of the script (why, I have no idea, but someone else can probably tell you*). You need to split your commands across 2 run scripts - one containing anim 1 and the RunDialog and the second containing anim2.

* Possibly this page.
#2622
Try the AGS: Can I Make an RPG with AGS? thread for some pointers, in particular CoolBlue-Gord10's tutorial looks like a comprehensive place to start. If you have any specific questions ask back but, as you know, a lot of the specifics will depend on how you choose to go.
#2623
I noticed the same bugs as Hollowman.
Also, I didn't like the way the phone worked. The delay before dialing didn't seem long enough - it seemed like, if I paused at all between digits, it dialed the 'invalid number' and I had to start again. Maybe it could take num pad input as well?
Also also:
Spoiler

50 years in the place, and no one's ever looked under the rug? Do they never dust?
[close]

Other than those (tiny, piddling) things, another great BJ adventure. I'm torn between wanting to wait longer, for you to develop a full-length episode, and wanting the next one A.S.A.P., however long.

Rui:
Do you mean "Rose Red" (Steven King haunted house thing)? "Rose Madder" is another SK story, but I don't remember it being anything like BJ4. (I'm not trying to be funny - if I'm wrong I'll have to go back and re-read it.)
#2624
That might be a problem, yes. However - your NPC says things on a timer, right? (like every 30 seconds, or every minute, IIRC).

I think that, if you have the player say something, and set the font before that, it'll clear the background speech off the screen before displaying the new speech. It'd be a problem if you want the NPC speech to still be visible, but since it's just background stuff, it (hopefully) shouldn't be that big a deal.

EDIT: As I (kind of) said, it's probably be easier to write a function to change fonts for you, and you could write one for DisplaySpeechBackground too.
#2625
Have you enabled 'Handle inventory clicks in script' on the General settings?
#2626
1.
Try just setting the character position before the fadein, then animating him after. E.g.:
Code: ags

#sectionstart room_a  // DO NOT EDIT OR REMOVE THIS LINE
function room_a() {
  // script for room: Player enters screen (before fadein)
  int edpos = Random (2);
  if (edpos == 0 {
    character[EDWARD].x = 40;
    character[EDWARD].y = 140;
  }
  else if (edpos == 1) {
    character[EDWARD].x = 110;
    character[EDWARD].y = 100;
  }
  else if (edpos == 0 {
    character[EDWARD].x = 208;
    character[EDWARD].y = 100;
  }
}
#sectionend room_a  // DO NOT EDIT OR REMOVE THIS LINE

#sectionstart room_b  // DO NOT EDIT OR REMOVE THIS LINE
function room_b() {
  // script for room: Player enters screen (after fadein)
  AnimateCharacter(EDWARD,0,0,1);
}
#sectionend room_b  // DO NOT EDIT OR REMOVE THIS LINE


2.
There's an easier way: On the 'General settings' window, change 'Speech style' to 'Sierra-style' or 'Siera-style w/ background'
#2627
You probably know SetSpeechFont (font), but that changes all characters to that font. If you want different characters to have different fonts, you need to call SetSpeechFont (font) before they speak (and again after to set it back). Of course, you could create a function to do this automaticaly.
#2628
It might be that the SetActiveInv (-1); is being called before the interaction has processed. Try adding a Wait(1);, e.g.

else if (character[EGO].activeinv > -1) {
  RunInventoryInteraction (game.activeinventory(or what it is called), MODE_USEINV);
  Wait (1);
  SetActiveInv(-1);
}

Alternatively, try adding the SetActiveInv (-1); to the end of the 'use inventory on this item' interactions, e.g.

  // script for inventory1: Use inventory on this item
  if (character[EGO].active inv == 2) {
    Display ("You used item 2!");
  }
  else if (character[EGO].active inv == 3) {
    Display ("Why would I want to use item 3?");
  }
  SetActiveInv (-1);


You'd have to do this for every item though, so it's probably a last resort.
#2629
Where have you put the second bit of code?
What is/isn't it doing?(i.e. is it running the interaction but not changing the cursor, is it doing nothing, etc.)
#2630
Any chance you could post what the problem was, and how you solved it? In case anyone else has the same problem in the future. (Also, I'm a nosey git curious.)

EDIT: Ah, right. It's just that, from your later posts, I'd thought it was something other than the popup modal thing.
#2631
Quote from: Anon. on Fri 04/03/2005 22:53:54
need people to tell me EXACTLY what to do

Do you know how tempting that is?
I'm faily sure this is all in the manual, whcih you really should've read. Anyway, to reiterate:
If you want to set a Global Int, use set-globalint GI VAL, e.g.:

option 1 clicked
EGO: Hello
set-globalint 1 2

If you want to use an int you created yourself, you need to use run-script x and dialog_request which is explained in the BFAQ. Note how the words "in the BFAQ" are actually a link, taking you to the place in the BFAQ that explains run-script x and dialog_request. It also explains creating your own variables. That's about as detailed as I can get, without knowing what variable you want to change.
Ah, what the heck:

option 1 clicked
EGO: Hello
run-script 1

Then, insert this somewhere in the global script (unless it already exists):
Code: ags

function dialog_request(int param) {
  if (param==1) {
    Variable1 = 2;
  }
}
#2632
General Discussion / Re: 3D animations
Fri 04/03/2005 17:46:11
No, AGS doesn't support 'real' 3D objects/characters, and I don't think it's likely to any time soon.

Also, this question is in the wrong forum - it's not AGS related, it's graphics program related.
Do a search for 3D graphics programs, either here on the forums, or Google, or whatever. This thread might help, but I think it's mostly 2D stuff.
#2633
Reading back through this thread, the question seems to have become "How do I get my inventory working?" rather than "How do I make a GUI not pause the game?"

To answer that question, you need to give us more informaton:

What, exactly, is wrong?
You say "mouse y iconbar not working well with long inventory" and "I can't use inventory on inventory..." What do you mean by these?

What have you tried?
You say you found a workaround, which still didn't quite work. Show us the script you used, we might be able to help.
#2634
The rep_ex (Repeatedly Execute) of the room the walkable area is in, NOT the global rep_ex, that would cause weirdness.

I think the code would be something like:
Code: ags

if (GetWalkableAreaAt (player.x - GetViewportX (), player.y - GetViewportY ()) == 1) {
  if (GetGlobalInt (5)-1 == player.view) { //
    if (GetGlobalInt (5) == SHOEVIEW) ChangeCharacterView (EGO, 11); // if they're in shoes, set to view 11
    else if (GetGlobalInt (5) == BOOTVIEW) ChangeCharacterView (EGO, 12); // or view 12 if in boots
    //(change SHOEVIEW and BOOTVIEW to the right numbers)
  }
}
else if ((GetWalkableAreaAt (player.x - GetViewportX (), player.y - GetViewportY ()) != 1) && (GetGlobalInt (5)-1 != player.view)) ChangeCharacterView (EGO, GetGlobalInt (5));
//else set the to default view


#2635
I don't think that's what was wanted...

Do you mean that you have Walkable 1 set to change the character's view (e.g with
Change player view while on this area:), but you want it to change to a different view based on what the existing view is (i.e. if they're wearing boots or shoes)?

I don't think you can change the value in the 'Change player view while on this area:' box during the game (assuming that's what you're using). I think instead, you'd have to script it in rep_ex. You'll also need a variable to track what the character view should be (or use one of the Global Ints), and set it when you buy the new boots, so the engine knows what view to change back to.
#2636
Change it's visibility setting to 'Normal' instead of 'Popup Modal', and turn it off in game_start
#2637
So, it walks around, but isn't stuck on walkable 1? Odd, works OK for me.

I suppose this should do it:
Code: ags

if (character[FRA].walking == 0) {
  int walk x = Random (141) + 20; // since 140 would give a maximum of 159, not 160
  int walky =  Random (31) +  200;
  MoveCharacter (FRA, walkx, walky);
}

But that's basically the simple way I originally posted.
#2638
I don't understand. What do you mean by "or in specific x,y cordinates"?
Couldn't you just include those cordinates in walkable area 1?
#2639
strazer:
I realised that after I'd typed it, but it didn't seem worth changing for one specific room. If it needed to be more generic then, yes, that would be the best way.

YotamElal:
Does it work with out the limits?
(i.e change int walkx=Random (156) + 104;  to int walkx = Random (game.room_width);, and  int walky=Random (40) + 198;  to int walky = Random (game.room_height);)
Depending on how your room is set up, it's possible those values never return as on Walkable Area 1. The limits aren't really needed, as the if (GetWalkableAreaAt (abswalkx, abswalky) == 1) stops FRA from moving if the co-ords are out of bounds.
#2640
Try putting this in the rep_ex of the room:
Code: ags

if (character[NPC].walking == 0) {
  int walkx = Random (320);
  int walky = Random (240); // or 200, depending on what resolution you're using
  if (GetWalkableAreaAt (walkx, walky) == 1) MoveCharacter (NPC, walkx, walky);
}


EDIT:
Or not.
Since GetWalkableAreaAt uses screen co-ordinates, this won't work too well (if at all) in scrolling rooms. For that, you'd need to track the absolute (room) co-ords versus the screen co-ords:
Code: ags

if (character[NPC].walking == 0) {
  int walkx = Random (ROOMWIDTH);
  int walky = Random (ROOMHEIGHT);
  int abswalkx;
  int abswalky;
  if (walkx >= GetViewportX ()) abswalkx = (walkx - GetViewportX ());
  else abswalkx = -(GetViewportX () - walkx);
  if (walky >= GetViewportX ()) abswalky = (walky - GetViewportY ());
  else abswalky = -(GetViewportY () - walky);
  if (GetWalkableAreaAt (abswalkx, abswalky) == 1) MoveCharacter (NPC, walkx, walky);
}
SMF spam blocked by CleanTalk