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

#61
Thanks a lot for your help. I'm using AGS 2.71, but I'm sure I'll be able to get this working.

I was hoping to have the function activated simply by "Using" the item, rather than "using it on" something, ie a hotspot,  that way it would work in any room and wouldn't be tied to a specific one.

I may have to go away and re-think the whole puzzle! Thanks for the code though, I'm sure I'll be able to use it in some capacity.
#62
Quote from: dkh on Fri 12/09/2008 16:48:55
Code: ags

if (GetGraphicalVariable("ratvar" == 1) 


should be:

Code: ags

if (GetGraphicalVariable("ratvar") == 1) 


Yep, already adressed that, thanks. The problem is with the "if" at the moment.

Thanks though!
#63
It's the same code I put in an earler post. It's in the repeatedly execute section of the global script. It finds fault with the "if" on the first line, and if I remove the "If" it throws up errors about everything else too...

//-----------------------------------------------------
   if (GetGraphicalVariable("ratvar" == 1) {
   SetGraphicalVariable("ratvar", 0);
    cEgo.LoseInventory(iMouse);
    cMouse.x = 150;    //or wherever you want the mouse to be
    cMouse.y = 125;    //or wherever you want the mouse to be
    cMouse.on = true;
  }
//-----------------------------------------------------

Using the mouse on a region on the ground is something I may have to do as a last resort, but I'd rather have the action triggered just by clicking "Use" and then "Mouse". The puzzle in question involves something coming out of a hiding place to chase the mouse, you see, not having the mouse "used" ON anything in particular.

Thanks so much for your help. I've been using AGS for two years now, and still come unstuck on script issues like this, so your assistance is much appreciated!
#64
Quote from: paolo on Fri 12/09/2008 16:16:49
You have an extra ) in the following line:

Code: ags

SetGraphicalVariable("ratvar"), 0);


I think it should probably be:

Code: ags

SetGraphicalVariable("ratvar", 0);



It still says "unexpected if"!

#65
Thanks for all your help guys, and sorry if I seem a bit dim, but I'm still stumbling! I've had a bit of a mess about with this (I had to change emodeUseInv to eModeUse in the end as I was still getting an error, even with the spelling correction).

This is how the first bit of code is looking:

// script for Inventory item 16 (Clockwork Mouse): Use inventory item
 
  // script for inventory 16. Interact inventory item
if (Mouse.Mode == eModeUse && cEgo.ActiveInventory == iMouse)
{
    cEgo.LoseInventory(iMouse);
    cMouse.x = 150;    //or wherever you want the mouse to be
    cMouse.y = 125;    //or wherever you want the mouse to be
    cMouse.on = true;
}

This doesn't seem to work. It's doing something though, because the "Use" command isn't followed by the "Use Mouse With..." on the status line - it just highlights and then vanishes. The mouse character doesn't appear and the item stays in the inventory.

This is a script for the item itself. I wasn't getting anything by putting it into the global rep.ex - perhaps I'm missing something.

Am I making some hideously obvious mistake??

EDIT: So I tried a different approach. I've got a variable called "ratvar" which is changed to 1 when the player uses the item. Then I tried to put this in the global rep.ex:

//-----------------------------------------------------
   if (GetGraphicalVariable("ratvar") == 1) {
   SetGraphicalVariable("ratvar"), 0);
    cEgo.LoseInventory(iMouse);
    cMouse.x = 150;    //or wherever you want the mouse to be
    cMouse.y = 125;    //or wherever you want the mouse to be
    cMouse.on = true;
  }
//-----------------------------------------------------

I thought this would work, but it keeps throwing up "unexpected if"s and "Unexpected  (" .

So I'm still stumped!
#66
Thanks for the prompt reply, and I get the gist of what you've said. However, I'm having trouble getting it to work.

if (Mouse.Mode == eModeUserInv && cEgo.ActiveInventory == iMouse)
{
    cEgo.LoseInventory(iMouse);
    cMouse.x = 150;    //or wherever you want the mouse to be
    cMouse.y = 125;    //or wherever you want the mouse to be
    cMouse.Visible = true;
}


This is what I put into repeated ex, and it throws up a message which says: "error (line 701) undefined symbol 'emodeuserinv'.

And in the item script:

cMouse.Visible = false;
cEgo.AddInventory(iMouse); 

And it throws up: "Error (line 1207): 'Visible' is not a public member of 'Character'"

I know roughly what I have to do. I need a variable value every time the mouse is 'used' which is checked by the rep.ex. global script and switches the mouse character off/on or calls it / sends it from another room. I just don't really know how to put it into script! I'm going to go away and see what I can come up with, but in the meantime andy help would be much appreciated!

Also, I'd like the mouse to appear at the character's feet if possible. Is there any way to do this?

Any ideas?
#67
I've got a clockwork mouse in my inventory. Whenever I "Use" it, I want my main character to put it on the ground and let it wander around the screen (as a 'character' in its own right) until I decide to pick it back up (removing the mouse 'character' from the room and returning the mouse 'item' to my inventory). This should be possible in any room in the game.

