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 - 10o

#1
Oh yes I ment that, I wrote bullshit in my last post...  :-\

When is set "Override item cursor hotspot marker" to true I can't even rightclick on the Items to show the display Messsage nor interact with them ond leftclick. Just nothing happens.
#2


Crocodile Wall Trophy  ;D
#3
If I change "Override item cursor hotspot marker" to True, I can't even rightclick on the Items to show the display Messsage.  :(
#4
My settings are:
#5
My GUI ist still like in this Thread :
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=44644.msg596325#msg596325

Problem is that I can rightclick on the Items and it will wie displayed the current Message, but if I rightclick on them my Curser stays the same and doesent get the Iventory object. So I'am not able to drag out the Objects from the Inventar.

I found some kind of Help on Adventure Treff from a Thread and added following lines:


In repeatedly_execute:

Code: ags

  GUIControl*gc = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
  if (gc == invCustomInv) {   // Maus über Inventarfenster?
    if (mouse.Mode != eModeInteract && mouse.Mode != eModeUseinv)
      mouse.Mode = eModeInteract;
  }


Inventar-Klicks:
Code: ags

// Anfang von on_mouse_click:

  InventoryItem*ia = inventory[game.inv_activated];  // falls Klick auf Inv Item, in ia speichern

  // dann:
  ...
  else if (button == eMouseLeftInv) {
    if (mouse.Mode == eModeUseinv) ia.RunInteraction(eModeUseinv);  // aktuelles Item mit ia benutzen
    else player.ActiveInventory = ia;  // angeklicktes Item auswählen
  }
  else if (button == eModeRightInv) {
    if (mouse.Mode == eModeUseinv) player.ActiveInventory = null;  // aktives Item abwählen
    else ia.RunInteraction(eModeLookat);  // angeklicktes Item anschauen
  }



But it didn't do anything.



Here my aktulized skript wich still doesent work out for that problem:
Code: ags

function on_mouse_click(MouseButton button) {
   
  InventoryItem*ia = inventory[game.inv_activated];  // falls Klick auf Inv Item, in ia speichern

  // called when a mouse button is clicked. button is either LEFT or RIGHT
  if (IsGamePaused() == 1) {
    // Game is paused, so do nothing (ie. don't allow mouse click)
  }
  else if (button == eMouseLeft) 
  {
 //   ProcessClick(mouse.x, mouse.y, mouse.Mode );
        int nm;
    if (GetLocationType(mouse.x, mouse.y) == eLocationCharacter)
    {
      nm= eModeTalkto;
    }
    else if (GetLocationType(mouse.x, mouse.y) == eLocationNothing)
    {
      nm= eModeWalkto;
    }
    else if (GetLocationType(mouse.x, mouse.y) == eLocationHotspot)
    {
      if(wechsel == 0)
      {
      nm=eModeInteract;
      }
      else
      {
      nm= eModeWalkto;
      }
    }
    
    else
    {
      nm=eModeInteract;
    }
    ProcessClick(mouse.x, mouse.y, nm);  
  }
  else if (button == eMouseRight || button == eMouseWheelSouth){
    // right-click our mouse-wheel down, so cycle cursor
   // mouse.SelectNextMode();
   int mm;
    if (GetLocationType(mouse.x, mouse.y) == eLocationNothing)
    {
      mm = eModeWalkto;
    }
    else
    {
      mm = eModeLookat;
    }
    ProcessClick(mouse.x, mouse.y, mm);

  }
  else if (button == eMouseMiddle) { 
    // Middle-button-click, default make character walk to clicked area (a little shortcut)
    // Could have been just "player.Walk(mouse.x,mouse.y)", but it's best to
    // leave our options open - what if you have a special script triggered
    // on "walking" mode?
    ProcessClick(mouse.x, mouse.y, eModeWalkto); 
  }
  else if (button == eMouseWheelNorth) { 
    // Mouse-wheel up, cycle cursors 
    // If mode isn't WALK, set the previous mode (notice usage of numbers instead
    // of eNums, when it suits us)...
    if (mouse.Mode>0) mouse.Mode=mouse.Mode-1; 
    else 
    { 
      // ...but if it is WALK mode...
      if (player.ActiveInventory!=null) 
      {
        //...and the player has a selected inventory item, set mouse mode to UseInv. 
        mouse.Mode=eModeUseinv; 
      }
      else 
      {
        // If they don't, however, just set it to mode TALK (change this line if you add more cursor modes)
        mouse.Mode=eModeTalkto; 
      }
    }
  }
  else if (button == eMouseLeftInv) 
  {
    if (mouse.Mode == eModeUseinv) ia.RunInteraction(eModeUseinv);  // aktuelles Item mit ia benutzen
    else player.ActiveInventory = ia;  // angeklicktes Item auswählen
  }
  else if (button == eMouseRightInv) 
  {
    if (mouse.Mode == eModeUseinv) player.ActiveInventory = null;  // aktives Item abwählen
    else ia.RunInteraction(eModeLookat);  // angeklicktes Item anschauen
  }
   
}

