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

#41
Hi, quick question, hopefully someone can help me out. Is there a way to temporarily change where dialogue is displayed on the screen? I'm using the Lucasarts template which came with 3.4. I have a scene where I would like different lines of dialogue to be displayed at different points on the screen (ie not directly above the character's head).

I have thought about using character.SayBackground, but I'd rather it was blocking as it's part of a cutscene, not to mention the fact that doing it that way would necessitate me creating several invisible characters.

Thanks in advance!
#42
Thanks for the advice guys, and yes I'm still learning. Cheers again!
#43
Hi, this is kind of difficult to explain but here I go..!

I've got a fire as an object in a room, and my character can throw various items into it. However, at one point he'll be carrying a large item (item 14 in the below script), and I want him to not be able to use any other inv items on the fire while he is carrying this item. Here is a sample of the script I've been using - this is the script for using item 6 on the fire, though the script is near identical for the other items.

Code: ags


  //USE INV
    else if(UsedAction(eGA_UseInv)) {
          if(player.ActiveInventory==inventory[6]){
            if (cEgo.InventoryQuantity[14] > 0){
            player.Say("Not while I'm carrying this thing.");
          }
          
      else player.Walk(280, 130, eBlock);
      player.FaceDirection(eDirectionRight);
      cEgo.LockView(48);
      player.LoseInventory(iplun);
      Wait(10);
      obang.SetView(28);
      obang.Visible=true;
      obang.Animate(0, 3, eOnce, eBlock);
      obang.Visible=false;
      Wait(10);
      player.UnlockView();
      cHip.FaceCharacter(cEgo);
      cHip.Say("What was that?!");
      player.FaceCharacter(cHip);
      player.Say("Nothing!");
      player.Say("Fire just burped, that's all.");
      GiveScore(1);
        }
    }



My problem is that he displays the correct dialogue line ("not while I'm carrying this thing") and then goes ahead and does the action anyway. I've done a similar script for most other items as well, and it does the same thing - and then runs the "else unhandled" part of the script too. I fear it might be a closing brace issue, but can't seem to sort it.  I'd appreciate any advice you might have!
#45
Hi guys, hope you can help. I'm putting together the interactions for one of my NPCs and I've hit a snag. When I "talk to" the character I want it to trigger dialog 2. I also have a couple of interactions for using a couple of inventory items on the character. My problem is that when I "Talk To" the character the game first displays the part of the script conditional to my using inventory item 6 - from this statement:

Code: ags