Is there any easy way to do this WITHOUT putting conditionals and commands into the repeatedly execute section of every room in my game (something which would take far too much time)? Is there something that can be done from the script of the inventory item itself?

Thanks for your help guys, and be sure to spell everything out for me, I'm still not big on scripting!
#68
I'm still surprised that people seem so enthusiastic about Time Snare.

It's on hold. That's as specific as I can be. I've been toying with AGS, and a while back I started another, completely original adventure. As I'm sure you know, a new project can take all one's time and enthusiasm. And yes, based on recent events, I have found my interest in the world of the Doctor waning. I apologise, but I have learned that I shouldn't have made a song and dance about the game until it was nearly finished, hence my new project will be kept firmly under wraps until I'm sure it will see light of day.

I'm really proud of the game though, and there's a lot I did to it since the demo. I re-did a bunch of backgrounds, added more animations, as well as advancing the story and locations by a hefty chunk. Perhaps, if I do one day decide that the project is firmly in the ground, I'll release the incomplete version so people can see where it may have gone. I don't feel I could release it to a third party to finish.

But like I said, on hold. I'd love to go back and finish it one day, and to be honest, I think I will. I just don't have the inspiration right now.

I hope I don't get flamed, as I really appreciate the interest and support everyone on the AGS board has given me. Thanks a lot guys, and I'm sorry to disappoint you.

Mods, I guess it's time to lock the thread. I'll let you know if I ever want it re-opened.

Pete
(Duckbutcher)
#69
Superb. Thanks loads to both of you!
#70
Hmm, it throws up an error -  it says that '.x' is not a public member of 'object'.

I put it into script under "any click on hotspot"

Any ideas? I'm still a bit shaky when it comes to understanding script, so I'm a little stumped.
#71
Right, just one last thing to push it a bit further...sorry! This is more of an afterthought which would make a certain part of my game pretty cool...

Say I have a  hotspot which covers the screen. Clicking on this hotspot will 'switch on' an object/character. But I want this object / character to appear at the exact position underneath the cursor, and then STAY at that fixed position while the cursor goes off and does something else.

How would I go about making this object/character appear at the exact position that the mouse clicks and then stay there?
#72
Cheers bud, I'll tackle it and let you know if it throws up any probs!

Edit: It works fine. Thanks a lot for your help!
#73
...how would I go about this? I want a character / object  (whichever is simpler) to follow the cursor around the game screen.

Any ideas?
#74
Tried that! Sorry, should've mentioned.

The colour change is only temporary, and the status line returns to its original colour after you perform your first action. I guess it's something to do with the way the status line highlights when you complete an action.

Any ideas?
#75
Hi guys, quick question and apologies if the answer's right under my nose. I'm using the Proskritos MI2 2.71 template and would like to know how to permanently change the colour of the text on the status bar, "Walk to" etc from its familiar Monkey Island purple to a more 'me' colour. Any ideas? I've looked through the GUI script and can't find anything obvious.
#76
The TARDIS sprite you have used was made by an AGS member called Cirius for use in his Doctor Who game, Dawn Of The Daleks. He kindly offered to let me use it in my own game after I asked for help with a spinning TARDIS sprite.

I hope you'll get in touch with the guy, if only to let him know you're using his stuff. It's only polite.
#77
Hmm, I'll keep it in mind. I honestly hadn't thought about the potential file size of the finished game, but it's likely to be huge. Is there any way to compress the music files so they don't take up much space? Hey, I'm a bit behind when it comes to technology.

I'm not going to make that March deadline, by the way. Probably. Sorry guys. I will stress that work on the game is ongoing, and hopefully it WILL be worth the wait when the full game finally materializes with that familiar wheezing-groaning sound...

In the meantine, there are now TWO (count 'em) other Doctor Who games in the works on this very board! So one of us should have something out in the next few months at least...
#78
Wow, another one! I remember when it were all fields round here and the only Doctor Who game in development was mine...

Seriously though, good luck. Looking forward to giving it a go.
#79
Hints & Tips / Re: DOCTOR WHO DEMO
Wed 21/11/2007 14:29:17
As noted in earlier posts,it should be impossible to return to the hall in part two.

This bug will be fixed for the final release, don't worry.
#80
Quote from: AT67 on Sat 03/11/2007 12:31:40
I'm having a problem trying to download the demo from filefront. Whenever I click on the link it just reverts to the home page.

Get it from Davidnagel's website, the link is in the first post.

Big update in the first post BTW guys. Sorry I've been a bit quet on this front lately - I've had a lot of personal life upheaval recently and have had little time to do much with this game. However, it's still ongoing and I'm now tentatively giving March 31st 2008 as the final release date. This is, as with everything, subject to change...but any further delays and I'll post them here.
SMF spam blocked by CleanTalk