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

Topics - slufan

#1
Hello Everyone,

It's there posible to have more than a view to do the same action?
I know that AGS have ChangeView() and LockView() functions, but when I try to change the view and use Character.say() AGS always play the standard view defined for Talk.
What I try to do is this.

Say with standard animation                                Say with a second animation                               Say with a third animation
                                                                                                                

Thanks in advance.
#2
Hello (once again)

I'm having any problems with the "If" and "else" statements. I think I'm not using them correctly and I'm going mad. I have this codes:

Code in GlobalScript.asc
Code: ags
 
function cMiniSpider_AnyClick()
{ 
  // WALK TO
  if (UsedAction(eMA_WalkTo)) {
    Go();
  }
  // TALK TO
  else if (UsedAction(eGA_TalkTo)) {
    if (cSpider.Room == 30){
      cSpider.Say("Hola.");
      cMiniSpider.Say("Hola, señor.");
      cSpider.Say("Soy una araña.");
      cMiniSpider.Say("Lo se, yo tambien pero mas pequeña.");
    }
  
    if (cSpider.Room == 40){
      cSpider.Say("¿Sabes por donde hay que seguir? ");
      cMiniSpider.Say("No.");
    }
  
    if (cSpider.Room == 90){
      cSpider.Say("¿Te resulta familiar este lago?");
      cMiniSpider.Say("Si, ya estamos muy cerca.");
    }

    else
      Unhandled();
  }
}


Code in guiscript.asc
Code: ags

function Unhandled(int door_script) {
  // unhandled USE INV
  else if (UsedAction(eGA_UseInv)) player.Say("No puedo usarlo con eso.");   

  // unhandled TALK TO
    else if (UsedAction(eGA_TalkTo)) {
      if (type==2) player.Say("No tengo nada que decirle ahora mismo.");
      else player.Say("No tengo nada que decir.");
    }
}


The problem is that when I start talking everything is going fine, but always ends with "No tengo nada que decirle ahora mismo.", no matter in what room are the character. I have try:
Code: ags

else
  Unhandled();

and:
Code: ags

else {
  Unhandled();
{


with the same result, says what he has to say, but alwasy ends with "No tengo nada que decirle ahora mismo."

Any idea?

Thanks in advance
#3
Hello again

As I said in my first post, I have been using AGS for only a few days and, although most of the problems presented to me I have been able to solve them with the help and documentation, there are things I do not know how to solve them.
In my game there is a mini-spider that follows the player through the rooms, but in certain rooms I would like to stay in it and the player could move between rooms without the mini-spider following.
When both spiders enter a room the code works perfectly, but when it does only the player I am not able to return to the room where the mini-spider is without giving me an error.
I leave the code I use in the two rooms to see if anyone can help me.

Code to room 10
Code: ags

function room_FirstLoad()
{
  cSpider.Walk(278, 133, eBlock, eWalkableAreas);
  cMiniSpider.EnterRoom(10, 330, 135, eDirectionLeft);
  cMiniSpiderWalk(251, 138, eBlock, eAnywhere);
}

function room_LeaveTop()
{
  if (HasPlayerBeenInRoom(11)) {
    cSpider.Transparency=30;
    cSpider.Transparency=60;
    cSpider.Transparency=100;
    cSpider.ChangeRoom(11, 10, 117, eDirectionRight);
  }
  else
    cSpider.Transparency=30;
    cSpider.Transparency=60;
    cSpider.Transparency=100;
    cMiniSpider.Walk(164, 92, eBlock, eWalkableAreas);
    cMiniSpider.Transparency=30;
    cMiniSpider.Transparency=60;
    cMiniSpider.Transparency=100;
    cSpider.ChangeRoom(11, 10, 117, eDirectionRight);
}


Code to room 11
Code: ags

function room_FirstLoad()
{
  cSpider.Transparency=0;
  cSpider.Walk(16, 117, eBlock, eAnywhere);
}

function room_AfterFadeIn()
{
  cMiniSpider.Transparency=0;
  cMiniSpider.EnterRoom(11, 0, 117, eDirectionRight);
  cMiniSpider.Walk(76, 122, eBlock, eAnywhere);
}


When the player goes back to room 10 it makes it alone, the MinISpider stays in room 11, but when I try to go back to room 11 the game crash and give this error "MoveCharacter: character is not in current room"
Its like the HasBeenPlayerInRoom function are not working correctly because player has really been in room 11.

Thanks in advance.
#4
Hello everyone

I have started with AGS a few days ago and I have a problem with one of my character movement. I've been trying to creat a game with and spider that swing over a serie of branches but I'm having problems with the movement.
The spider has his specific view to swing, but, or it makes the movement two, or three times, or when he stop stay at the same place where he started.

This is what I'm trying so far:

Code: ags

if(UsedAction(eGA_UseInv)) {
    if (cSpider.ActiveInventory == iSpiderWeb) {
      cSpider.Walk(113, 132,  eBlock, eWalkableAreas);
      cSpider.LockView(27);
      cSpider.Animate(2, 5, eOnce, eBlock, eForwards);
      cSpider.UnlockView(); 
    }
}

This will make the move but when he finished the spider is in the same place.


Code: ags

if(UsedAction(eGA_UseInv)) {
    if (cSpider.ActiveInventory == iSpiderWeb) {
      cSpider.Walk(113, 132,  eBlock, eWalkableAreas);
      cSpider.ChangeView(27);
      cSpider.Walk(220, 122, , eBlock, eAnywhere);
    }
}

This will move the character forward to his new position, but make the swing movement two or three times depending how far he gets.

I think there is the same movement using by Lucasarts in Fate Of Atlantis when Indy flys with his whip over a hole or something.
Any help will be highly appreciated.
Thanks in advance and sorry for my bad english, I'm from Spain.
SMF spam blocked by CleanTalk