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 - Secret Fawful

#1
So- I've been at this for a few days now, and I'm about at the end of my rope. I have an object that leaves one room, moves across another room, and ends up in a third room. You can move the object from one room to another. From Room 1 to Room 3, and from Room 3 to Room 1.

The issue I'm having is in Room 2. I want to cut to that room, and have the camera follow the object across the room depending on which side it enters from.

By tweaking the code, I've managed to get the camera to pan from the left side of the room to the right side. The problem comes in when I try to get it to pan from the right side of the room to the left side. It just won't do it, no matter what variation of the code I try. I'll post the code here. I've been told this code should work, but the camera stays completely still on the right side of the room.

Code: ags
// room script file
int xpos = 0;
    
function room_Load()
{
  SmoothScroll_ScrollingOn();
  
  if (cartroom == 0)
  {
    xpos = 1000;
    cEgo.x = 1000;
    cEgo.Transparency = 100;
    oCart.X = 1056;
  }
  
  if (cartroom == 1)
  {
    xpos = 0;
    cEgo.x = 0;
    cEgo.Transparency = 100;
    oCart.X = -56;
  }
  
  if (cartroom == 2)
  {
    cEgo.Transparency = 0;
    oCart.Visible = false;
    oCart.Clickable = false;
  }
}

function room_AfterFadeIn()
{
  if (cartroom == 0)
  {
    oCart.Move(-58, oCart.Y, 5, eBlock, eAnywhere);
    cEgo.ChangeRoom(13, 156, 124);
  }
  
  if (cartroom == 1)
  {
    oCart.Move(1000, oCart.Y, 5, eBlock, eAnywhere);
    cEgo.ChangeRoom(71, 298, 388);
  }
}

function repeatedly_execute_always()
{  
  if (cartroom == 0)
  {
    SetViewport(xpos, 0);
    xpos--;
  }
    
  if (cartroom == 1)
  {
    SetViewport(xpos, 0);
    xpos++;
  }
  
  if (!oCart.Moving)
  {
    ReleaseViewport();
  }
}


I'd greatly appreciate any help with this. Oh, and I considered making the object a character instead and setting that to the player character, having the camera follow it across the room that way, but I wanted to learn how to control the camera via SetViewport, and this code should work. Somewhere there's a user error on my part.

I've also tried a variation that has this code instead-

Code: ags
function repeatedly_execute_always()
{  
  if (!oCart.Moving)
  {
    ReleaseViewport();
  }
}

function room_RepExec()
{
 if (cartroom == 0)
  {
    SetViewport(xpos, 0);
    Wait(1);
    xpos--;
  }
    
  if (cartroom == 1)
  {
    SetViewport(xpos, 0);
    Wait(1);
    xpos++;
  }
}
#3
Anytime I click on a GUI in my game, the screen flashes black for a split second. This has not always happened. I've looked through all instances of ProcessClick, eMouseLeft, on_mouse_click, etc. that I can think of. I've deleted extra GUIs I was experimenting with. I've checked all of my modules' code. I can not, for the life of me, figure out what is causing this, or how to stop it. Any suggestions at all where to look or things to try? At first, I thought it was just my new iconbar doing it, but I tested the other GUIs, and they all do it.
#4
I've been working on a GUI that has a Statusline on it. The problem is when I get into longer strings, such as using inventory items on hotspots, the text gets cut off. So I was working on implementing a marquee. I found code to help me get started...but I can't seem to get this to work at all.

Code: AGS

//top of Global Script  
int index;
String labeltext;
  String scroll_text(int i, int width, bool left){
  if (left && index>0)index--;
  else if (!left && index<labeltext.Length-width) 
  index++;
  return labeltext.Substring(index, width);
}


Code: AGS