Code: ags

function repeatedly_execute() {
  
  // Put here anything you want to happen every game cycle, even when
  // the game is paused. This will not run when the game is blocked
  // inside a command like a blocking Walk()
  
    GUIControl*gc = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
    if (gc == invCustomInv) 
    {   // Maus über Inventarfenster?
      if (mouse.Mode != eModeInteract && mouse.Mode != eModeUseinv)
      mouse.Mode = eModeInteract;
    }
  
   if (GetLocationType(mouse.x, mouse.y)==eLocationCharacter)
   {
    mouse.Mode = eModeTalkto;
    wechsel = 0; 
    }
  else if (GetLocationType(mouse.x, mouse.y)==eLocationObject)
   {
    mouse.Mode = eModeInteract;
    wechsel = 0; 
   }
    else if (GetLocationType(mouse.x, mouse.y)==eLocationHotspot)
   {
     if(wechsel==0)
     {
      mouse.Mode = eModeInteract;
      wechsel = 0; 
     }
     else
     {
       mouse.Mode = eModeArrowR;
       
     }
   }  
  else 
  {
    mouse.Mode = eModeWalkto;
    wechsel = 0; 
    
  }
  
  if (IsGamePaused() == 1) return;

  // Put here anything you want to happen every game cycle, but not
  // when the game is paused.
}



#6
Ich hab schon  ;D

No I guess I'll try out your suggestions, and I guess it might be the solution in my final game.
But before I'll start my final game I'll mess around with a test game first, so that I don't fuck up the final one.

When I've gained enough experience in my test game, than I'll start my real project.
#7
You're right about that, but in my case I guess I'll keep the overview with the hotspot thing.

I'll just add wechsel = 2 for left, 3 for down etc..

And it will always change back to 0 in other cases.

#8
Hello every one,

I'am 10o, 28 years old, from Germany

Since my childhood I'am a very big fan of Point n Click Adventures, so I often tought about making my own.
I tried to work with AGs about 4-5 years ago, but lost interesst very fast at that time (god knows why).

But now I'am motivated to create my own stuff.

