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

#1
I'm using the default KeyboardMovement script, and am completely stumped. This is for an arcade-style game that I'm working on as a side project.

The player facing down.

The Goal:
1. The player will use the left/right arrow keys to cycle through views. If facing down, then by pressing left arrow key, he would shift to the Southwest view. If facing Southwest, then by pressing the left arrow key, the character would now be facing Left. The same principle would apply by pressing the right arrow key. If you press the up arrow key, then the player begins walking in the current direction assigned by the left or right arrow keys (whether northeast, left, right, etc.).
2. I don't want the character to automatically move when an arrow is pressed. The only arrow for movement will be the up arrow. Keep in mind that the character is sitting in a chair, so the only way to move backwards would be via the spacebar (to kick).
3. The character shouldn't stop immediately after letting go of the up button. It should be a slow, gradual halt.

To clarify a bit, I want it where the left arrow will always rotate the character clockwise, while the right arrow would always rotate counter-clockwise. You move forward by pressing the up arrow, which moves you straight towards any direction you're facting (even down). I would program in the spacebar to cause the player to kick and propel himself backwards on the chair. Essentially, this makes it more ideal to travel backwards (you move much faster).

The obvious code changes so far:
Code: AGS

//Solves the automatic movement.
KeyboardMovement.SetMode(eKeyboardMovement_Pressing);


Semi-working Globalscript code (tweaked slightly)
Code: AGS

//View 0 is Down, View 6 is Southwest, View 1 is Left
  if(Jerry.Loop == 0 && IsKeyPressed(eKeyLeftArrow))
    Jerry.FaceLocation(player.x - 50,  player.y + 50);
  if(Jerry.Loop == 6 && IsKeyPressed(eKeyLeftArrow))
    Jerry.FaceLocation(player.x - 50,  player.y);
  if(Jerry.Loop == 1 && IsKeyPressed(eKeyRightArrow))
    Jerry.FaceLocation(player.x - 50,  player.y + 50);


Other failed ideas (This time in the KeyboardMovement_102 Script)
Code: AGS

  else if (IsKeyPressed(KeyboardMovement_KeyLeft) && Jerry.Loop == 0) newdirection = eKeyboardMovement_DownLeft; // Moves DownLeft (If Down)
  else if (IsKeyPressed(KeyboardMovement_KeyLeft) && Jerry.Loop == 6) newdirection = eKeyboardMovement_Left; // Moves Left (If DownLeft)
  else if (IsKeyPressed(KeyboardMovement_KeyLeft) && Jerry.Loop == 1) newdirection = eKeyboardMovement_UpLeft; // Moves UpLeft (If Left)
  else if (IsKeyPressed(KeyboardMovement_KeyLeft) && Jerry.Loop == 7) newdirection = eKeyboardMovement_Up; // Moves Up (If UpLeft)
  else if (IsKeyPressed(KeyboardMovement_KeyLeft) && Jerry.Loop == 3) newdirection = eKeyboardMovement_UpRight; // Moves UpRight (If Up)
  
  else if (IsKeyPressed(KeyboardMovement_KeyRight) && Jerry.Loop == 0) newdirection = eKeyboardMovement_DownRight; // Moves DownRight (If Down)
  else if (IsKeyPressed(KeyboardMovement_KeyRight) && Jerry.Loop == 6) newdirection = eKeyboardMovement_Down; // Moves Down (If DownLeft)
  else if (IsKeyPressed(KeyboardMovement_KeyRight) && Jerry.Loop == 1) newdirection = eKeyboardMovement_DownLeft; // Moves Down (If DownLeft)


Any thoughts or simple tricks to achieving this movement scheme? Thanks in advance!
#2
We have been tweaking the skeleton of our game for over 6 months now, and have made some significant improvements (including a perfect scrolling view thanks to Khris). The help received by forum members has been nothing short of heartwarming, and we are ready to begin full-out development upon successful funding via Kickstarter.