function repeatedly_execute(){
  GUIControl*gc = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
  index=5;
  // put anything you want to happen every game 
  if (scrollDelay>0)scrollDelay--;
  if(!scrollDelay>0){
    scrollDelay++;
   if(labeltext.Substring(scrollIndex, 150))
     scroll_text(scrollIndex, 150, true);
   else scrollIndex = 0;
  }
  
  if (mouse.Mode == 0){
  //LabelOverHotspot.Text = "Go to @OVERHOTSPOT@";
  labeltext="Go to";
  labeltext.Append(Game.GetLocationName(mouse.x, mouse.y));
  LabelMotherHot.Text=labeltext;}

//etc.
}


Unfortunately, scrolling will not occur. I thought this way I could keep from returning the same substring in rep_ex every time, and now return a different substring so it would scroll....but I figure I'm doing something majorly wrong.
#5
Actually, I only have a few. I've basically had to just swallow my pride and come ask, because I can't seem to fix anything, and these issues have been plaguing me for a month or two now.

For starters, a music issue. Whenever I enter my eighth room, the music that is set to play in that room starts for a few seconds then stops. No other music will play in this room, and no music will play for subsequent rooms, until I get to the world map, which is several rooms later. I can't not find any code that is shutting the music off or interfering, and I have no clue what is going on.

Then there is the problem of the world map. I wanted to set it to where any click on the hotspots will make your character walk there and then change to that new room. However, all he will do is walk there, and any click does not actually do what I want it to do.

Third, I'm trying to get a character to try to punch another character, and then have that character dodge immediately. I have both animations, but I'm playing them separately. Unfortunately, this is not working out how I wanted it to. Should I make it one big animation instead of two separate ones, or can two separate ones work this way?
#6
All right, so I followed a similar topic from November on this subject, but that led me nowhere. I came to the conclusion I'm using this code all wrong, but I've used it the only two ways I can think of and it's still not working correctly. I'm wanting two characters or more to hold a continuous, non-blocking conversation in the background that starts once a dialog ends. Basically, I want to be able to start up such a dialogue from any point. Then if I leave and come back to the room, I want the dialogue to be running again. To accomplish this, I, of course, put the dialogue under repeatedly execute. Currently I was giving one of the characters a dummy inventory item, and then later I would take it away when I no longer wanted this conversation to happen in that room anymore.

Here is my code in the end of the dialog:

Code: AGS
cCharJack.Walk(83, 125, eBlock, eWalkableAreas);
 SetTimer(1,0);
 cCharJack.HasInventory(iInvDummy);


And then under Rep_Exec in the room itself-

Code: AGS
function room_RepExec()
{
  if (cCharJack.HasInventory(iInvDummy)){
  if(IsTimerExpired(1))
  {
    if(turn == 0)
    {
      cCharJack.SayBackground("You pompous @#%$!, just who do you think you are?");
      cRangSlim.SayBackground("I'm not going to sit here and watch you abuse your power.");
      cCharJack.SayBackground("Abuse my POWER! Huff! Huff!");
      cCharJack.SayBackground("You're lucky I don't split your skull!");
      cRangSlim.SayBackground("I've fought better men than you!");
      cCharJack.SayBackground("Who? The elderly?");
      cRangSlim.SayBackground("You are elderly! I can hear your dentures clattering!");
      cCharJack.SayBackground("Just who do you think you are, you %$@!?");
      cRangSlim.SayBackground("Don't you know who I am? I'm Steve Dedman!");
      cCharJack.SayBackground("Oh! Some puffed-up TV stooge, eh!?");
      cRangSlim.SayBackground("What did you call me, you big windbag!?");
      cCharJack.SayBackground("Windbag!?");
      SetTimer(1, 280);
    }
    else if(turn == 1)
    {    //etc etc.
      SetTimer(1, 150);
    }
    turn ++; //this is universal to all instances of dialog, so put here
  }
}
}


However, currently, the background dialogue will not play at all unless I remove the Inventory requirements, and then it will only play the final two pieces of dialogue, and at the same time. I want each piece of dialogue to play one after the other, and I want the characters to say them while animating. They do none of this. I know I'm horribly screwing this code up, so....what do I need to do to make this work? Because I can't find anything else on this. I'm honestly embarrassed to even ask because I know I'm doing this very, very wrong.
#7

