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

#61
Ok I think it was a bit confusing so now "Walk to" cursor is back to normal and cursor 9 is now "Go to"

What I'm aiming for is to be able to click on object/hotspot
the character then walks to object and preforms the interaction in this case "Go to".
As an example under "Got to" interaction he might display a message or change room.

I'm trying to set it up so that it has the same effect as say walking onto a region.

Code: ags
else if (button==eMouseLeft) {
Ã,  if (mouse.Mode == eModeWalkto) {
Ã,  Ã,  if (IsInteractionAvailable(mouse.x,mouse.y, eModeGoto) == 1){
Ã,  Ã,  Ã,  ProcessClick(mouse.x, mouse.y, eModeWalkto); // walk to object
Ã,  Ã,  Ã,  ProcessClick(mouse.x, mouse.y, eModeGoto); // perform action
Ã,  Ã,  }
Ã,  }
Ã,  else ProcessClick(mouse.x, mouse.y, eModeWalkto);
Ã,  ProcessClick(mouse.x, mouse.y, mouse.Mode);
}
#62
I tried your code and all that happened was the interaction was performed for the object, but didn't walk to it .
#63
Hi I'm in the process of making a new template and I'm having a problem with the "Walk to" cursor.

In the template I have set cursor 9 as the default "Walk to" as I wanted this to appear in the
object/ hotspot interaction window.

The problem I have is that the player character performs the interaction then walks over to it, is there away to change this so the player character walks to the object/hotspot first then performs the interaction?

In the Script Header I have:
Code: ags
#define eModeWalkto 0 // setting cursor 9 to use mode 0


and in "on mouse click" I have
Code: ags
else if (button==eMouseLeft) {
 ProcessClick(mouse.x, mouse.y, mouse.Mode);
  if (mouse.Mode == eModeWalkto) {
   if (IsInteractionAvailable(mouse.x,mouse.y, eModeWalkto) == 1){
    ProcessClick(mouse.x, mouse.y, eModeWalkto);
    }
  }
else ProcessClick(mouse.x, mouse.y, eModeWalkto);
	}


any help wouild be grateful

*I'm using ags 2.70 at present becuase I'm in the middle of a project*
#64
I was wondering if this module lets to speech to continue running while the player is interacting with objects etc..

thanks
#65
ok that didn't work the character still faded away to quickly even increasing the wait upto 10, I just had to wait longer for the function to finish any other ideas?
thanks

*Note it seems to be a problem with the test character I was using, I imported the ROGER character to try in a test game, but when using another character I have he faded out slowly*
#66
that seemed to do the trick it now works thank,

the problem I have now is that the character fades to quickly is there away to slows this down abit?

the function I use for objects which is similar fades gradually.

thanks
#67
I'm trying to create a function where I can fade out characters, but I just cannot get it too work. I have created a function for objects andÃ,  that works ok, but now I am stuck with this one so any help would be grateful thanks


int transparent;

function FadeCharacterOut (int charID) {
Ã,  while (transparent <= 100) {
Ã,  SetCharacterTransparency (charID, transparent);
Ã,  transparent += 1;
Ã,  Wait (1); }
}
#68
I hadÃ,  the same problem you mentioned about, then I realized that I had set my game up for 640x480 and had moved both Action and Actiongui down the screen. I had forgot to change in the global script

from:
#define FIRST_INV_SLOT_COORDS    Ã,  Ã,  180,160

To in my case:
#define FIRST_INV_SLOT_COORDS    Ã,  Ã,  170,205

Hope this helps
#69
SSH:

I didn't think!, sorry!

I hope the template is okay but it may need tweaking here and there (I am relatively new to this scripting lark).

Arrays and struts will be my next headache me thinks  ::)

... so you guys will be fed-up with me and my postings before too long  ;D
#70
Yes you are right in both accounts I was showing where I had placed the "if (qIsTalking()==0) { " in the room script as I wanted the background talking to loop. And the background talking is between two NPC talking to each other and not the player.

