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

#421
Beginners' Technical Questions / Why oh why?
Thu 25/04/2013 11:40:44
It's all hell loose today  (roll)

Why oh why?

In setup choose DirectDraw5 as problems with D3d (people say) and I can't use it anyway.

Some say they can't interact (hand) with an object but can look use inv.

Some say buttons on gui are not working but are fine at my end.

Why oh why?



#422
Hi

Dilemma time.

For some reason I find below does not give correct shown % when maxchildren is reached (17) it shows 106%.

Correctly the label should read Children times 100 divided by maxchildren

Int maxchildren set at 17.

I thought it was alright some time ago.

Code: AGS
  Ltotal.Text = String.Format("You have rescued %d%% of the missing children",(Children*100)/maxchildren);


Based on:

Code: AGS

Children=(Children+1)



#423
Beginners' Technical Questions / AddPoint
Sat 20/04/2013 10:53:46
Hi

Khris mentioned about AddPoint a little while back. Could he (or someone else who knows) please explain this a bit more as it is would come in very handy. Referencing areas of a Room would be a great asset.

cheers


#424
Hi,

I have been informed about the following:

If direct3d is on then player appears behind a few objects.

My computer does not support direct3d (I only have Directx 9.0c) so I use DirectDraw5 and the player appears in front of these objects as it should.

Game is 640 x 480 16 color.

Can you shed a light as to why and what should I do?

cheers
#425
Hi

I'm trying to figure out a way how to play an audio countdown when a Timer Expires.

A NPC text displays a countdown every time Timer Expires (SayBackground)and works as it should (20 to 0).

I have tried different ways to approach this.

Maybe there is a way to PAUSE a sound (countdown audio 20-0)when Timer has Expired (Timer gets set again) and then UNPAUSE the sound or increment?

I have this so far in Timer Expired:

Code: AGS
function room_RepExec()
{
 if (IsTimerExpired(1)) 
{
  oblood.Move(oblood.X-0, oblood.Y+6, 2, eNoBlock, eAnywhere);
  countdown=(countdown-1);
  oghost3.SetView(81);
  oghost3.Animate(0, 4, eRepeat, eNoBlock);
  ccount.SayBackground(String.Format("%d",countdown)); // This is where have an audio countdown would come in.
  SetTimer(1, 40);
}


Is there a way to do this only it seems odd without audio whilst NPC is counting down, not blocked?

EDIT: I was thinking of doing something with the countdown int. It's set at 20 and lowers 1 each time Timer Expires.

EDIT EDIT: This seems to work ok and does not block or interfere with Timer events:

Code: AGS
 }
 // COUNTDOWN AUDIO SOUND

if (countdown ==19 && Game.DoOnceOnly("19") && tasandun==false)
{
 aCountdown19.Play();
}
 if (countdown ==18 && Game.DoOnceOnly("18") && tasandun==false)
{
 aCountdown18.Play();
}
 if (countdown ==17 && Game.DoOnceOnly("17") && tasandun==false)
{
 aCountdown17.Play();
}
if (countdown ==16 && Game.DoOnceOnly("16") && tasandun==false)
{
 aCountdown16.Play();
}
 if (countdown ==15 && Game.DoOnceOnly("15") && tasandun==false)
{
 aCountdown15.Play();
}
if (countdown ==14 && Game.DoOnceOnly("14") && tasandun==false)
{
 aCountdown14.Play();
}
 if (countdown ==13 && Game.DoOnceOnly("13") && tasandun==false)
{
 aCountdown13.Play();
}
 //etc etc etc
 


This code has been if else slightly amended and in rep always so it works through blocks.

cheers

slasher


#426
The Rumpus Room / My Girlfriend...
Fri 05/04/2013 19:31:37
Looking in a lingerie shop window my girlfriend said "I could really use that bra."
"Use it! You could flipping well live in it." I replied

My girlfriend is the best lay in the country. You ask Fisons....

My girlfriend says she has not got a big bum. I said: "Oh yeh? You must have a couple of frigging big dimples then!"

Have you a 'Girlfriend' joke?



#427
Hi

I am in a bit of a dilemma.

As some of you may know, SayBackground does not support audio (ie voice).

The SayBackground is on a Timer set every 200.

Now, should I:

A: Have the voice in a Say command (blocking).
B: Have the audio voice run just before character animates showing the text and hope it syncs ok.
C: Anotherway you may think of.

Which would you say was better in your humble opinion?

cheers



#428
Hi

I know that you can pass variables with a string format to a SayBackground but how would I format a string to accept voice audio? Is there a way to do this?

Code: AGS
chung.SayBackground("&1 I'm very hungry!");


cheers







#429
Hi

l have a label that shows a score. It works fine. What I am trying to do is show the Percentage of a score on the label.