Kickstarter (Postponed)
http://www.kickstarter.com/projects/36294445/stellvia-rising-wasteland/posts/508305

Trailer
http://www.youtube.com/embed/ENADQfyjnCU

Brief Backstory (see our Kickstarter for elaborate details)

"After the bombs fell, leaving most of the South and Midwest in ruins, many were forced to take refuge in caves. Others relied on the assistance of mobster scum. Those who managed to get far enough away from the fallout often died off with insufficient supplies. The few towns remaining were left to fend for themselves, desperately making deals with militias, and often received the short end of the stick. After all, when the government fell the only law was to not be on the wrong end of a loaded gun."

Other brief & twisted plot details:

"We will have one scene where a group of mobsters challenge their boss on account of him cussing them out and telling them that they are *insert expletive* for not scouting out to see how a dog was left in the middle of the outskirts sliced in half. This is, of course, a foreshadowing of events to come. You can save the dog on the rare event that you catch the unsettling group in the act at the right time (we love animals too). Other related events in Stellvia follow this gruesome scene."

"There is a lot of drive and passion for this project, due to the team's identical fascination with the Post-Apocalyptic RPG genre. The entire reason that we feel our project will stand out (even against major studios with millions in their coffers), is that we refuse to settle for a cliché storyline and linear gameplay."

"Part of the deal the mobs/organized raiders made with towns is that in exchange for food/resources, they would help guard the townsfolk from creatures/other raiders of the night. The other part of the deal was that townsfolk weren't allowed any weapon beyond a regular pistol with non-piercing ammunition. Anything found like this was confiscated and there were gun checks every couple of months. This was so that the mobs could secretly/slowly take over the town (sometimes, unless they are lazy) and take full control and advantage over everyone using guerrilla force if necessary. It slowly becomes a mild form of slavery."


Screenshots:

Tribal Outskirts


Working Inventory System (3 inventories utilized to function)


Fortified Town Entrance


Character Design



It's not all about the graphics. Our ultimate goal is to deliver a twistedly humorous, yet dark and realistic, experience which will have a strong replay value due to your character playing a valuable role everywhere they venture off to. Will a plethora of ideas, we are determined to deliver what everyone wanted as a spiritual, modernized brother of the classic Fallout series. It's not about mocking a masterpiece. It's about us sharing our imagination and putting our passion/obsession with the post-apocalyptic RPG genre to good use. We haven't been happy with Fallout clones, so we would like to present some new innovative ideas of our own through our Kickstarter.

Thanks again to all of the helpful forum members. We couldn't have gotten past some issues without a nudge in the right direction now and then.

#3
So I was brainstorming how to have the screen scroll left, right, up or down if they position the cursor at the edges of the screen.

Then it hit me. I can have an invisible character that teleports to the player's location when the mouse is at the screen edges. This invisible character would teleport either 400 spaces west, east, north or south of the player respectively. For example, if the mouse is positioned on the very left of the screen, then the invisible character is moved 400 to the left of the player's location and set as the main character (movement disabled). Since I am currently using the Smooth Scrolling & Parallax Mod, this method seems to work nicely.

I haven't seen anyone mention this method for viewing around freely with the mouse, so is this due to problems I can't foresee as of now? Is this idea somehow original or absurd? I appreciate any advice or warnings. I'm mainly looking to improve upon the code that I just came up with.

Edit: My thoughts on possible improvements: The Left, Right, Up, Down movements are rather rigid/stiff (no angled viewing around (e.g., northwest)). Maybe to fix this, the invisible character could quickly run towards the current mouse position and so the screen would move where the mouse goes. I'm not exactly sure how to do it yet.


Here is my currently working portion of code. So far it works perfectly as it should with no errors and very slight stalls.
Ignore quickstart. My current map is 6265x3720. MouseScroll is a blank character used while in scrolling mode (cursor on the edge of the screen).
Code: AGS