I started in say room 1 where the two NPC characters are talking to each other and I got when leaving room 1:
qIsTalking1 =0
qIsTalking2 =0

now I'm in room 2 where the background talking has carried forward this however doesn't happen ever time but more times than not. When I leave room 2 to go back to room 1 I get
qIsTalking1 =1
qIsTalking2 =0
this doesn't happen every time as I also got
qIsTalking1 =0
qIsTalking2 =0
when leaving room 2.


I asked about buffers and string length as I'm playing around with the background talking to continue while the player interacts with objects etc.. because at the moment when a player interacts with something the background talking pauses. The problem I've got is the background talking doesn't follow on from each other in order eg..
1,2,3,4,5
it seems to display lines randomly eg.. 1,4,6,3
and increasing the buffer size almost sorts it out if thats any help

thanks
#71
I'm progressing well with my game using the MI2 template (thanks to the creator Proskrito for making the template!) and converted the template for use with AGS 2.7.

Here's my problem:

I now am at a point where I have around 25 inventory items active for use on each other, obviously only a few will combine! 

The problem I have is that if I "use inventory item on another inventory item" sometimes it works (displaying the message I have scripted for it), sometimes it does nothing, sometimes it says the unhandled event (i.e "That doesn't work") ...

What I don't understand is there doesn't seem to be a pattern to it.

I would like the player to receive a message everytime they try to combine items.

Is anyone else experiencing this?  Or, if you are using the template can you tell me if you can use inventory items on each other and always get a message and not nothingness?

Hope I haven't babbled!

Thanks ...

PS  I haven't "fiddled" with the original Inventory Scripting on the template.
#72
Thanks for the reply
and looking at my last post I didn't explain it very well

I had copied exactly as you had written and was using the background talking in the room function :

function repeatedly_execute() {
Ã,  Ã,  if (qIsTalking()==0) {Ã,  Ã, 
Ã,  Ã,  Ã,  Ã, qDisplaySpeech(EGO, "blah blah");
Ã,  Ã,  Ã,  Ã, qDisplaySpeech(EGO, Delay(20));
Ã,  Ã,  Ã,  Ã, qDisplaySpeech(EGO, "more blah");
Ã,  Ã,  Ã,  Ã, qDisplaySpeech(EGO, Delay(70));Ã,  Ã, 
Ã,  Ã,  }
}

And when the player left the room the background talking was continuing in the next room, and it was here that I was placing the "qStopSpeech()" to counteract it.

At the moment I seemed to have fixed the problem.


Now I have acouple of questions the first is that when I have a NPC character talking in the background and I then remove him to replace the character with another different NPC there seems to be a delay before the first background talking stops, is there away to stop the background talking instantly?
At the moment I'm using

if (character[EGO].room == 34) {
Ã,  if (qIsTalking()==0) {Ã,  Ã, 
Ã,  Ã,  Ã,  Ã, qDisplaySpeech(EGO, "blah blah");
Ã,  Ã,  Ã,  Ã, qDisplaySpeech(EGO, Delay(20));
Ã,  Ã,  Ã,  Ã, qDisplaySpeech(EGO, "more blah");
Ã,  Ã,  Ã,  Ã, qDisplaySpeech(EGO, Delay(70));Ã,  Ã, 
Ã,  Ã,  }
}
else if (character[ROGER].room == 34) {
Ã,  Ã,  if (qIsTalking()==0) {
Ã,  Ã,  Ã,  Ã, qDisplaySpeech(EGO, "blah blah");
Ã,  Ã,  Ã,  Ã, qDisplaySpeech(EGO, Delay(20));
Ã,  Ã,  Ã,  Ã, qDisplaySpeech(EGO, "more blah");
Ã,  Ã,  Ã,  Ã, qDisplaySpeech(EGO, Delay(70));
Ã,  Ã, }
}

else { qStopSpeech();Ã,  }