if (player.ActiveInventory==inventory[6]){


..before running dialog 2. Where am I going wrong? Full script for the NPC is below.

Code: ags


function cHip_AnyClick()
{
// TALK TO
  if (UsedAction(eGA_TalkTo)) {
    dDialog2.Start();
  }

  // LOOK AT
  else if(UsedAction(eGA_LookAt)) {
    player.Say("That's Thursleigh Worplesdon.");
    player.Say("I know him through Michelle, they were on the Creative Writing course together.");
    
     }
  // OPEN
  else if(UsedAction(eGA_Open)) {
    player.Say("I'll move him, alright.");
    player.Say("Into the path of a runaway steamroller.");
     }  
  // CLOSE
  else if(UsedAction(eGA_Close)) {
    Unhandled();
  }
  // USE
  else if(UsedAction(eGA_Use)) {
   Unhandled();
  }
  // Push
  else if(UsedAction(eGA_Push)) {
    Unhandled();
  }
  // Pull
  else if(UsedAction(eGA_Pull)) {
    Unhandled();
  } 
  // PICKUP
  else if(UsedAction(eGA_PickUp)) {
    player.Say("I'd quite like to ransack his house, but I'll leave this fool here.");
  }
  // GIVE TO
  else if (UsedAction(eGA_GiveTo)) {
    Unhandled();
    }
  
  }
  //USE INV
  else if(UsedAction(eGA_UseInv)) {
    if (player.ActiveInventory==inventory[5]){
    player.Say("It's very tempting, but a little too blatant.");
    }
  }
    
    if (player.ActiveInventory==inventory[6]){
    player.FaceCharacter(cHip);
    player.Say("Hey Thursleigh!");
    player.Say("I found something really retro and ironic you might like!");
    cHip.FaceCharacter(cEgo);
    cHip.Say("Oh wow!");
    cHip.Say("really?");
    }
    

}
[code]
#46
Haha that one missing {, typical! Thanks! Solved.
#47
Tried that, and now the action just doesn't happen at all. The command highlights in the action bar but the character doesn't move and nothing else happens!

I think it's getting itself into a loop where I change the variable at the end of each section, and it's just going ahead and reading the next bit after the variable has been changed. I also tried putting in a return; command to try and get it to stop after the first action, but that didn't work either.
#48
Hey all hope you're well.

I've done a bit of script for a hotspot. Actually it`s some cooker controls and I want them to turn off and on a hotplate. I want the computer to check a variable (cookervar) to tell whether to turn the hotplate on and off. When cookervar is at 0, the cooker will turn on on when the "use" command is used, and the cold hotplate hotspot will turn off and be replaced by an object representing the hot turned-on hotplate. This part of the script also changes the cookervar to 1 so that the next time the player uses "use", the hotplate object will be removed and the cold hotplate hotspot will come back on.

I fear I'm missing something obvious but I can' find what it is. The hotplate object switches on fine but when I turn it off it disappears for a second and then comes back on. Here's my script, please put me out of my misery.

Code: ags

function hocont_AnyClick()
{
  
// LOOK AT
    if(UsedAction(eGA_LookAt)) {
      player.Say("Stupid electric cooker.");
    }
    // USE
    else if(UsedAction(eGA_Use)) {
      if (cookervar == 1)
      cEgo.Walk(96, 132, eBlock);
      cEgo.FaceDirection(eDirectionUp);
      Wait(10);
      hhplat.Enabled=true;
      oHot.Visible=false;
      cookervar = 0;  
    }
    
      if (cookervar == 0){
      cEgo.Walk(96, 132, eBlock);
      cEgo.FaceDirection(eDirectionUp);
      Wait(10);
      hhplat.Enabled=false;
      oHot.Visible=true;
      cookervar = 1;
    }
    

    // OPEN
      else if(UsedAction(eGA_Open)) {
      player.Say("It doesn't move.");
          }
    // Pull
    else if(UsedAction(eGA_Pull)) {
      Unhandled();
    }  
    // PICKUP
    else if(UsedAction(eGA_PickUp)) {
      Unhandled();
          }
    //USE INV
    else if(UsedAction(eGA_UseInv)) {
      Unhandled();
    }
    
    else Unhandled();
}
#49
Khris that`s done it cheers. All problems solved. For now...!
#50
Yeah that`s what I tried. Going into the global script on the older version with the MI template would have given me a chunk of script where I could relabel the displayed commands, and have for example, "Pick Up" replaced by "Steal" or something. I`ll clarify it`s literally just the command line where I need this, I`ll design my own sprites for the buttons with my own words on them later.

But yeah, clicking on the script in the properties panel for the various GUI buttons sends me to this:

////////////////////////////////////////////////////////////////////////////////////
// GUI handling
////////////////////////////////////////////////////////////////////////////////////

function Action_Click(GUIControl *control, MouseButton button) {
  Action tempbutton = getButtonAction(control.ID);
  SetAction(tempbutton);
}

Which doesn`t have an obvious way to change the word to be displayed in the command line.
#51
Sweet, thanks a lot. It`s been a while, it`s kind of like relearning how to ride a bike, it looks obvious in hindsight! Cheers. Anyone got any ideas regarding the GUI question?
#52
Hi all, I`ve got back into AGS after a long break, and have to say the new version (I`m now using 3.4) is giving me brainaches that my trusty old 2.72 could only dream of.

So I`ve got two questions: how do I do nonblocking object animations, eg a fireplace or a flag waving in the wind? I set the object`s view before screen fadein then put the animation command in repeatedly execute, and the object animates but the cursor is gone and I can`t do anything.

Second question - changing the GUI labels. I`m using the default Lucasarts template which comes with 3.4 but it behaves quite differently to the old proskritos MI template I was used to. I want to put in my own simplified version of the gui where I basically combine push, pull open and close into one command called "move". I need to know how to change the label in the command line (and the colour too now I think of it) - can`t seem to find where to do this in the global script.

Thanks, hope you`re all well.


#53
I've had a look at the savegame issue, and it'll be sorted in the final game. Not sure how it slipped through the net! Ah well.

I'm also aware of the dialogue problem whereby if there's too many dialogue options, the bottom one tends to get cut off at the bottom of the screen. I'm working on that too.

If anyone finds anything else, let me know!
#54
Well, it's been a while, but it's time to unleash this beast upon an unsuspecting public.

I've actually had the demo lying around for a while, but haven't quite got round to uploading it until now. Anyhow, here it is. It comprises part one of the game. I'm mired under a lot of Uni work at the moment, so I probably won't start working on the rest of the game until April at the earliest, so make it last!

http://www.filefront.com/user/duckbutcher

As always, feedback is welcome. Cheers!
#55
Just a quick bump....I need a couple of beta testers to give the game a test drive. PM me if interested...!

Just to clarify, it's not the full game, just the demo, or Part One. The full game is still some time off yet...
#56
Quote from: Ascovel on Sun 23/08/2009 02:39:26
Quote from: Duckbutcher on Sun 21/06/2009 16:25:41
* Soundtrack from obscure 1980s cartoon classic "The Mysterious Cities Of Gold"...if I can get away with it...

How can a classic be obscure? Everyone knows that soundtrack. Unless you are thinking of the Japanese version of this anime which had completely different music, but not particularly memorable.

Really? I don't think everyone knows that soundtrack or the show at all! It's pretty obscure. Like Ulysses 31 was obscure, or Jayce and the Wheeled Warriors. Everyone of a certain age knows the Transformers theme song, for example, but I think those same people would be hard pressed to remember the two I just mentioned. I'm talking about people in general, not just the type of people such as you and I who hang around internet forums. We could ask for a show of hands if you like but that might be descending further into pedantry.