A Screen 7 Game



Tech Demo - August 2013 - (45 MBs)

Perilous Plot

Deep within Ravenwood Forest lies Camp Ravenwood, a dangerous, dirty camp for delinquents,
owned by vampires, and run by Switchblade and his cruel and unusual biker gang.

By day, the campers are left to activities such as fishing, football, and swimming, but by night,
the camp becomes a place where death is around every corner. A headless maniac with an
axe stalks the camp, there are aliens and monsters lurking in the woods, and jocks and bikers
riding around waiting for any chance they can get to beat you to a pulp.

Enter Smoky Bumblerose, Germy Bumblerose, Benny Berkybile, and Franky Flynnigan, four
ex-scouts accused of starting forest fires. Can they use all of their wits and survive-



Horrified Heroes

Smoky Bumblerose



A boy with an overactive imagination whose favorite pastimes are
daydreaming and telling a good yarn. Murphy's Law follows him
everywhere. He's not as smart as Benny or as brave as Frankie,
but he always gets pushed into situations requiring enormous wit
and bravery. His snarky and insulting sense of humor gets him and
his friends into constant trouble.


Germy Bumblerose



An amoral, mischievous lunkhead with no sense of danger. Keep him
away from anything flammable or sharp and in the name of all that is
good and decent don't let him near the candy and caffeinated drinks!
Or do. His brother has to keep a constant eye on him to keep him
from getting himself killed. :=

Franky Flynnigan



A tough Irish punk who fights first and never asks questions later, because
you're too busy swallowing your own teeth to answer any. He's brave to the
point of bring stupid, and would probably fight the devil himself head on and
win. He's the oldest member of his troupe, and he has a huge soft spot for girls.

Benny Berkybile



A stuttering coward with a runny nose that shrieks at the first sign of danger.
He screams. His nose shrieks. While not the best character for any adventurous
situations requiring bravery in the face of death, he is the smartest character.
He gets picked on daily in class for being the only person in his school to ever
faint at the sight of his own shadow. Ironically, due to his fast legs, he's
also the only character who is almost unkillable.

B.B. 'Bitchy Barbara' Carpenter



Bitchy Barbara lives up to her name in every way imaginable. She has a bad attitude,
a punk look, a mean streak, a short temper, and a cruel sense of humor. Barb is a
prickly character, and a boy-hater, but she knows more about what's going on at
Camp Ravenwood than any of the other main characters. Gaining her respect is
key to survival, but it won't be an easy task, especially since she has a mean grudge
against one Smoky Bumblerose. She'll happily break you if you get on her bad side.

Spooky Screenshots







-Elements shown may or may not change in the future-

Fearful Features

A video game that takes influences from classic adventure games by Lucasarts and Sierra.
Classic slapstick and routine based comedy inspired by things like Abbott and Costello and Monkey Island.
Spine-tingling horror inspired by monster movies of the 50s and slasher films of the 80s
A large, mostly non-linear area resembling classic Lucasfilm games like Monkey Island and Maniac Mansion
A cast of creepy and cool characters who may or may not want to rip your head off and eat your insides.
Danger at every turn and gory death awaits; can your tummies handle it, you big sissies?
Horrificly hard puzzles. I'm not taking it easy on anybody. My goal is to make all of you cry for your mommies.
Currently planned at around five playable characters- we'll see how that turns out.

Devilish Development

Story: 60%
Scripting: 6%
Graphics: 18%
Sound/Music: 0%

The game is in an early phase, but I figured I'd get it out there, get some feedback, and see
what people think of it so far. I'm working on it daily, so I expect progress to be pretty steady.

Expected completion date: What is this, a baby? Get out of here.

Demonic Development Diary

March 8th, 2011-
I've made public mention of my chronicling of the disturbing events surrounding the camp at
Ravenwood Forest. I hope HE doesn't find me before I've managed to tell the entire horrifying
tale. GASP! What was that!? I...I thought I heard a noise outside. It must have been the wind...