if(mouse.x >= 0 && mouse.x <= 30 && quickstart == 0 && scrolling == 0 && player.x > 400)
  {
      Mouse.DisableMode(eModeWalkto);
      MouseScroll.Move(cEgo.x-400, cEgo.y);
      MouseScroll.SetAsPlayer();
      targetCharacter = MouseScroll;
      scrolling = 1;
  }
  
  if(mouse.x >= 994 && mouse.x <= 1024 && quickstart == 0 && scrolling == 0 && player.x < 5865)
  {
      Mouse.DisableMode(eModeWalkto);
      MouseScroll.Move(cEgo.x+400, cEgo.y);
      MouseScroll.SetAsPlayer();
      targetCharacter = MouseScroll;
      scrolling = 1;
  }
  
  if(mouse.y >= 0 && mouse.y <= 30 && quickstart == 0 && scrolling == 0 && player.y > 400)
  {
      Mouse.DisableMode(eModeWalkto);
      MouseScroll.Move(cEgo.x, cEgo.y-400);
      MouseScroll.SetAsPlayer();
      targetCharacter = MouseScroll;
      scrolling = 1;
  }
  
  if(mouse.y <= 768 && mouse.y >= 738 && quickstart == 0 && scrolling == 0 && player.y < 3320)
  {
      Mouse.DisableMode(eModeWalkto);
      MouseScroll.Move(cEgo.x, cEgo.y+400);
      MouseScroll.SetAsPlayer();
      targetCharacter = MouseScroll;
      scrolling = 1;
  }
  
  if(mouse.x > 30 && mouse.x < 994 && mouse.y > 30 && mouse.y < 738 && player == MouseScroll)
  {
    cEgo.SetAsPlayer();
    targetCharacter = cEgo;
    scrolling = 0;
    Mouse.EnableMode(eModeWalkto);
    Mouse.Mode = eModeWalkto;
  }



Version 2 (Slightly Improved). I re-enabled walking while scrolling with the mouse so that you can continue walking along (convenient).
Code: AGS

 
  
  //U, D, L, R of Char. View
  //MouseScroll = Invisible Char.
  //targetCharacter is the variable for the Smooth Scrolling & Parallax Module.
  
  if(mouse.x >= 0 && mouse.x <= 30 && quickstart == 0 && scrolling == 0 && player.x > 400)
  {
      
      MouseScroll.Move(cEgo.x-400, cEgo.y);
      MouseScroll.SetAsPlayer();
      targetCharacter = MouseScroll;
      scrolling = 1;
  }
  
  if(mouse.x >= 994 && mouse.x <= 1024 && quickstart == 0 && scrolling == 0 && player.x < 5865)
  {
      
      MouseScroll.Move(cEgo.x+400, cEgo.y);
      MouseScroll.SetAsPlayer();
      targetCharacter = MouseScroll;
      scrolling = 1;
  }
  
  if(mouse.y >= 0 && mouse.y <= 30 && quickstart == 0 && scrolling == 0 && player.y > 400)
  {
      
      MouseScroll.Move(cEgo.x, cEgo.y-400);
      MouseScroll.SetAsPlayer();
      targetCharacter = MouseScroll;
      scrolling = 1;
  }
  
  if(mouse.y >= 738 && mouse.y <= 768 && quickstart == 0 && scrolling == 0 && player.y < 3320)
  {
      
      MouseScroll.Move(cEgo.x, cEgo.y+400);
      MouseScroll.SetAsPlayer();
      targetCharacter = MouseScroll;
      scrolling = 1;
  }
  
  if(mouse.x > 30 && mouse.x < 994 && mouse.y > 30 && mouse.y < 738 && player == MouseScroll)
  {
    cEgo.SetAsPlayer();
    targetCharacter = cEgo;
    scrolling = 0;
  }
  
  if(scrolling == 1 && Mouse.IsButtonDown(eMouseLeft))
  {
    cEgo.Walk(mouse.x + GetViewportX(),  mouse.y + GetViewportY());
    MouseScroll.Walk(mouse.x + GetViewportX(),  mouse.y + GetViewportY());
  }