Nevertheless, I really like the soundtrack and hope others do too so I've used some of it in the game.

#57
Just bunged a new screenie and an update in the first post. I've missed the release date, but the game will hopefully surface in the next couple of weeks...!
#58
Snake - I've re-jigged the main post a little, hopefully it now gives a bit more info.

Swordofkings - It was my intention early on to put in a basic FF style turn based battle system for the world map. I disregarded it early on as it might have been over-egging the pudding a bit, plus, it'd be a brainache to program. It's an interesting idea though, as I think I've yet to see a graphic adventure with an RPG battle system...

Dualnames - Ha, thanks for the vote of confidence! If I am being brutally honest (which I am), despite the fact that there ARE one or two little graphical rips rips in the game, It's 95% my own work...! Honest, guv. The textures on the walls  and the trees etc in the screenshots, all painstakingly done by me!
#59
See the bottom of the post for info and link to the demo!




"It's hard not to believe in the Gods when they float over your head in a palace of blue crystal..."

In the far-off magical land of Raithe, Eric Moufflon is a simple Latherham farmhand with dreams. He's got a silly name, a big nose and he's scared of cows. But he gets more than he bargained for when he sets off on the road to great adventure.

Raithe is a complex, God fearing world, a world in which science and technology are shunned and those who support these new additions to Raithe's strictly magic-driven theology are looked on as fringe fanatics. Eric will have to contend with these conflicts. But if that sounds too heavy, he'll also have to contend with carnivourous vegetables, sadistic shopkeepers, buffet-obsessed sailors and spider-librarians.

Inbetween lying to his Adventurer's Club Contact about a) his physical prowess (he doesn't have any) and b) the size of his sword (he left it at home because he thought someone might steal it), Eric must wander around the countryside picking up lots of improbable but oddly useful items while learning some valuable lessons about faith, friendship, fun and flapjacks, and just WHY no one ever put a projectile weapon in an adventure game.

And finally, perhaps he will discover the secret reality behind his world...the secrets contained within the mysterious Apostolic Megalith, a gigantic floating prism of pure crystal which is said to house the Gods themselves...








OK, here's a new game. Sort of. It's going to be an episodic thing, and the first part has the tentative release date of August 7th. I'm on summer holidays at the moment though, so with more time on my hands it may come out sooner, it depends....

Eric and the Apostolic Megalith is sort of a love letter to the games I loved playing when I was younger...Monkey Island, Simon the Sorceror, Final Fantasy....while I wouldn't say there are any "homages" in there (read rip-offs), hopefully the game itself will offer similar feelings to those games which inspired it. Puzzle-wise, I've tried to capture the surreal-yet-makes-perfect-sense attitude of some of the best MI puzzles. Time will tell whether I got it right or not! Watch this space for updates, as ever....!

Progress:

Graphics = 90%
Story = 100%
Programming = 75%

Estimated completion date = Jan 2010.

Features:

*Classic SCUMM style interface
* Real-Time Sub-Games
* Fancy Cartoon interludes.
* Ludicrous slapstick routines.
* Pretentious back story, subtly offset by wacky humour...
* Talking vegetables.
* 95% non-ripped graphics.
* Soundtrack from obscure 1980s cartoon classic "The Mysterious Cities Of Gold"...if I can get away with it...

EDIT 20th Aug. Well, I missed that release date, largely due to moving house and celebrating my 30th, but the game should be seeing light of day in a couple of weeks. In the meantime, here's a new screenie....



EDIT JAN 25th

I've actually had the demo lying around for a while, but haven't quite got round to uploading it until now. Anyhow, here it is. It comprises part one of the game. I'm mired under a lot of Uni work at the moment, so I probably won't start working on the rest of the game until April at the earliest, so make it last!

http://www.filefront.com/user/duckbutcher

As always, feedback is welcome. Cheers!


#60
"Error Line 738 Undefined symbol 'gInventory'."

It seems I'm doomed to be foiled repeatedly on this one.

Could the fact I'm using the Proskritos MI2 template be relevant in any way?

EDIT: I got rid of a couple of lines, specifically the ones which I believe refer to the mouse icon mode and the inventory window, as with a lucasarts template, these would be irrelevant:

   if (cEgo.ActiveInventory == iMouse) //has user selected mouse?
  {
    cEgo.LoseInventory(iMouse);
    cMouse.x = cEgo.x + 20;
    cMouse.y = cEgo.y;
    cMouse.on = true;

   
  }

The game starts without error, but when I attempt to "Use" the mouse, the game crashes and says :

Error: run_text_script1: error -6 running function 'repeatedly_execute':
Error: Null pointer referenced
in Global Script (line 265)
from Global script (line 710)

The lines it mentioned are as follows:

265:  madetext=String.Format("%s%s %s ", madetext, RemoveExtension(player.ActiveInventory.Name), Tmode[mode].preposition);

710: UpdateActionBar(mouse.x+GetViewportX(),mouse.y+GetViewportY());

Sorry, this seems to be going on for ever and ever...
SMF spam blocked by CleanTalk