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

#1241
Yeah, and don't forget cola flavour. From past experience I now never eat anything that spells Cola as Kola. I can still taste those Kola cubes now >:(
#1242
Also remember that == checks a statement, = sets a statement.
#1243
It's ok, I understand! The easiest way to overcome your please-ignore-my-hair conditioning is telling us to look at the hair! And the last picture shows the expression of somebody deep in thought.

You were thinking about your hair weren't you? :=
#1244
For England there's always the rather clichéd Robin Hood. Or if you're looking for something more original try The Witch of Wookey Hole, or Uffington White Horse. My favourite would be Hereward the Wake. Wikipedia is a bit wordy on this but it's certainly one of the epic tales.

Well... that's about it for England :). But Wales, Scotland, and Ireland surely have more folklore than we do (our heads are screwed on tighter :P).
#1245
General Discussion / Re: Acts of gord!
Sat 05/06/2010 20:40:15
Quote
<ring>

"Gamer's Edge"

"What's this about me owing you money!?!"

"Can I ask the same question too since I have no idea who you are?"

"You told your collection company I owe you $80!"

"Ok.  I told the collection company you owe me $80."

"Why did you do that?"

"My theory would be because you owe me $80."

Quote
"Fuck you!"

"I'm sorry ma'am, you do not sexually excite me."

:D
#1246
It's ok, I also noticed these problems and solved them duly. Although quite crude it's very fun to play :D
#1247
Code: ags

if (Parser.Said("wield [onyx] dagger")) maxdamage = 34;


Everything works fine now. Excellent, thanks for your help. Problem solved :=
#1248
I tried both:

Code: ags

battlearray[player.ID] -= Random(battlearray[victim].maxdamage);
battlearray[player.ID] -= battlearray[player.ID] - Random(battlearray[victim].maxdamage);


But now the game freezes whenever I call the function :-\

However, swapping around -= and -= definitely seems more logical, as before the opponent's health went into minus numbers. Which would also explain why it was only being called once :D

But like I said now it freezes.

EDIT: Aha. Found the offending lines.

Code: ags

battlearray[player.ID].health -= Random(battlearray[victim].maxdamage);
battlearray[victim].health -= Random(maxdamage);


When I replace Random(maxdamage) with Random(30), for example, it works perfectly. It seems using an int instead of an actual number causes freezing.

What could I do?
#1249
Sorry to ask for help again. I've come up with a crude battle system, but every time I call it one of three things happens:

- It only runs once.
- The health lost isn't calculated properly.
- The game freezes.

This is how I call it:
Code: ags

if (Parser.Said("kill monk")) {
     OpponentName = cMonk.Name;    //opponentname & victim are global variables.
     victim = cMonk.ID;
     StartFight();
}


Code: ags

function StartFight()
{
     cinfo battlearray[150]; //cinfo is a struct and I'm combining it with an array
     battlearray[victim].health = 100; //Set the opponents health at 100.
     int chancetohit = Random(10); //There's a 1/5 chance of not hitting.
     
     
     while (battlearray[victim].health > 0) { //While the opponent's health is more than 0 the battle carries on:

     if (chancetohit < 3) { //The player misses and instead gets struck by opponent.
          Add(String.Format("%s lands a cruel strike on you!", OpponentName), 15);
          battlearray[player.ID].health =- Random(battlearray[victim].maxdamage); //The opponent's max damage is subtracted from the player's health. (at random)
          }
          
     else {  //(chancetohit was not 1/5 so player hits)   
          Add(String.Format("You brutally crush %s!", OpponentName.LowerCase()), 15);
          battlearray[victim].health =- Random(maxdamage); //Your maxdamage is subtracted from opponent's health (at random)
          }
     
     }

     //The while loop has finished so opponent must be out of health.     
     Add(String.Format("Hurray! %s is dead!", OpponentName), 2, 1);
     ch_status[victim] = eStatusDead; //The opponent is then declared dead.

}