Let's say that the total maximum score is 10 and you have 6: the percentage would show 60% etc etc

How can I adopt this into a Label?

Code: AGS

 Ltotal.Text = String.Format("You have rescued %d of the missing children.",Children); // show percent not int


Cheers and thanks if you can help

PS I'm going to try Children/100. I know it won't decimalise but that's ok/

Not sure if that would work?

#430
Hi guys

I am wondering about this splash screen. Do you think the blood splash on the left side should stay there and without to much messing around, how could this splash screen be improved? If it could, how? Like should there be a Tag line across the bottom?

Suggestions welcome.



cheers

slasher


#431
Hi

I have a scene where very large injections are slowly dropping down on people underneath. The injections enter the people's body through their heads and suck out their blood.

At the moment they are named 'Blood extractors'. I'm not sure about this.

The injections are set in motion by evil forces that yearn for people's blood.

Can you come up with a better description?

cheers

slasher


#432
Hi

I think I may have a conflicting script issue with mouse mode.

It revolves around the gIconbar and in particular the 'Close' gInventory button.

When I close (cancel) either the Save or Load GUI's the mouse returns to its previous mode.

However, when closing gInventory the mode (view) goes to  pointer view if nothing is selected.

I do have it so pointer mode is that of Interact view when ginventory is open.

It should return once closed to it's mode before ginventory was opened if nothing is selected.

Like I say, its probably a script confliction.

The Save and Load cancel buttons are ok and only make that gui close with no other commands.

Don't know if this helps:

Code: AGS

// IN GLOBAL HEADER

int old_mode;

  void Talk(this Character*, String message) {
  lblTalk.Text = message;   // label's script name: lblTalk
  gTalk.Visible = true;       // GUI's script name: gTalk
  int delay = (message.Length * GetGameSpeed()) / Game.TextReadingSpeed;
  int min_delay = (Game.MinimumTextDisplayTimeMs * GetGameSpeed()) / 1000;
  if (delay < min_delay) delay = min_delay;
  int ignore_delay = (Game.IgnoreUserInputAfterTextTimeoutMs * GetGameSpeed()) / 1000;
  mouse.Visible = false;
  Wait(ignore_delay);
  delay -= ignore_delay;
  if (delay > 0) WaitMouseKey(delay);
  mouse.Visible = true;
  gTalk.Visible = false;
}

 // After combining inv items return to arrow

function on_event(EventType event, int data)
{
 if(event == eEventAddInventory && mouse.Mode == eModeWalkto)
 {
  mouse.Mode = eModeInteract;
  mouse.UseModeGraphic(eModePointer);
 }
}
 