#4
I'm using this module:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=33142.0

Note: I'm still deciding whether I want the mouse to control map scrolling or the player's location (I'd like to try both).

I've been trying to change "player.x" to "mouse.x" where obvious, but the screen is still confined to the character rather than freely scrolling around. Also when the mouse is at the right, the screen will go left.

I enjoy learning from the best, so thank you.
#5
Right now I'm working with a very large map (6265x3720, utilizing the scrolling module).

My question is if it's even possible to zoom-in/out without disrupting gameplay. I only want the ability to zoom out slightly, so that the player can view more of the landscape/town/etc.

Will this be of any help for my situation?
http://www.adventuregamestudio.co.uk/forums/index.php?topic=23664


Note: I realize that I could just make the map a lower resolution, thus "zooming out" permanently, but it would not be as HD as zooming out from an ultra-high resolution (preferably with the mouse-wheel if possible).

Thanks for your continued help! It means a lot.


[imgzoom]http://i.imgur.com/y6OMMJW.jpg[/imgzoom]
#6
I've looked for solutions in the entire forum, but I can't seem to get any to work. My project will be fullscreen when my monitor is set to a lower resolution, but when I set it to 1080p then it puts the game in windowed mode.

Is there a module or code I can implement to force the game to fullscreen (non-stretched, just cropped with black)?

EDIT: I finally came across this post that made me realize what was going on:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=35288.msg494992#msg494992

I simply changed "while running without debugger" to "Always fullscreen". You can also set it to what you have as the .cfg after compiling. Another way I found out that it wasn't anything I had to change within the game was that after running the compiled .exe it would always run in fullscreen =].



#7
I had found a few posts on this subject, but I can't seem to get where I need to be and I'm a bit confused.

TextArea Module v0.0.1.1 BETA (Multi-line textboxes)
http://www.adventuregamestudio.co.uk/forums/index.php?topic=34560.msg451995

Description Module:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=26306.0

and this MultiTextBox v1.00 Module (Handle multiple text boxes)
http://www.adventuregamestudio.co.uk/forums/index.php?topic=26539.msg335878#msg335878

All I'm doing is making it so that when I click a button in the gui, let's say "Strength", then it will display "Your ability to carry lots of equipment blah blah" in a text box area at the bottom right of the screen. I can get it to do that, but of course it's just 1 line that trails off the screen.

I'm just wondering what the most efficient way would be to get this done. I also don't want another text box filling up unrelated ones. Right now if I type in the character's name then it will also fill the description box until I click on "strength" and it's cleared.


Should I use one of these modules or am I just making it more complicated than it is? My prediction is that I should use a text box to enter the character name and a separate listbox for the description box (info for each button). Sorry, I can't always figure out if a module is exactly what I need or if it's not necessary.

It seems like I'll need one of these modules since you can only have 1 text box displayed at a time (from what I've tried). I don't want to disable one at any time, I need them both to display at once.


Important note: The MultiTextBox Module gives me an error just running the game after. It says:
"
Error(line 55): Array size must be constant value

