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

#41
I recently suffered a hardware crash, but managed to salvage the contents of the harddisk. So now I have everything in a folder and need to reinstall AGS. How to go about reinstalling when I don't even know where in the folder the source code is? I saved all my artwork, and the executable, but I need the coding back on track. How do I do that?
#42
I want to add a button that lets me re-load any room's room_Load(); script.

If I simply tell the globalscript to do the function room_Load(); whenever I press a certain button, it does not recognize the function, since the function room_Load(); is in the local room script, not the global script.

I tried this in the global script to work around it:

Code: AGS

function roomupdate();
  {
  room_Load();
  }


but it doesn't work.
#43
I have made a bool determining whether or not the player character has noticed a certain feature on the person he's talking to. If so, a dialog option will be available.

However, the dialog does not recognize the bool.

I would do this:

Code: AGS

@S  // Dialog startup entry point
narrator: You inquire about...
 if (seentattoo == true)
 {
 option-on 2
 }
return


I have defined the seentattoo bool in my globalscript and exported it. I have imported it to the room where the dialog is taking place. Am I missing something here?
#44
Ok, I'm trying again (I keep overloading my questions with useless info).

Question: How do I code in a function that tints the whole screen, or at least a region of the screen (so my status bar is unaffected) in a darker, bluish colour, indicating nighttime? It should be pretty simple, right?

I've tried using light level for a region (only the character is tinted dark, not everything else), and the SetAmbientTint function (stil only the character is tinted).