function repeatedly_execute_always() 
{
 // WHEN CURSOR OVER STATUSLINE GUI
 
  GUI* theGui = GUI.GetAtScreenXY(mouse.x, mouse.y);
  if (theGui == gStatusline && mouse.Mode != eModePointer) 
 {
    old_mode=mouse.Mode;
    mouse.ChangeModeGraphic (eModePointer, 304);
    mouse.Mode = eModePointer;
  }
  
 if (theGui != gStatusline && mouse.Mode == eModePointer && mouse.GetModeGraphic(eModePointer) == 304) 
 {
    mouse.Mode=old_mode;


If you close ginventory without selecting an inv item I want Mode to go back to the Mode it was before ginventory was opened. As I said, it does when closing Save or Load gui's.

I hope I have explained this problem ok

cheers

EDIT: At the moment I have cancelled changing mode graphic to pointer when in inventory. When closing Inventory it shows hand Interact. Not exactly what I wanted but will do for now until fully solved.

26th march
EDIT: All solved (well, 99%)  8-)




#433
Hi

I have an issue regarding Objects and Interacting with them although they do work but not to total satisfaction.

I have some objects (86 x 111) in which I want to adjust their Hotspot area from their feet to the middle of the images for better interaction use.

I find that pixel hunting is frustrating to say the least. I have @overhotspot@ to donate what the Object is and to indicate you are on it. But unless directly over that area the descriptions and interaction do not occur.

I have these images set at Transparency=50.

I am playing around with baselines to try and cope with this situation are you able to advice and assist me.

Thank you

EDIT: I found this solution:
Code: AGS

oghost1.Baseline=230;
oghost2.Baseline=246;
oghost3.Baseline=246;


All is well on the western front  (nod)

slasher


#434
Hi

I think most people are aware of the limitations of SayBackground.

SayBackground is Non blocking yet does not take displaying variables (countdown).

I have a scenario whereby a timer starts counting down and an object (oblood) lowers a bit after it's Timer has expired and Timer gets reset untill counter=0. Once the counter=0 the next lot of events happen. This does work in the way I have it at the moment.

I hope coding below is formatted correctly.

Code: AGS
function room_RepExec()
{
 if (IsTimerExpired(1)) 
{
 oblood.Move(oblood.X-0, oblood.Y+6, 2, eNoBlock, eAnywhere);
 countdown=(countdown-1); 
 SetTimer(1, 80);
}
}


Now, I could use a GUI to show the countdown Timer. I indeed do have this and it works perfectly.

I decided it would be better if a NPC SayBackground counted down (oghost2 animates eNoBlock each time the counter lowers by 1.) Of course Say works but is a blocking function.

In the Rep Exec

Code: AGS
function room_RepExec()
{
 if (IsTimerExpired(1)) 
{
  oblood.Move(oblood.X-0, oblood.Y+6, 2, eNoBlock, eAnywhere);
  countdown=(countdown-1);
  oghost2.SetView(80);
  oghost2.Animate(0, 4, eOnce, eNoBlock);
  //cChar4.SayBackground("%d",countdown); // SayBackgound does not work with variable countdown
  //gcountdown.X=cChar6. x +0; May need screen X Y
  // gcountdown.Y=cChar6. y -100; May need screen X Y
  SetTimer(1, 80);

}

 if (countdown <=0 && Game.DoOnceOnly("Timer"))
{
 gcountdown.Visible=false;
 SetTimer(1, 0);
 oblood.Graphic=1338;
 Wait(30);
 oblood.Graphic=1339;
 Wait(30);
 oblood.Graphic=1340;
 Wait(30);
 oblood.Graphic=1341;
 Wait(30);
 oblood.Graphic=1342;
 Wait(30);
 ob4.Graphic=1348;
 of2.Graphic=1344;
 ob5.Graphic=1346;
 of1.Graphic=1350;
 Wait(30);
 of2.Graphic=1345;
 ob5.Graphic=1347;
 ob4.Graphic=1349;
 of1.Graphic=1351;
 Display("You are too late! Those children have been drained of thier blood!!");
}
}


function repeatedly_execute_always()
{
  Ltimer.Text = String.Format("%d",countdown);
}


I have tried positioning the GUI to position it with NPC, this is a non go.

I probably need Screen X Y rather than Room X Y.

Hope you can understand this gobble and can lend your help and advice to find the best way around this.

I'll step back and wait for the hammer to fall  :-[




#435
I'm having a bit of a problem getting rid of the pixel showing in the flashlight plugin.

It seems to be ignoring a walkbehind, even though the baseline is set very low and player baseline=0

I got around it by trying to adjust the flashlight so its kind of black. I reduced its size and it works but as I mentioned I still have a pixel that can be seen.

I read this:

With SetFlashlightTint you can tint your scenery with a color. Values for tints an be from -31 to +31; 0 means no change to the color component.

Note:
At first a pixel is tinted then it is shaded.

----------------------------------
Example how to switch tinting off:
----------------------------------

SetFlashlightTint (0, 0, 0);


Ideally I'd like the pixel to be black (going through a tunnel) and then return to normal when coming out of tunnel, which I can do with 0,0,0.

if you can help that would be great (nod)

cheers



#436
General Discussion / Football nuts
Sat 16/03/2013 19:06:01
Hi

For all you football nuts out there I wish to ask:

If you could pick a player to take a penalty, who would you choose?

You can choose from any era.

I ask because its in my game and I need to show different players.

slasher

#437
Hi

Re: picking up objects

This has probably been debated in the past no doubt but I would like to bring it up again for my research.

* You come across an apple tree. You stop and pick an apple or two (put into inventory). Acceptable, it can and does happen in real life.

* You come across a small rock. You stop and put it in your pocket (put into inventory).  Unacceptable, it does not really happen in real life (usually).
But if you get into a situation where you need a small rock then it becomes 'acceptable' to pick it up.

What is your view on picking up objects in these circumstance?

cheers



#438
Hi

it has come to my attention that Regions are being ignored if player walkspeed set high.

IE:

Code: AGS

chero.SetWalkSpeed(12, 12); // Player ignores regions when running over it.
chero.SetWalkSpeed(5, 5); //  Player obeys regions when walking over it.


Am I missing something? Is there a solution?

cheers



#439
Editor Development / Label Subscript
Wed 06/03/2013 11:14:22
Having a Subscript command would be great. Could do with that at this moment for some Labels.

Example:

List of items player has to find / get. As you find each item it gets Subscripted in the list instead of removing the text.
#440
Hi

I have a scene where water spurts out from a radiator. The water spurts to the right of the room (as shown).

Some attempts I'v made have not been satisfactory. Can you help with a decent spurting animation or have some advice?

Image shown is actual size.



cheers

slasher

SMF spam blocked by CleanTalk