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

#21
Adorable! But is this little critter invisible...?

EDIT: Ah, I get it! It's so freaking small, everyone overlooks it. That's why it's so battered, right?  :cheesy:
#22
Gorgeous! Already three fantastic entries in less then two days!
Keep them going, there are still more than two weeks left. I expect at least 10 entries.  :grin:
#24
Here's a more crappy but no anti aliased version:

#25
Has anyone been missing the fantastic challenge called Coloring Ball? I have. And I'm sure some of you will enjoy reviving this nice little tradition.

Refering to last Coloring Ball winner Daniel Thomas I feel free to start a new competition. So here you are:

Use the shape to draw something that's actually invisible. This could be anything existing or fictional. You could paint something that is invisible because it's hidden in the dark forever, or something that is invisible because it's so small (or big) that nobody will ever realize it. It's all up to your imagination.

I didn't want to go for the too obvious easter holiday topic, which I hope is all right with you.

And here's the shape:



Rules:

1. You can replace the outline with your own colors.
2. You can use as many colors as you like.
3. You can resize and rotate as needed.
4. Your entries must be in by March 31st.
5. Have fun!

Trophies:


And this extra trophy is for all participants who helped reviving the Coloring Ball. Everyone who provided an entry is free to take it.  :smiley:


#26
Agreed with every single point.  :)
#27
No need to apologize, Haggis. You really helped me out here. Now I got what I wanted and the script fires the usermode1 function after a short click on the hotspot. So I can set up a usermode1 function for every hotspot when needed.

Code: AGS

 if (Mouse.IsButtonDown(eMouseLeft) == 0){ //this executes if the button is released
     /*SHORT CLICK*/
       if (mouse.Mode != eModeUseinv){   //not holding an item
         if (gui[inv_id].Visible==true){ //if inventory open
           if (item != null){ //If cursor over item then set player holding item
             player.ActiveInventory = item;
             action_name = player.ActiveInventory.Name;
           }          
         }
         else if(GetLocationType(mouse.x,mouse.y) == eLocationHotspot){
           if (htspt.GetProperty("Shortclick")){
             ProcessClick(mouse.x, mouse.y, eModeUsermode1);  //RUN THE HOTSPOT INTERACTION
           }
         }
         else{  //RUN WALK TO
           if (process == false){
             ProcessClick(mousex,mousey, eModeWalkto);  //move to that spot
           }
         }
       }
         else{                
           ProcessClick(mousex,mousey, eModeUseinv); //inventory interact
         }
     clicked=0;  //click done
     timer=0;    //timer reset
   }
 }


monkey, I was thinking about using your module but already had made too many changes in the new game, replaced grafics etc. so I didn't want to start over again. But it was definitely an option!  :smiley:

Thank you again for your help and support!!
#28
Thank you, Haggis. This seems to be a good approach to me. Yes, I'm using Electroshokker's module here.

I put your code in the appropriate position and used the variable 'htspt' which is created in the verb coins repeatedly_execute: Hotspot*htspt=Hotspot.GetAtScreenXY(mouse.x, mouse.y).

Unfortunately I cannot find the variable 'offsetstartx' anywhere in the script. Could you explain how to declare it? Because I get an undefined symbol error there.

Here's my code so far:

Code: AGS

 if (Mouse.IsButtonDown(eMouseLeft) == 0){ //this executes if the button is released
     /*SHORT CLICK*/
       if (mouse.Mode != eModeUseinv){   //not holding an item
         if (gui[inv_id].Visible==true){ //if inventory open
           if (item != null){ //If cursor over item then set player holding item
             player.ActiveInventory = item;
             action_name = player.ActiveInventory.Name;
           }          
         }
         else if(GetLocationType(mouse.x,mouse.y) == eLocationHotspot){
           if (htspt.GetProperty("Shortclick")){
             Display("Short click");//RUN THE HOTSPOT INTERACTION
           }
         }
         else{ //RUN WALK TO
           if (process == false){
             ProcessClick(mousex,mousey, eModeWalkto);  //move to that spot
           }
         }
       }
       else if (GetLocationType(mousex+(offsetstartx-GetViewportX()), mousey+(offsetstarty-GetViewportY())) != eLocationNothing) ProcessClick(mousex,mousey, eModeUseinv); //inventory interact         
       else ProcessClick(mousex,mousey, eModeWalkto);  //move to that spot
     clicked=0;  //click done
     timer=0;            //timer reset
   }
 }