You can see my first postings further down, (but they're made before I tried hard enough by myself):

Quote
I'm doing an animation where cEgo is being manhandled out a door. That all works fine, with the simple tools I have available. Now, as an experiment, I'm trying to also tint the screen, so that it looks like nighttime when he is thrown out.

I use this in my code:

Code: AGS


function room_Load() //preparing animations setup before fadein
{
if (thrownout == true) //if bool says ego is being thrown out
  {
  SetAmbientTint(0, 0, 250, 30, 100);    //no red, no green, 250/255 blue, 30% blue saturation, half illumination. Look like nighttime?
  cEgo.LockView(25); //the real cEgo being invisible while animation is playing. View 25 is an empty frame.
  object[1].SetView(19, 1); //bouncer seen in doorway
  oThrownout.SetView(35, 0);  //object looking like cEgo grabbed by the neck, displayed in front of object looking like bouncer
  }
}

function room_AfterFadeIn() //now for the actual animations
{
if (thrownout == true) // if bool says ego is thrown out
  {
  Wait(10); //cEgo helpless in the arms of the bouncer
  cEgo.FaceLocation(85, 190, eNoBlock); //real cEgo looking downwards, preparation for when he is visible again
  object[8].Animate(0, 5, eOnce, eBlock);  //object looking like cEgo thrown and landing on street
  ShakeScreenBackground(5, 8, 20); //ouch, for 20 game rounds
  Wait(40); //lock game while screen is shaking for the 20 rounds, then continue lock further 20 rounds while bouncer is standing in the doorway, admiring his handiwork.
  object[1].SetView(19, 0, 0);  //image of closed door, no animation
  Wait(120); //the object looking like cEgo is lying around a bit longer
  object[8].Animate(2, 10, eOnce, eBlock);  //object looking like cEgo coming to his senses and slowly getting up
  oThrownout.SetView(35, 1); //object[8] looking like cEgo turned invisible
  cEgo.UnlockView(); //cEgo visible and ready again at the spot where object [8] becomes invisible
  }
}


All the animations works like they should. But there are two problems:

-The screen doesn't tint until all the animations have finished playing. This may have connection to the second problem:
-Only cEgo is tinted. Everything else is not.

I want to tint everything, the whole screen. So, according to the manual, I should use the SetAmbientTint. What am I doing wrong?

EDIT: Sorry for not reading thoroughly. The manual says only objects and characters are tinted.
However, I'm still puzzled as to why only the character is tinted. Objects are not. Can anyone explain why?

[quote/]
#45
I want my character to be pursued by a monster across the screen. Part of the puzzle is to figure out how to get around the monster.
I made the monster a character, gamewise.

Anyway, to have the monster pursue the character, I'm trying with this code:

Code: AGS

function room_RepExec()
{
cMonster.FollowCharacter(cEgo);
}


It works, but the monster reacts very slowly indeed, and only changes direction towards the character at long intervals, making it much too easy for the character to walk away and around the monster.

I also tried this:

Code: AGS

function room_AfterFadeIn()
{
cMonster.FollowCharacter(cEgo);
}


but that made the monster's response time even worse.

Any suggestions as to how I can make the character "cMonster" more effective in pursuing the player character?
#46
A question from a hopeless newbie:

I want cEgo to sit down on a chair.
So I make a function when interacting with the chair resulting in Ego walking to the chair (blocking walk), then setting the chairs view to a picture having ego sitting in it.

So far, so good. The chair now looks like Ego is sitting in it.

But what about Ego himself?
Well, I try to make him invisible by setting his transparency to 100, but he can still walk around, open doors, leave the room etc.
Is there a way to make the transparent Ego rigid while he is "sitting in the chair", or am I missing something real simple here?




Example from my room script. Its working, apart from the invisible poltergeist cEgo stalking around:

Code: AGS

bool isegoseated;

function room_FirstLoad()
 {
 isegoseated = false;  //ego is not sitting down yet
 oChair.SetView(24, 0);  //empty chair
 }


function oChair_Interact()
 {
 if (isegoseated == false)
   {
   cEgo.Walk(147, 123, eBlock, eWalkableAreas);
   cEgo.Transparency = 100;  //ego poltergeist
   oChair.SetView(24, 1); //ego in chair
   isegoseated = true;
   }
 else
   {
   cEgo.Transparency = 0;
   oChair.SetView(24, 0); //ego not in chair
   isegoseated = false;
   }
 }
#47
Site & Forum Reports / But report in AGS
Tue 19/02/2013 21:04:47
Not sure this is the relevant forum, couldn't find any on bug reports, I just got this message when shutting down my most recent exe of the game I'm working on, here goes (couldn't replicate the error):



Error: Object reference not set to an instance of an object.
Version: AGS 3.2.1.111

System.NullReferenceException: Object reference not set to an instance of an object.
   at AGS.Editor.ScintillaWrapper.scintillaControl1_MarginClick(Object sender, MarginClickEventArgs e)
   at Scintilla.ScintillaControl.DispatchScintillaEvent(SCNotification notification)
   at Scintilla.ScintillaControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
#48
I have made an attempt at using money in a game, and have gotten quite far, I think. However, I stumble upon a couple of hurdles now. I hope someone out there will answer me these two simple questions.


First, bear with me for not being a tech. I have attempted to read the manual, but I must admit, the wiki on using money in the game was just about useless to me, being a newbie. I was looking for a quick "how-to" way. All this talk of strings, variables, ints and all that jazz just gets me confused. I need to see things working by example before I can wrap my mind around the theory (what on earth is an int, unless you've seen what it looks like in the script?). Happily, there have been many posts on this topic.

Thanks to TerranRich for a post from 2004 informing me of how to setup the inventory so I can count my money by looking at them in the inventory screen. And to Jordan, also from 2004, for telling me to use the global script to fix the amount of money from the beginning of the game. And to someone I don't remember for showing me a working way of deducting and adding amounts of ANY sort of inventory, without (very) complicated codings in the global script.

Anyway, I made an inventory item called iMoney, imported a sprite with a picture resembling gold coins, made another inventory item called iApples, imported a sprite for that, too, and ended up with this in my global script:


// In the global script, somewhere under
function game_start() {   
// I put this:
  player.InventoryQuantity[iMoney.ID] = 30;

// and somewhere further down I put this:
function iMoney_Look()
{
Display("You have %d golden coins!",player.InventoryQuantity[3]);
}
//since my gold coins is inventory item no. 3.

// For buying apples at the farmer's daughter (the character Hilde), I scripted this:
function cHilde_UseInv()
{
if (cEgo.ActiveInventory == inventory[3]) {  //here I use the inventory item iMoney on Hilde
if (player.InventoryQuantity[iMoney.ID] > 0) {  //and only if there's still at least one left
cEgo.Walk(265, 175, eBlock);   // Character walks up to the stand
Display ("You buy ten apples for a silver piece");
player.InventoryQuantity[iMoney.ID] -= 1;   //paying the cost
player.InventoryQuantity[iApples.ID] +=10;   //and receiving said and paid apples
UpdateInventory();  //dunno what this does, but I dare not leave it out.
}
else Display ("You don't have any money!");
}
}

// And for keeping track of same apples (inventory item 2), I have:
function iApples_Look()
{
Display("You have %d small apples from last Fall's harvest",player.InventoryQuantity[2]);
}



IT WORKS! What a feeling. This has taken me hours to set up right. Now I can do this with more shops    :)


For my question # 1:
Now, I would like very much to have my moneybag present in my inventory, even when the count is 0! At present, the iMoney sprite disappears from my inventory when it reaches 0, until I find some more. Can I have it just sit there being empty, telling me that I have 0 coins, when I look at it?


Question # 2:
Second, I would like to be able to put this script in with a dialog, so I can buy apples by choosing that topic in a dialog, with the obvious bonus of being able to choose from different wares from the same seller. I figured something like this might do it (assuming I initiate the dialog by for example clicking the iMoney inventory item on the seller):

// Dialog script file
@S  // Dialog startup entry point
narrator: Would you like to buy something?
return
@1   //choose topic: apples
{
if (player.InventoryQuantity[iMoney.ID] > 0) {
Display ("You buy ten apples for a silver piece");
player.InventoryQuantity[iMoney.ID] -= 1;
player.InventoryQuantity[iApples.ID] +=10;
UpdateInventory();
}
else Display ("You don't have any money!");
}
return
@2   //choose topic: nothing
narrator: You decide to buy nothing after all.
stop

But something is horribly wrong here. It seems I can't just adopt the same approach when it comes to dialogues. Am I totally on the wrong track here, or am I missing some small but vital detail?




#49
Havin trod my first steps into this brave new world of custom adventures, I have made a couple of dialogues, and am not so happy with the result. They are presented by red text on a black background, and with just a few topics to choose from, the dialog window fills out the whole screen.

How do I make dialogues sierra-style with the dialog options in a window in the middle of the screen?
#50
I've been a fan since the very first time I landed in Spielburg. Granted, the fourth of the series was unearthly great, but the first one always had a special place in my heart. The openness of the game (all the little silly things you could do that wasn't really necessary), the innocent way of going on adventure for the fun of it (hello there, I'm trying to be a hero), and the sad story of the land falling to pieces with the local lords' grief.

And as I explored all the ins and outs of the game, and finally after years and years of casual replaying every once in a while, finding out where those last puzzle points were hidden, I also had an itch to do stuff that was sort of hinted at in the game but not really there. I guess we can all remember the log in the woods, yes?

So what's on your "would have liked to do"-list for this game?


Here's mine. I would have liked:

* To open the workshop door and find someone working there, perhaps a dwarf hammering at something

* To burglar the workshop at night

* To visit the rest of the shops

* To search the big log in the forest and find something there (actually, I remember having a dream about this once)

* To give the little old lady a kiss on the cheek

* to fight Otto

* To come back to the kobold's cave for the showdown

* To have the brigands inside the fortress courtyard fire arrows like they do in the hidden valley

* To grab a skull off Baba Yaga's fence

* To best the Sword Master. No wait, I did that already. Beat the antwerp, then. No, by golly, I did that too   :)

* To swim in the Spiegelsee

* To actually play a game of cribbage with Henry, not just being told about having played

* To nick something from Erasmus' livingroom

* To buy the shield in the dry goods store. Oh my how I've wanted that shield.

* To get a sword for the thief (I know, you can tweak the character generation to give a fighter the thief skills, but he can't enter the thieves' guild)

* To search the brigand leaders room just a little more.

* To strip the dead goblin of equipment. I want that mace

* To enter the goblin cave and go berserk

* To enter the meep tunnels (fortunately, you can do that in QfG 4½)

* To have a romance with the dryad

* To feed the vegetables to the horse


Whev, that was quite a bit. And that was just in a few minutes' brainstorming.
#51
First posting, wanted to try out the AGS game editor program.

I just downloaded AGS but cannot seem to start the program. When I do, I am told that I need the .NET frame vers 2 or higher installed. The "Ok" button brings me to an outdated site in the microsoft download area. So I googled and installed .NET framework vers 4. But I still get the error message. How can I bring AGS to life?

I am running winXP.
SMF spam blocked by CleanTalk