The secound question is how did you workout the sizes for
#define BUFFER_SIZE 300
#define AGS_STRING_LENGTH 200
and what effect would there be increasing these values?

Thanks Lazarus


#73
I'm having a problem with background speech in that when I leave the screen and go into a new room the background speech seems to continue in the new room.

The only way I can stop it is by using "qStopSpeech()"
in the reatedly_execute in the new room which is not ideal.
The qStopSpeech(); doesn't seem to work properly I have placed the Leave room as below.

function on_event (int event, int data)
if (event == LEAVE_ROOM) qStopSpeech();

Any help would be grateful
Thanks
#74
Hi I'm having a look at your background speech module and I cannot seem to get the speech to display all of the converstation in that it just displays the last line.
eg. BackgroundSpeech.Say(cRoger, "What can I do for you? ");

I loaded the module ok, and I've then placed the background speech as a run script in the repeatedly_execute for the room.

In the run script I have

BackgroundSpeech.IsCharacterSpeaking(cEgo);
BackgroundSpeech.IsCharacterSpeaking(cRoger);


BackgroundSpeech.Say(cEgo, "Hello");Ã, 
BackgroundSpeech.Say(cRoger, "Nice to meet you");
BackgroundSpeech.Say(cEgo, "it's a lovely day");Ã, 
BackgroundSpeech.Say(cRoger, "What can I do for you? ");

any help would be grateful
#75
I would like to thank you both for your replies.

I will have another look at the scripting editor and post if I have further problems.

Alternatively, I will also take on board the global integer.

Thanks again
#76
Advanced Technical Forum / Giving NPC items?
Tue 26/07/2005 18:08:34
Hi ...

I hope I am posting this in the right place as I can't find any help on this question ..

I am at the point in my game where my character has several items collected in their inventory to give to a NPC.  These items can be obtained/given to the NPC in any order and at any point during the game.

The problem I have is where to start!

Sorry if this is a stupid question but I am lost with what I guess I need to do, which is ..

Add under the NPC a "conditional" command for each item saying to "display a message" telling the player it is an item required etc.

I don't know how to script the game so that the NPC is aware when he has all of the items to trigger a "final congratulations you have it all dialog"?

I would also like to count down how many items to go when the playing character gives the NPC an item he is after ... for instance saying "3 items to go ...", "2 items to go ..." etc.

I apologise if someone has already covered this but after trawling the forums for what seems like days I have not found the solution ..

With much hope and thanks ...
#77
I've seem to have found away around my problem, in that by using ">td" (talk don't go) at the end of the characters name in the main character profile.
eg... guybrush>td

and then if I want to talk to the character I manually put move player command to the character in question before talking to them and so far it works every time with no problems.

I think the problem is with "always goto hotspot" and "clickable chacters" in the global script, but I could be wrong tho.

but by using the >td command the problem goes, and using the ">td" doesn't show up in the game if this is any help
#78
Thanks strazer!

Worked a treat, still learning the basics I think ..

thanks again  :)
#79
I have a problem as follows:

I have a room which has 2 exits to other rooms.Ã, 

In this main room I have setup for exit number 1 (a hotspot) to become enabled when an inventory item is used and a dialog is run.Ã,  This is fine and I can leave the main room through exit 1 and come back in using this hotspot.Ã,  The exit remains enabled.

The problem I have is if I use the inventory item and the dialog is run to enable the hotspot (above) and don't go through the hotspot but instead go to exit no. 2 (which is also a hotspot into another room) and then come back to my main room then exit no. 1 (hotspot) is then disabled!

Sorry this is so confusing but I have no clue as to how to do this!

I thought it might be a conditional thing but I don't see how to do it ....
#80
Thanks for the reply I will certainly have ago that.

My other problem i've got is that using MI2 template I have, is that when I select another chacter on screen and the "Talk To" is highlighted and I use either the GUI button or using the right button to activate the conversation is that it doesn't work first time, I've got to press the buttons acouple of times before it works.

Any help or ideas would be grateful
SMF spam blocked by CleanTalk