Thanks for helping!
#29
Hello Haggis, hello Demicrusaius,

thanks for your replies.

Yes, I've noticed the 'act' property. The problem with that is when I set it to true the verb coin gets desabled for that certain hotspot. Short click on hotspot works then but I cannot open the verb coin any more. I whish to do both on hotspots: handle them with the verb coin commands and with a single short click additionally.

I'm not sure if the overhotspot and savecursor method is the best way for this issue. To have a global function in the on_mouse_click event that checks for a short click on hotspots using timers and than eventually passes on to the verb coin script would be better, I guess. But I'm not good enough to figure this out by myself.

Thank you anyway.
#30
Hi everyone,

I'm setting up a new game using the verb coin template with three buttons: interact, look and talk. The template itself works very well and does just what it is supposed to do. But I was wondering how to set up a function for a single click on a hotspot without using the verb coin.

For example: You have a hotspot for a door. Choosing the interact button from the verb coin makes the player enter that door and change rooms. But I'd like the player to be able to do so by just clicking once at the hotspot without opening the verb coin. It would be great if I could run a function there for many reasons.

Using hHotspot_AnyClick from the events panel works for clicking on the hotspot but makes the function run also after using the three verb coin buttons. So that doesn't really work. Does anyone have an idea how I could get there?

Thank you.
Adrian
#31
Thank you very much for your effort and support, zabnat! Due to your very good explanation and test source I was able to install the looping room just the way it should be and it works perfectly. Now I can start to add all the walkable areas, objects, NPCs etc.

I'm sure this thread will be of use for many beginners who don't know how to install a looping room.
#32
Thank you, Ghost.

After different approaches using hotspots, room edges and so on, I decided to use strazer's code from this old post.

Here's my (nearly the same) verson:

Code: AGS

#define BUFFERAREA_LENGTH 120 // relative width of room background buffer area (335 pixels)

function PauseMoving (int charid) {
// Stops the supplied character but keeps its last frame
// For seamlessly changing walking speed, for example

  char prevview = character[charid].View;
  char prevloop = character[charid].Loop;
  char prevframe = character[charid].Frame;
  int wasmoving = character[charid].Moving;
  character[charid].StopMoving();
  if (wasmoving) character[charid].LockViewFrame(prevview, prevloop, prevframe);
    // since we're using his current view, the lock will be released automatically once the character is moved again
}


function WaitHidden(int gameloops) {
  int prevmode = Mouse.Mode; // store the current cursor mode
  Mouse.Mode = eModeWait; // change to wait cursor mode
  Mouse.UseModeGraphic(prevmode); // change appearance to look like previous cursor mode
  Wait(gameloops);
  Mouse.ChangeModeGraphic(eModeWalkto, 339); // revert wait cursor to the default sprite
  Mouse.Mode = eModeWalkto; // revert to previous cursor mode
}


function on_mouse_click(MouseButton button) {

  if (IsGamePaused()) return; // if game is paused, quit function

  if (button == eMouseLeft) { // if left mouse click
    if (Mouse.Mode == eModeWalkto) { // if mouse is in walk mode
      if (GetViewportX() + mouse.x >= Room.Width - (System.ViewportWidth / 2)) { // if clicked on right end of room
        PauseMoving(0); // see above
        character[player.ID].x = character[0].x - (Room.Width - BUFFERAREA_LENGTH); // put character at left end of room
        WaitHidden(1); // see above; let screen update before running global on_mouse_click
        character[player.ID].x = GetViewportX() + 160;
      }
      else if (GetViewportX() + mouse.x <= (System.ViewportWidth / 2)) { // if clicked on left end of room
        PauseMoving(0); // see above
        character[player.ID].x = character[0].x + (Room.Width - BUFFERAREA_LENGTH); // put character at right end of room
        WaitHidden(1); // see above; let screen update before running global on_mouse_click
        character[player.ID].x = GetViewportX() + 160;
      }
    }
  }

  // global on_mouse_click will be called afterwards -> character starts walking

}