struct MultiTextBox {
  import static Label *HighlightCloseLabel(GUIControl *gc, int color);
  TextBox *stack[AGS_MAX_GUIS];

"


Incase all of that mess confused you, I'm just asking what any of you would do to solve two problems:

1. Text boxes don't wrap and just make a straight line off the screen"
2. I can't have multiple independent text boxes without a module (from what I can tell). So should I use listboxes or somehow set a label to display different wrapped text for each button (strength, dexterity, etc)?



Thanks in advance!
#8
Imagine a character creation gui separated into 2 parts (AGS only allows a certain number of buttons per Gui). The top Gui (1024x768) has a background and buttons/input boxes. The bottom Gui (1024x768) has more buttons, a description box and a transparent background/border.

I have the top and bottom Guis both set to ZOrder 0. The bottom gui has a transparent background (I was simply trying to overlap the top layer) so when they are both displayed at once (1024x768 dimensions each) I can see everything BUT I can't click the top Gui buttons at all. It's just displayed as if the top Gui is a solid static picture while the bottom is active.

Is there a way to make the top and bottom guis active depending on which half of the screen that the mouse is in? The annoying solution I already realize is to separate the background into two sections and map one to only display at the top (0,0) - (1024,384) (as if drawing a box), while the other would be (0,384) - (1024,768).
#9
Sorry if you had just helped me with my previous method. It's pointless when I can just figure out this module. I set the iSMG with the cSMG(character) using the module script, but what I can't figure out is how the item is displayed.

I set the cSMG location to display coordinates with every click so that I could track it. It just stays in the current room at the default location.

I took a look at the RoomInv script to see what it actually does and apparently it's very automated so I really shouldn't have to do very much besides setting the InventoryItem to link the Character to.

Module Link:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=28770

Code: AGS


//If player brings grabbed item to the DropItem area (I haven't made it where player has to click it yet)

if(GUIControl.GetAtScreenXY(mouse.x, mouse.y) == DropItem && Mouse.Mode == eModeUseinv)
{    
     RoomInv[1].AddInventory(player.ActiveInventory); // add the item to room 1
     RoomInv[1].SetCharacterToUse(player.ActiveInventory, cSMG); //This should make cSMG auto change rooms to where the player is at, right?
     
     cEgo.DropInventoryItem(player.ActiveInventory, 1); //I figured this would work to display the item, but I don't see anything.
     
     //Inventory windows close
     gInventory.Visible = false;
     gInventory2.Visible = false;
     gInventory3.Visible = false;
     
}



The module has this in the ReadMe:

"
bool Character::DropInventory()
  Drops all of the character's inventory items into the current room. This will remove
  the items from the character's inventory.

bool Character::DropInventoryItem(InventoryItem*, optional int quantity)
  Drops the specified item into the character's current room (if the character was
  carrying the item). QUANTITY may be used to drop more than one of the item at once.

bool RoomInv[INDEX].SetCharacterToUse(InventoryItem*, Character*, optional int x,
optional int y)
  Sets the character to be used by the specified inventory item within the room
  specified by INDEX. In this way it is possible to show the room's inventory as
  "objects" that you can interact with.

bool RoomInv[INDEX].SetInventoryQuantity(InventoryItem*, int quantity)
  Sets the inventory quantity of the specified item in the room specified by INDEX to
  QUANTITY.
"

and others. I also went through the main post to see if I could get it working.


There's just something I'm leaving out or not understanding fully. I just would like to finally get this drop item method working.

Thanks to those helping repeatedly. It means a lot  :)
#10
This is the code that makes my character "drop" their grabbed inventory item onto the ground 10 pixels below (removed from inventory, then drawn smaller).

Code: AGS

if(GUIControl.GetAtScreenXY(mouse.x, mouse.y) == DropItem && Mouse.Mode == eModeUseinv)
  {
     if(cEgo.Room == 1 && dropmap1x1 == -5000)
     {
       dropmap1x1 = XTarget;
       dropmap1y1 = YTarget + 10;
     }
     
     Citem1 = player.ActiveInventory.Graphic;
     DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
     surface.DrawImage(dropmap1x1 - GetViewportX(), dropmap1y1, Citem1, 0, 35, 25);
     surface.Release();
     player.LoseInventory(player.ActiveInventory);
     gInventory.Visible = false;
     gInventory2.Visible = false;
     gInventory3.Visible = false;
    
  }


I can't figure out how to detect the sprite drawn to re-equip the item again. I know there's a way. Yes, I realize the main method people use is creating a character per item that is stored on the map. I wanted to try this way. Here is the code I'm using that doesn't work. The script never activates to pick up the item. I'm not sure if my coordinates system is all screwy.

