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

#161
Quote from: Eric on Sun 15/04/2012 21:28:55
Out of curiosity, what audio are you planning to have?

Audio in the form of mystery/suspense type music and sounds as well as normal stuff.

As long as they fit the genre and game.

Still to be sorted.

;)

steptoe
#162
Hi,

My mistake, I actually have it set for 7, twice as long.

Anyhow, I have gone with a GUI instead..

Cheers..
#163
Hi

I understood that DisplayAt was a blocking script yet the below passes after showing just a second. I think I will need to use a GUI instead. Meanwhile do you know why it does not text delay as per rest of game.?

At beginning of game:
Code: ags

 Game.TextReadingSpeed = 15;
game.skip_display = 0;.


DisplayAt runs in room_RepExec:
Code: ags

 if (MURDERERS==true)
  {
DisplayAt(20,33, 620, "%s %s %s %s",
"",
"",
"",
"");

DisplayAt(20,33, 620, "%s %s %s %s",
"",
"",
"",
"");

DisplayAt(20,33, 620, "%s %s %s %s",
"",
"",
"",
"");
RestartGame();


Cheers

steptoe


#164
Progress


Game: 90%
Graphics: 90%
Audio: 0% as yet

Testers wanted for this short, 3 roomed, not including court room, whodunit game.


#165
Hi


Edit:

These scripts seem to do the trick.. at least for the time being.. more tests needed.  Fingers double crossed!


To change button from Arrest to Arrested!

Code: ags

function Button28_OnClick(GUIControl *control, MouseButton button)
{
  if (Button28.Text=="Arrest")
  {
  Button28.Text="Arrested!";
  }
  }


To reset Button 28 to "Arrest"

Code: ags

function Button35_OnClick(GUIControl *control, MouseButton button)
{
  
  if (Button28.Text=="Arrested"")
  {
  Button28.Text="Arrest";
  }
  }


When the "Go to court" button is clicked

Code: ags

 if (Button28.Text=="Arrested!")
   {
    Murderer=cHarrington;
    cHarrington.ChangeRoom(6, 170, 310);
   }




Original post
----------------------------------

I have one button (Arrested) that takes an NPC to room 6 when the 'Go to court' button is pressed..

Button that changes the button text to "Arrested!"
Code: ags

function Button28_OnClick(GUIControl *control, MouseButton button)
{
 Button28.Text="Arrested!";
 Murderer=cHarrington;
}


If NPC is selected and 'Go to court' button is pressed

Code: ags

if (Murderer==cHarrington)
   {
      cHarrington.ChangeRoom(6, 170, 310)
   }


Button that Resets NPC to stay inRoom3 and reset button text back to "Arrest" before the 'Go to court' button is pressed
Code: ags

{
  
 if (Button28.Text=="Arrested!")
 {
   Button28.Text="Arrest";
   cHarrington.ChangeRoom(3);
 }


In short... how can you stop a NPC from changing rooms once selected and wish to deselect it?

cheers

steptoe




#166
Cheers Khris

I'll give that a go. Certainly less code  ;)

cheers

steptoe

Edit: Khris, it works but gives a small problem. I will see if I can work around it.

cheers

steptoe

#167
Mods: I have double posted so I can show all the code I have used separately.

The below seems to work ok but if you know a better way...

Example of when an NPC 'Arrest' button is clicked:

Code: ags

function Button28_OnClick(GUIControl *control, MouseButton button)
{
 Button28.Text="Arrested!";
 Murderer=cHarrington;
}


After making Arrest(s) by clicking NPC 'Arrest button' and clicking 'Take to court' button:

Code: ags

function Button34_OnClick(GUIControl *control, MouseButton button)
{
   gArrest.Visible=false;
   cFrankj.ChangeRoom(6);
   
   if (Murderer)
   {
     cHarrington.ChangeRoom(6, 198, 288);
   }
  
  if (Murdererdud)
   {
   cDudley.ChangeRoom(6, 180, 288);
   }
  
  if (Murdererfitz)
   {
   cFitzroy.ChangeRoom(6, 160, 288);
   }
  
  if (MurdererBert)
   {
    cBertie.ChangeRoom(6, 140, 288);
   }
  
  if (MurdererPat)
   {
    cPatrick.ChangeRoom(6, 120, 288);
   }
  
  if (MurdererAnna)
   {
    cAnna.ChangeRoom(6, 100, 288);
   } 
   }


And called in Final Room:

Code: ags

function room_AfterFadeIn()
{
 if (Murderer)
 { 
 Display("%s you have been found guilty of murder!!",Murderer.Name);
 }
 if (Murdererdud)
 { 
 Display("%s you have been found guilty of murder!!",Murdererdud.Name);
 }
 if (Murdererfitz)
 { 
 Display("%s you have been found guilty of murder!!",Murdererfitz.Name);
 }
 if (MurdererBert)
 { 
 Display("%s you have been found guilty of murder!!",MurdererBert.Name);
 }
 if (MurdererPat)
 { 
 Display("%s you have been found guilty of murder!!",MurdererPat.Name);
 }
 if (MurdererAnna)
 { 
 Display("%s you have been found guilty of murder!!",MurdererAnna.Name);
 }
 }



steptoe



#168
Hi

I need to solve this vital issue and I hope it is understandable.

Selecting one NPC from a few NPC's and then sending the selected NPC to the final room is not a problem if I use  the Variable 'Character' named Muderer.

Eg if Bertie selected:

Code: ags

   Muderer = cBertie;
  cBertie.ChangeRoom(6);


In final room:

Code: ags

   player.Say("You have been arrested, %s", Murderer.Name);
  Murderer.Say("I'm innocent!");


I believe this is correct but correct me if I am wrong.

My issue is when sending two or more NPC's to the final room.

I need to only show the NPC characters that have been selected and display text in the final room relating to the NPC's selected.

Summery:

Say the Player selects NPC 1 AND 4.  NPC 1 and 4 show in final room. All text is based on NPC 1 and 4 in final room. (selections are done by button for each NPC);

There are 6 NPC's.

Help appreciated.

steptoe



#169
Nearest Iv'e seen is FloatingHotspot in the modules/plugins quite a while back..

Similar to Overhotspots feature of AGS but descriptions show near mouse cursor.


#170
Critics' Lounge / Re: Band Logo
Thu 12/04/2012 11:04:28
With a name like Smurf...

A lot depends if the band name is a kind of 'take' on the Smurfs or not..

I was once in a band named barefoot and we used to have a foot print on our t-shirts.
#171
And don't forget the command DisplayAt this command places the Display where you want it.

EG

Code: ags

DisplayAt(100,150,300,"""");


100= from left
150= from top
300=length
"""= text  = "blah blah"

adjust as required if used.

Hope this is useful.

#172
Walkable Area ID 0 opens the eraser tool so you can delete all or parts of any Walkable area.

Select ID 1 from Walkable area from events pane then you can draw your Walkable Area.

If you have 2 Walkable areas simple select Walkable Area ID 2 etc.

Same applies to Hotspots and Regions.

So ID 0 is used for erasing.
#173
Nothing complicated about what Khris mentioned.

Simply treat a new Text Window GUI as any normal GUI and customize its looks (background /  text) as required and make sure you change 'Set GUI for Dialog options' with its GUI number in the general settings (default is 0). Experiment until you are happy. Using [ below text will make display box bigger by adding a return below text or as a new line or [[ to make a new paragraph.
#174
Cheers Khris

That does the trick  :)

steptoe
#175
Hi

I am trying to change a ListBox ID Item.

Player has selected item "Windows"  from a ListBox and once used on a character the Listbox selected Item goes to ID 0 (which is just a "" entry).

I am using variables defined on selected ListBox items as well as Game.DoOnceOnly.

This variable is turned off once events have run.


An example:

Code: ags

function ListBox1_OnSelectionChanged(GUIControl *control)
{ 
  
 String itemname = ListBox1.Items[ListBox1.SelectedIndex];
     
 if (itemname == "Windows")
 {
  Trunks=true;
 }


This is repeated for 6 characters. Any item needs to be selected before you can use it on each character.

What would I need to do?

cheers

steptoe


#176
New Screenshots:





After flicking the snooker table light switch on:




#177
Thank you  lucydark,

A sequal.... Mmm, maybe once I've brushed up my skills  :)

Cheers


#178
Newly added stroryline:

A Whodunnit mystery starring super sleuth Detective Harry Faversham who has a nose for smelling clues!

"It is the summer of 1910. It is a very hot, sticky morning and beads of sweat are rolling down your brow. You are Detective Harry Faversham, a police detective with a highly tuned and evaluating mind."

"You have just had a call from Chief Inspector Morley of Scotland yard. There has been a brutal murder reported by the butler of Lord and Lady Harrington of Harrington manor. Lord Harrington has been murdered by a machete through his skull!"

"You set off to investigate. You summon your carriage and are taken to Harrington manor. The dawn is howling with hungry foxes and you can feel every bump of the cobbled roads. Within the hour you are at Harrington manor. You are shown in by the Harringtons butler. Inside you find family and staff of Lord and Lady Harrington waiting."

#179
EDIT....
Added a dummy blank item and now seems to work as expected...



-------------------------------------------------------

I am trying to NOT have any of the Listbox Items actually selected until you have actually selected any of them.  Khris, the code you gave me works up to that point.

What  I am working on is that after selecting an item in the ListBox is to have the mouse change graphic and use that on characters to revoke that particular subject conversation. Almost Active Inventory like.

In the manual it states: -1 to remove the highlight but obviously I may/may not need some kind of blind item?

Meanwhile I will keep reading the manual plus any help here will hopefully guide me through this.

cheers
#180
Jeepers. Case of crossed eyes.. Yep... ok

I have crossed ceiling ladder both ways before doing switch and seemed ok.  I'll check it out again.

Map being done...

cheers a lot Cogliostro


SMF spam blocked by CleanTalk