I'am not learning for making a public game, instead I'am planning to make a private game together with a good friend (I'll take the AGS part).
The game will consist of our insider jokes/storys comined into a ridicoulous storyline, so it wouldn't make sense for others even playing this (exapt other RL friends of us).

I hope I learn fast and I hope I won't post tooo many stupid questions.
#9
Ok thanks, maybe I'll try your code from the other Thread you named, but at first I'll guess I'll stick with mine.


Quote from: LeKhris on Mon 17/10/2011 19:19:34
the important thing is that you should never code global behavior like this on a per-hotspot basis.
Whats the reason for that?
#10
Quote from: LeKhris on Mon 17/10/2011 18:39:17
I wouldn't recommend adding a cursor mode for each direction; it's much cleaner and easier to keep eModeWalkto but change the mode's graphic.

To actually use the edges to change the cursor, you could do this:

Code: ags
// in repeatedly_execute

  int new_sprite = mouse.GetModeGraphic(eModeWalkto); // default

  if (mouse.mode == eModeWalkto && GetWalkableAreaAt(mouse.x, mouse.y) > 0) {

    if (mouse.x > Room.RightEdge) new_sprite = 123; // sprite slot of right arrow
    if (mouse.x < Room.LeftEdge) new_sprite = 456;
    ...

    mouse.ChangeModeGraphic(eModeWalkto, new_sprite);
  }


It will change the Sprite if I reach the Edge, right?
But if I have only a small path on the right where the Arraow Cusrer appears I need a Hotspot for that, right?


Ok I've tried a little bit around and to a not so clean solution

A Must condition for my Solution is, that there isn't any other Hotspot directly connected to the change room hotspot.

Ive added a global var named int wechsel = 0

I have changed in my room script:
Code: ags

function hAusgangR_MouseMove()
{
  if(Hotspot.GetAtScreenXY(mouse.x, mouse.y) == hAusgangR)
  {
  wechsel = 1;
  }
  
}




Changed in the global script:
Code: ags

function repeatedly_execute() {

   if (GetLocationType(mouse.x, mouse.y)==eLocationCharacter)
   {
    mouse.Mode = eModeTalkto;
    wechsel = 0; 
    }
  else if (GetLocationType(mouse.x, mouse.y)==eLocationObject)
   {
    mouse.Mode = eModeInteract;
    wechsel = 0; 
   }
    else if (GetLocationType(mouse.x, mouse.y)==eLocationHotspot)
   {
     if(wechsel==0)
     {
      mouse.Mode = eModeInteract;
      wechsel = 0; 
     }
     else
     {
       mouse.Mode = eModeArrowR;
       
     }
   }  
  else 
  {
    mouse.Mode = eModeWalkto;
    wechsel = 0; 
  }
  
  if (IsGamePaused() == 1) return;

}




And at another place in the Global Script:
Code: ags

function on_mouse_click(MouseButton button) {
  // called when a mouse button is clicked. button is either LEFT or RIGHT
  if (IsGamePaused() == 1) {
    // Game is paused, so do nothing (ie. don't allow mouse click)
  }
  else if (button == eMouseLeft) {
 //   ProcessClick(mouse.x, mouse.y, mouse.Mode );
        int nm;
    if (GetLocationType(mouse.x, mouse.y) == eLocationCharacter)
    {
      nm= eModeTalkto;
    }
    else if (GetLocationType(mouse.x, mouse.y) == eLocationNothing)
    {
      nm= eModeWalkto;
    }
    else if (GetLocationType(mouse.x, mouse.y) == eLocationHotspot)
    {
      if(wechsel == 0)
      {
      nm=eModeInteract;
      }
      else
      {
      nm= eModeWalkto;
      }
    }
    else
    {
      nm=eModeInteract;
    }
    ProcessClick(mouse.x, mouse.y, nm);  
  }
}




I guess its not not the best solution, but it kind of works for me
#11
Yes I've used the Search Engine and only found this (outdated) Thread:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=25762.0


Since there isn't a normal solution in AGS fot that yet I've tried something.

I use a GUI with Leftclick Walk/Talk/Interact , Rightclick Walk/Look.

The Curser changes to the wanted Symbol, that problem is solved to.

I've managed it this way:
Code: ags

function repeatedly_execute() {

  
 if (GetLocationType(mouse.x, mouse.y)==eLocationCharacter)
   {
    mouse.Mode = eModeTalkto;
    }
 else if (GetLocationType(mouse.x, mouse.y)==eLocationObject)
   {
    mouse.Mode = eModeInteract;
   }
 else if (GetLocationType(mouse.x, mouse.y)==eLocationHotspot)
   {
    mouse.Mode = eModeInteract;
   }  
 else 
  {
    mouse.Mode = eModeWalkto;
  }
  
  if (IsGamePaused() == 1) return;

}


I've added a new Curser called eModeArrowR and placed a Hotspot (called hAusgangR) in the Edge Area where the player changes rooms.

I've added this to my room script:
Code: ags

function hAusgangR_MouseMove()
{

   mouse.Mode = eModeArrowR;

}


It kind of "works", when I get the curso over the hostspot it changes short to the Arrow Cursor but fast back to the Interact Cursor.

As far as I understand it, it gets directly overwritten of the function repeatedly_execute(), so my Question is:

Is it possible to stop this function as long as my Curser is on this special area?
Or maybe another way to solve this problem?





#12
Got it to work, thanks.
#13
Hi,
I wanted to make a simple Guy where I can Walk and Look on the feft Mousebutton and Interact and talk on the right Mousebutton.
But that ain't the problem, it allready works.

My Problem is, that the Curser stays the same wenn I move over a Character/HotSpot/Object.
How do I change the appereance of the Curser while doing a Mouseover over the Character/HotSpot/Object?
#14
Thank you guys,
it works now.

I've tryed to look it up in the manuel before, but overread it  :P
#15
Hm I get an error:

"The character 'Typ' could not be displayed because ther were no frames in loop 0 of view 2."

#16
When I enter the room where a NPC is doing an constantly repated Animation I'am not able to move my Player.


function room_AfterFadeIn()
{
 cTyp.Animate(2, 1, eRepeat);
}


What possiblitys do I have to animate the NPC while moving my player?
SMF spam blocked by CleanTalk