Code: AGS

if(Mouse.Mode == eModeInteract && mouse.x == dropmap1x1 && mouse.y == dropmap1y1)
  {
    
    
    
    gInventory.Visible = true;
    gInventory2.Visible = true;
    gInventory3.Visible = true;
    cEgo.ActiveInventory = iSMG;
    DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
    surface.DrawImage(dropmap1x1, dropmap1y1, 164, 0, 35, 25);
    surface.Release();
  }



Note: Without moving my character it reads as:
player coordinates: 1502,265
item dropped at: 1502,275
viewport: 495,0

I tried to make it where the coordinates of the sprite drawn were saved so that if you position the mouse back over those coordinates then the mouse will change so that you can grab at the sprite, which would then kick in the script to write over that item (with a blank, transparent surface aka: sprite 164) and then add that stored item. I'm starting to see why people just go with the character as inventory item option. Am I crazy or is this method possible?
#11
All of the links seem to be down here:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=28770


This is a Godsend in terms of how much simpler it will make it (in coding) to drop items and come back for them later in the map. I really hope that someone out there happens to have this rare module. If anyone has an alternative module then please let me know  :)


Edit: Lmao..I think the guy who put the last  comment at the bottom and I both clicked the wrong links. It's right here: https://sites.google.com/site/monkey0506/RoomInv_3_0_0.rar?attredirects=0ight

I clicked the Brinkster and below links but not literally the one that says "download". This is one of those times where I wish I could delete my post.
#12
When you select an item in your inventory what is the code that basically does the function of "iSMG.selected == true". And by detected I mean in eModeInteract you grab the item and you can move it around.

Better yet, is there a code that reads whether ANY item is currently selected? As in the cursor mode is not any of the defaults or listed in the "cursors" section of AGS.


The reason I need to know this is for dragging the item into a different character's inventory. I have 3 inventories for specific functions such as what is in the player's right or left hand. Eventually I'll make another one for an Armor slot. Anyway, more of that can be seen in my previous post. I managed to get all 3 up at once and I'm still messing with code and looking around since I'm lost.

If I use the code "cEgo.ActiveInventory == iSMG" does that detect if the item is in my inventory at all or is this for if I select the item? I'm looking for the code for when the item is selected and "picked up".

Anyone out there  :)?
#13
I figured it out. I don't know how to delete posts.

Here is just a small part of the code. The rest is more specific for my game.

if(GUIControl.GetAtScreenXY(mouse.x, mouse.y) == LeftHand && mouse.Mode == eModeUseinv && LHITEMSET != 1)
  {
    InventoryChar1.AddInventory(cEgo.ActiveInventory);
    cEgo.LoseInventory(cEgo.ActiveInventory);
    LHITEMSET = 1;
    InventoryChar1.SetAsPlayer();
  }

As for the rest, this post helped me a great deal as well as my more recent post:

http://www.adventuregamestudio.co.uk/forums/index.php?topic=46243.msg621216#msg621216
#14
Room 301 is the title screen and Room 1 is my first town. All of the buttons work fine. My base code is from the demo for Smooth Scrolling & Parallax (if that helps any).

Some of my GlobalScript code is derived from the demo included with this:
The Parallax Module

Main Issues
1. Music will not play in the title screen.
2. When I click "start game" everything works perfectly EXCEPT that the Smooth Scrolling module seems to be disabled. I can move the character around, but I'm stuck in the boxed area instead of being able to walk around the town with the scrolling screen. When I set the main character as "cEgo" vs the default "TitleChar" then he auto starts in town and everything works as I want with the scrolling. I obviously want a title screen so I have the character set back as TitleChar. I notice that it seems to turn on and the character is centered for a split second, then it pans to the left some and is stuck.
3. Not a must, but if anyone would like to share their Options Gui (title screen Settings menu) or just the code for it I'd love to see :).