Frankly, where am I going wrong? Most of the time the victim is killed after only one hit - despite "maxdamage" being only 30, and the opponent's health is 100. I think it has something to do with the Random(maxdamage) declarations. Please, don't go out of your way to help me; I'll be satisfied with pointers :=

Thanks,
Atelier
#1250
sounds godI'm really plesed osD has come do far!!!& thanks for rellesing as open-sauce so Ican add'em to my pile of stolen sutff[ok i admit stealing som stuff buy not much]
#1251
There's an option in general settings: Run game loops while dialog options are displayed? (True/False)

Does it work when you set it to true?
#1252
It seems great to me but I personally don't think the text should be justified. Most people find it easier and more pleasant to read left-aligned text (even subconsciously).
#1253
I'm looking for a MIDI maker to work on a soundtrack for Text Quest, my text-based game. It's a medieval fantasy, with a hint of RPGness :=

There are 12 rooms in total, and I would provide the descriptions of each, which the player will be reading, to help you get a feel of what kind of atmosphere needs to be created. I'm never working to any deadline so I can be flexible in that respect.

Cheers, and please PM me if you're interested!


Musician found.
#1254
General Discussion / Re: Forum Rules Question
Wed 02/06/2010 19:28:11
(Not a mod but) yeah that's fine, your username stays the same and lots of people change it around.
#1255
Blow me down. Thanks again! :D
#1256
Right, sorry for the confusion.

I have a custom function Add, with three parameters looking like this:

Code: ags
function Add(String Text, int colour, int space)


String Text is the text to add into the display box.
Int colour is the colour that text is.
Int space defines whether a blank space comes after the text just added. (int space is an optional parameter - by default there is no space when Add is called).

I choose whether to have spaces or not because it makes it so much easier to read when playing (see here).
So, every time the player enters a new room, I run function CheckRoom, and this checks which objects/characters are there.

Code: ags

int i, q;
...

    while (i < Game.CharacterCount) {
    c = character[i];
    if (c != player && c.Room == player.Room) {
   
       if (c.Status() == eStatusNormal) Add(String.Format("%s is here.", c.Name), 2, q);
       else if (c.Status() == eStatusDead) Add(String.Format("%s is here, dead!", c.Name), 2, q);
       else if (c.Status() == eStatusSleeping) Add(String.Format("%s is here, snoozing soundly.", c.Name), 2, q);
       else if (c.Status() == eStatusDrunk) Add(String.Format("%s is completely drunk!", c.Name), 2, q);

    } i++; }


q is just a variable I'm using for the third parameter of Add, and as I didn't define it there won't be any spaces after the text.

But I want q to be 1 (and therefore have a space) when ALL the character names in the room have been added, like at the bottom of the screenshot a few posts up.

I figured out how to do this by adding a line into the code after i++.

Code: ags

if (i == Game.CharacterCount-1) q = 1;


This means the while loop is on its penultimate run, as it only has one last character to check. So the last time Add is called in the function, q is 1 and a space is added!

However... Game.CharacterCount checks all the characters in the whole game, meaning q will only ever be 1 if all the characters are in the same room. I need something like Room.CharacterCount... but as there is no such thing I need to find an alternative.

So bottom line, how do I set q as 1 when the last while loop is run?

Ps. I seem to have written more than intended. Hope it's clearer though :P

Thanks,
Atelier
#1257
Hey, thanks. I've been playing around and seem to have got somewhere. I just need to run a check to see whether count only has one loop left before count equals exactly the number of characters in the room. Something like:

Code: ags

if (Room. ObjectCount >= 1 && o.Visible == false && [something] == count-1) q = 1;
count++;


Unfortunately I have no idea what the [something] needs to be. How can I check when count is on its penultimate loop?
#1258
Nobody has any idea what you're talking about.
#1259
Sorry for bump and double post - new problem at top :-\
#1260


Thank you so much Khris! :D
SMF spam blocked by CleanTalk