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

#421
The useless machine was a mistake!

Here's my entry:

[imgzoom]http://i.imgur.com/9RTuqmz.gif[/imgzoom]

And some accompanying music:

https://youtu.be/qaC0vNLdLvY?t=75
#422
The Rumpus Room / Re: The 4 word story thread
Wed 07/06/2017 01:18:06
enjoyed dining on mouldy
#423
Removed (I thought the case was still open)
#424
The Rumpus Room / Re: The 4 word story thread
Tue 06/06/2017 11:15:12
two wise homeless men
#425
The Rumpus Room / Re: Happy Birthday Thread!
Fri 02/06/2017 04:00:06
Happy birthday, Stupot+ !
#426
Quote from: DBoyWheeler on Thu 01/06/2017 01:02:25
I looked up the name from Babynology.com--"Rosaura" was in the list of Portuguese names.

I think you should trust the Portuguese person on this one.



I have a question, Stu. I made a Baywatch thing two weeks ago:



Would it be alright to reuse some parts of this intro with a different song and make a Baywatch-inspired game? "Bay Rescue" or "Rescue Watch", something like that. I had no idea it would be relevant to this month's MAGS theme when I was making it. I was just making it for fun, but it seems like a good opportunity to turn it into something more. I'm also not sure if I'll have time to participate.
#427
Are the sisters nuns?
#428
The Rumpus Room / Re: The Points Game
Tue 30/05/2017 01:53:23
Cool, what is it?
#429
The Rumpus Room / Re: The Points Game
Mon 29/05/2017 01:12:42
one shall one shall one shall
#430
Welcome to the forum, Dream! And tma`1 :D
#431
Are they shakers?
#432
The Rumpus Room / Re: The Movie Quote Game
Wed 24/05/2017 02:37:13
Yes. Is it "Fletch"?
#433
The Rumpus Room / Re: The Movie Quote Game
Wed 24/05/2017 02:07:15
I don't think there's anyone called Chester in it, but Fletch?
#434
General Discussion / Re: Goodbye AGS community
Tue 23/05/2017 07:10:54
Where are you going?
#435
That's a great idea, Danvzare!
Can we combine your idea and selmiaks? i.e. Have a run off on the top three entries, then combine whatever the top two entries are.
#436
Have you set ClipImage to True on the button (btnHealthBar)?

If there are still problems, can you paste in your code for the hotspot interaction?

It might be good (as Slasher indicated) to ensure the basics are right. Can I see a screenshot of your GUI?
#437
Oh, I'm sorry. I made an assumption with that "you have died" message. Here is an updated version that will work as you want:

Code: ags
function SetHealth(int value)
{
  if(value < maxHealth)
    health = value;
  else
    health = maxHealth;
  UpdateHealthBar();
  if(value < 1)
    Display("You have died.");
}
#438
How does the character get damaged?
#439
If you're using my approach, you can just subtract an amount from the value of GetHealth. Here's an example:

Code: ags
SetHealth(GetHealth() - 20);


For Grok's approach, it would be much the same thing:

Code: ags
iYazScore = iYazScore - 20;
Score();


If you want to have the player steadily lose health over time, you can put it in repeatedly_execute:

Code: ags
function repeatedly_execute()
{
  SetHealth(GetHealth() - 1); // Decrease the player's health by 1 every game cycle
}


and perhaps have something to make it a bit slower:

Code: ags
int healthTick;

function repeatedly_execute()
{
  healthTick++;
  if(healthTick == 5)
  {
    healthTick = 0;
    SetHealth(GetHealth() - 1); // Decrease the player's health by 1 every 5th game cycle
  }
}


Regarding what I mentioned earlier about extending SetHealth, here's a quick example of how you could make the player die if his/her health reached zero:

Code: ags
function SetHealth(int value)
{
  if(value < 1)
    Display("You have died.");
  else
  {
    if(value < maxHealth)
      health = value;
    else
      health = maxHealth;
    UpdateHealthBar();
  }
}


Regarding the error message you received, make sure you have the four lines shown here in your GlobalScript.ash file:
#440
Is this about sex? (Intercourse.)
SMF spam blocked by CleanTalk