Thanks in advance for any help!

I noticed that people seem to not know what to say to this issue  :(; that's not a good sign...


Here's part of my GlobalScript:


Code: AGS

function repeatedly_execute() 
{
 
  if(gIconbar.GetAtScreenXY(mouse.x, mouse.y) == gIconbar && Mouse.Mode != eModeUsermode3) 
  { 
    Mouse.Mode = eModeUsermode3;
  }
  else if(gIconbar.GetAtScreenXY(mouse.x, mouse.y) != gIconbar && Mouse.Mode == eModeUsermode3 && TitleChar.Room != 301)
  {
    Mouse.Mode = eModeWalkto;
  }
  else if(TitleChar.Room == 301)
  {
    Mouse.Mode = eModeUsermode3;
  }
 
 
}



The Title Screen script is as follows:
Code: AGS

function room_AfterFadeIn()
{
  


  aTest1Title.Play();
  mouse.UseModeGraphic(eModeUsermode3);
  gIconbar.Visible = false;
  gStatusline.Visible = false;
  gTitleScreen.Visible = true;
  
  Mouse.Visible = true;
  Mouse.Mode = eModePointer;
  

}



and the Code for the button when I click "Begin" in the Title Screen:
Code: AGS

function TitleBegin_OnClick(GUIControl *control, MouseButton button)
{
    gTitleScreen.Visible = false;
    cEgo.SetAsPlayer();
    SmoothScroll_PxOn();

}


Edit: I think I found the culprit  :).
While browsing through the code over and over, I noticed this function:

function game_start(){
 
  targetCharacter = player;
 
  system.vsync=true;
}

So naturally I added "targetCharacter = cEgo;" to my Begin button on the title screen and now it centers on the character. My controls are wonky now with right clicking, but I feel like I can probably do the rest on my own. I hope this helps some poor soul in the future when they have the same problem  :tongue:



Update #2: Fixed the Smooth Scrolling Module entirely.

I ended up adding a global variable to trigger in the begin button so that the global script knew when to stop forcing the title screen mouse state (I need it to change when right-clicking to walk, use, look at, talk).

My "repeatedly_execute()" script was slightly modified to:
"else if(TitleChar.Room == 301 && clickbegin == 0)" to take the global variable into account.

function TitleBegin_OnClick(GUIControl *control, MouseButton button)
{
    clickbegin = 1;
    gTitleScreen.Visible = false;
    cEgo.SetAsPlayer();
    targetCharacter = cEgo;
   
}
#15
I have a rough shell of the game so far so I would like to add a title screen and menu when you first run the game.

My problem is that I literally have no idea where to start besides making a new Room (importing the Title screen image as the background) and attempting to disable the main game Guis so they are not visible.

I tried doing this but the Gui is still visible (bottom bar).

function room_AfterFadeIn()
{

  gIconbar.Visible = false;
}

Keep in mind that I have already made intros, mini cutscenes and understand basic scripting so I'm not completely oblivious to what's going on. What code do I need to disable the Guis and bring up a menu (start game, load, exit)?

Is there an example Gui I can import and modify as my title screen with buttons?

Any help is greatly appreciated. I really tried searching this topic so I'm sorry if it's been asked countless times. I can't seem to find anything that will take me through step 1. I'm still looking through help topics and will post updates if I figure out something.

Basically right now I have a town that you can roam around in and talk with npcs. After realizing that I wanted to make the intro/menu part before I continue, I decided to create another blank map, import a title screen image and attempt to make the Gui vanish. I set the player as default starting on the blank title screen map, but I can't figure out the best course of action for making title screen buttons and the (repeatedly mentioned) Gui not being in the way.


Steps I need to do:

1. Start up the game, Title screen loads the background with no bottom bar Gui blocking it.
2. Have the menu with a few buttons that I can control with keyboard arrow keys and press enter to select one
3. Once you select "new game" it will shift to another menu with a "create character" button (I'll add more options myself when I figure out the process)
4. A character creation screen where you can place stats, skills, age, name, etc.
5. Cutscene plays
6. Current map loads with the character stats implemented, including character graphic customization (very limited, will expand upon it)

I am very determined in continuing this project with pages upon pages of backstory/general ideas. I'm sure some of you have felt that inspiration where you work on a project night and day. I'm in charge of all coding since I have a background in it (hard to believe with how awful I am with this), soundtrack creation and sound effects. My friend at the Airforce Academy is especially good with artwork and storybuilding. I want to thank this forum for the people really out to help big projects get started. Rest assured your submitted responses will not be in vain and I'll eventually post a demo in a year or two so that you can see where your help went towards.
#16
Hey, I just had another quick question. Now that I have my Gui setup nicely, I just want the mouse cursor to change automatically when moving to it at the bottom.

Would I need to add something in the "#sectionstart repeatedly_execute" part of the globalscript or is there a better way? I am able to solve many of my problems with the included manual (incase anyone thinks to mention it). I just haven't quite got the gist of scripting.


Thanks again!
#17
I'm working on an RPG and have a bottom bar that is permanently displayed as the player walks around (using smooth scrolling & parallax).

I got it on the bottom by making a huge transparent block (the height of the game screen, 768 pixels). The problem is that the game doesn't let me click anything but the buttons. I can't make the character walk or anything unless I put the Gui at the top. I'm doing something wrong and making it harder than it is I'm sure.

If I set "Clickable" on the Gui as "False" then I have the desired effect where the bottom bar stays visible as I move the character around, BUT I can't click any of the buttons. If I set it as "True" then the only things I can click are the buttons of the Gui and I can't move the player. Hopefully this information is all that is needed for a solution to click.

Any responses are greatly appreciated! I can't continue production until I get past this small, but major, issue.
#18
I'm fairly sure this could be an easy fix. I was unable to find a solution so my apologies if it was obvious.

I'm just trying to make it where the sound clip of the character speaking starts right as the text comes up. Right now it's playing once I click out of the text that appears above the character.

My code:
Code: AGS

function Toilet_Interact()
{
  
  int state=Multi.Say("Look around. Can you see anything? I can't either.>I only remember where things are because my days are the epitome of redundancy.>I don't have to go and it's too dark.");
  if (state==1) aCell_toodark1.Play();
  if (state==2) aCell_toodark2.Play();
  if (state==3) aCell_toodark3.Play();

  
}
#19
I've been working at this for over a week and have searched all over to try and have the gui/inventory just like in Gemini Rue (on steam, made with AGS). If you play the demo you'll see exactly what I want for my game. 100% the same type of gui (obviously modified graphics and "move" instead of "kick")

I have the latest version of AGS and managed to modify the original verbcoin gui enough so that left click walks and right clicking brings up the Verbcoin Gui. The problem is that it's very glitchy and seems to crash far too often, so I suppose I can't read the scripting well enough yet (putting 100% effort into it though).

I need the Gui to do the following:

1. Left click makes the character walk and displays the hotspot name above and to the right of the cursor (not the middle of the screen!)
2. Right click brings up a hybrid verbcoin inventory where you can click "look, use, talk, move" and you can see items you've picked up right below those icons.

In other words, when you right click you'll be able to see the verbcoin gui and inventory. I only want right click to work on hotspots and not just anywhere on the screen. So if you right click on a blank spot/non-hotspot area then it won't do anything.

Does anyone have a nice template that they'd be willing to share so that I can get to this point? Once I have the gui set I can actually work on my storyline, scenes, rooms, characters, dialogue (the whole game) so I can't tell you how much this will help me.

Here is what I have right now as my VerbCoin Gui:
http://www.mediafire.com/?axd9ctg5udee3ha


Thanks so much in advance for any help!  :)
SMF spam blocked by CleanTalk