It actually works quite well but there are some issues.

1. I had difficulties defining the value for the buffer area, meaning the range inside which a mouse click would change the PC's x-coordinates. Via trial-and-error I figured out that a value around 120 works best, but I don't know why because the overlapping area of the background has 335 pixels.

2. I had to add this code line at the end of the function:
character[player.ID].x = GetViewportX() + 160;
Otherwise the player character would nearly never be placed in the middle of the screen as expected. But I don't know if this is a good solution because of that there's a short flicker when the PC's coordinates are being changed.

3. This is most irritating: When you click inside the buffer area and that mouse click is made closer to the edge of the screen, the character gets not „teleported“ to the right coordinates. It looks like the character jumps forwards, or to be precise the background jumps. While when you make the click within the buffer area closer to the center of the screen, it looks much better!

4. Also I was wondering what modifications I woud have to do to make a looping room also possible with a NPC following the player character and if this is even possible.

For testing the whole thing I use the nexus background from the game The Dig.

It's 1808 pixels wide, of which 335 pixels contain the necessary overlapping area, copied from the left side of the picture.

Thanks to anyone for having a look at it. I hope that wasn't too confusing.
I think making a good and stable looping room is not that easy at all, but I'm hoping to get it sometime.

Adrian
#33
Hello,

does anyone know if there's still a download link to the old AGS verson with the looping room in the demo game somewhere? I'd like to do something like that and there are several threads in the forums about looping rooms and endless backgrounds. But I can't figure it out completely. So I'd like to have a look at the original script to see how it works.

Thanks a lot.

Adrian

[EDIT]: zabnat provided some code and an explanation of how looping rooms work in this thread here.
#34
Does this module also support continouos 2d scrolling? I mean rotating but not tilting or distorting? Like in the looping room in "The Dig" for example.
#35
Just to let you know. There's an isue with this module:

If you change to a room where the ShowPlayerCharacter property in the room property grid is set to false, the inventory item will not show up any more, even if you change back to a room where the property is set ot true.

I avoid the issue by using the player.transparency command instead.
#36
In case anyone runs into the same problem:

The actual issue has nothing to do with the player character's starting room. It's this:
If you change to a room where the ShowPlayerCharacter property in the room property grid is set to false, the inventory item will not show up any more, even if you change back to a room where the property is set ot true.

I avoid the issue by using the player.transparency command instead.

I'll post this in the VerbCoin Template thread as well.
#37
Yes, that's what I suspected. I guess I have to start all over again and watch my changes step by step.

Thank you for having a look at it, Khris!

#38
Hello,

first of all, I'm sorry for double posting this, but the Modules & Plugins thread I put this in doesn't seem to have any watchers any more.
(http://www.adventuregamestudio.co.uk/forums/index.php?topic=32745.0)

I have a litte issue with the built-in VerbCoin Template:
When I set the player character's starting room to a different one than 1, I'm not able to open the inventory item. Right click has no effect then.

I'm sure this is a minor issue. Can anybody tell my how to fix it?

Thanks!
#39
Hello,

I know, this thread hasn't been in use for quite a while, but I think I'm in the right spot here.

The VerbCoin Template is absolutely great but I have a litte issue with it:
When I set the player character's starting room to a different one than 1, I'm not able to open the inventory item. Right click has no effect then.
Works with all other room as starting room, though.

EDIT: Does NOT work with other rooms than room 1. Sorry.

I'm sure this is a minor issue. Can anybody tell my how to fix it?

Thanks!

EDIT: Seems this thread is out of order, so I moved this post to Beginners' Technical Questions. :)
#40
Thanks, got it.  :smiley:
SMF spam blocked by CleanTalk