July 4th, 2011-
After hiding out in the woods for a few months I've managed to get a small meager message out.
Sometimes I wonder if the tale is too terrifying to tell to humanity, but I press on...

April 25, 2012
I've barely survived months by eating raw twigs and berries, but using the more poisonous ones, and a flipbook made from leaves, I've constructed a step by step video of the making of a scene in the game.

The Making of the Crossroads

A piece of music from the game is also showcased within. The game IS getting made.
(Music samples: http://soundcloud.com/mods1984/sets/a-night-at-camp-ravenwood-1/ )
#8
I drew this background about a month or two ago, but just got back to adding the brick walls to it to add more noticeable exit boundaries. But now I don't know what else to add. It still feels empty, yet I can't think of anything else that would go on the background. Some help would be mighty appreciated.  :)

Made in Deluxe Paint 4.


#9
I have a MAJOR question, and one that has been plaguing me since the creation of my game. How do you get the background to go in the middle of the screen, instead of the top left. My background image size is 200 by 100, and the game is of a 320 by 200 resolution. Thank you so much. ;D
#10
Yo, I have a background here, and I need to know if I've nailed the Sierra style or if I've just barely grazed it yet or what. C&C is much appreciated, thanks. ;D The background is of the inside of a ship.

#11
All right. I need help with three problems. Problem one. I can't get the Inventory to pop up using a right click like MI 3, Number 2, as of now the inventory is visible, just for testing, but I can't select an inventory item, as in clicking it, it turns into the mouse cursor, I use it with an object. And three, I can't get any of my buttons to work, aka, look, use, ok, and the up and down arrows. In other words, no code I've tried has worked, and yes I've scoured the rest of these forums for codes, but none of them work. Plus whenever I add in a code using the line if, it says I've had a parse error. So, what do I do?
#12
Congratulations to KhrisMC and Krysis for they're wonderful entries.  ;D


And on that note this weeks topic is...what if your musical instruments came to LIFE.



Max size is 150 by 150. No color limits.



Enjoy, and here's a piece of example art to get your hands a spriting.  ;D

#13
The other day out of boredom, I took pixia and a few random reference pics, and pixeled some of the characters from my favorite anime, Full Metal Alchemist. I drew Ed, Greed, Lust, and Gluttony in that order. Here they are, and let me know what you think of them. Personally, I think Lust could use some improvement as could Ed, but I really like Greed and Gluttony.




#14
I made an error, could this be locked till I can fix my error???
Sorry. :'(
#15
Hi, I am going with a whole new style now, and I need a C & C on it. I am wondering on soem things. First, the clouds. There is something not right about them. Next, the castle. I am wondering if it might be a bit, too jagged. Next, I am wondering how the colors in the sky look. And lastly, something in the moon is missing. Be reminded that not all of this is finished, but I need C & C on some of the finished parts. Namely, the ones I have listed. Thanks
and let me know what you think. :D
http://www.2dadventure.com/ags/skycastle1.jpg
#16
When I try to add my music files to the game, I get an error message saying the files were unable to be added cause they are an LFN. What is an LFN??? And how do I fix this problem???
#17
I have a problem. I am trying to get the character to first display a message, then go to a certain spot in the room, then display a message again, then appear in a different room.  The last two things don't happen. He just stays stuck where he is and never does what he is supposed to do.
#18
Whenever I try to save a room in my game or when I try to save a game I get this message
"There was an error compiling your script. The problem was.
In: 'internal built-in header'
Error(line 480): 'MouseState_readonly' not allowed inside struct declaration.

What do I do??? :'(
#19
How do I add the MI3 template to my game. I have looked and have not been able to find out how. Thanks
#20
Does anyone know of a site where I can download Call of Cthulhu-Prisoners of Ice BESIDES HOME OF THE UNDERDOGS. Thanks ;D
SMF spam blocked by CleanTalk