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

#2

Re: "Either your code is still wrong, or the CSV doesn't have the right format."
Both, I think.



In the configuration, without  the QuizModule.SetupQuestionGUI(5); line,
when I press space,

the message

'0 questions loaded'

appears.

When I change 'test' to 'misc' in both the on_key_press code and in the
function room_FirstLoad,
the message

'loaded 4 questions'
appears, followed by the message:


the arch enemy of Sherlock holmes is?
----
Which of these actually exist?
----
the arch enemy of Sherlock holmes is?
----
Which of these actually exist?
----


So:
a) Your sample questions file (misc) is accessable, but mine (test) is not.  (Both are .csv files saved in the Questions folder in the Compiled folder. I'm going to compare them more carefully now)
b) My GUI 'gQuestion'  is not being called.   
#3
No joy. 
The same error message:

Null string supplied to CheckForTranslations

appears in relation to 
Code: AGS


 l.Text = q[question].question;


In the morning, I'll start again from the beginning.  Maybe I've strayed from the recipe somewhere.
#4
I haven't successfully implemented the code yet, the same error is being reported.


I used Google spreadsheets to make test.csv and replaced the , with ;
Test.csv has 10 questions and is saved in Q3/Compiled/Questions.

(Q3 is a new game project, with nothing in it except the quiz script.)

the room script file looks like this:

Code: AGS


// room script file
    void on_key_press(eKeyCode k) {
     
      if (k == eKeySpace) {
        QuizModule.ImportQuestions("test");
        int noq = QuizModule.NumberOfQuestions();
       
        Display(String.Format("Loaded %d questions.", noq));
        int i;
        String questions = "";
        while (i < noq) {
          questions = questions.Append(q[i].question);
          if (i < noq-1) questions = questions.Append("[---[");
          i++;
        }
        Display(questions);
      }
    
   
   }
    
    

    
function room_FirstLoad()
{
QuizModule.SetupQuestionGUI(5);
}


 
#5
Legend. 
I'll try that, thank you.
#6

Hi.

I havn't gotten it working yet.

I get an error  on line 114
Code: AGS


  l.Text = q[question].question;



the error is highlighted in yellow and the message reads

Null string supplied to CheckForTranslations



#7
How do I put the answers on the buttons?
#8
Thanks all.

:-[

(Yes, the answer was in the manual.)
#9
Hi,

Search isn't working right now.

I want to change a variable based on what room the player is in.

Code: AGS

function Button5_OnClick(GUIControl *control, MouseButton button)
{
  if (cEgo.Room(4)== true){
    int Ascore +=1;
cEgo.ChangeRoom(2);

}


the above isn't working, because 

Parse error in expr near 'cEgo'

Any suggestions?
 
#10


is bMyFirstBar defined in the GlobalScript.ash header?


something like this
Code: ags


bMyFirstBar=gGui2;



or
Code: ags

bMyFirstBar=(29);
 



maybe?


#11




Thankyou both.
I belive you Khris, and I don't mean to waste anybody's time.  The first 6 or 7 threads I searched seemed too advanced for me, (or delt with specific issues) and the manual entry is so terse that I don't know how to apply the information.

I think I have applied your codes correctly, because the game runs.

But I don't know how to call it.

I have an object in room 1 that on click opens a gGUI holding a picture of Mr. Drew, and space for the questions and answers.

What is the correct way to proceed?


ps

I tried putting

Code: ags


  question[0].category = eCatPolitics; 
 


in room1.asc

under
function oQ1_AnyClick()


but got

" Failed to save room room1.crm; details below
room1.asc(10): Error (line 10): Undefined token 'question' "

when I capitalized the Q in question, the message changed to:



" Failed to save room room1.crm; details below
room1.asc(10): Error (line 10): fixed size array cannot be used in this way "




#12
Hi,

I need some InStructions!

I'm trying to make my first Struct -  to make a database of questions.

in Globalscript.asc I have

Code: ags


Question question[50];


struct Question {
  String q; //The question
  String ans[4]; //The answeres, from ans[0] to ans[3]. You could make 4 seperate variables, I preffer arrays
  int RightAns; //Number of the correct answere;
  int catagory; //Say 1 = Nature, 2 = Poltics etc.
};




Question question;
question. = ("Cé hé seo?");
question.ans[4] = ("Ronnie Drew");
question.RightAns = ("Ronnie Drew");
question.catagory= 1;



The error I get reads

GlobalScript.asc(61): Error (line 61): Parse error: unexpected 'Question'

line 61 is the first line of code above.

I don't really get the concept of struct yet- and probably won't until I've done a few.

???

Pointers appreciated.   
AnMDC

#13
Thankyou Geork!

That gives me something to work on, for sure!
#14

Hello.


This might not be the right forum for this post.
Arguably, this might not be AGS appropriate at all.

I want to make a 4 player quiz game, a bit like 'buzz' for the ps2.

Here's how I see it:

Room 1:  select number of players, 1-4.

Room 2: shows a simple checkerboard with the players lined up on the left.  (actually the players are objects. cEgo is only used to change room) and the finish-line on the right.

The keys Q,Z,P and M act as the players' buzzers.

A question pops up in a GUI. If player 1 presses his buzzer first, another GUI appears, with 4 possible answers to the question, and the player's portrait above.  If he is correct, he moves forward one square. If he is wrong, he moves back one square.

More sophisticated challenges (solving a maze on a timer/ identifying a tune etc) take place in subsequent rooms.

The first player to make it to the right edge of the board is the winner.

Screenshot here :


http://madradubhcroga.blogspot.com/2012/05/blog-post.html


That's the plan, in general. 
My main concern is getting the architecture right at the beginning, so I can upload engaging content as I create it.
Another issue is how to arrange categories of questions, and randomize within those categories.

Does anybody have any thoughts on this?  Or on the project in general?

Discussion and ideas appreciated.
#15
Thankyou, I'll try that.
#16
Beginners' Technical Questions / Timelimit bar
Wed 16/05/2012 22:29:29

Hi.

Does anybody know how to make a bar that gets shorter as the time runs out?

I'm looking at the "Topic: How to make a bar that shows an int value?"

and I think half the answer is there... but I don't quite understand it/how to adapt it.

Eg: 10 seconds = full bar (unclipped image)
        5 seconds = half bar (50% clipped)
        1 scond    =  10% bar


thankyou
#17
Thank you for your consideration.

I understand that I may not have selected the appropriate forum, sorry for any inconvenience.

Khris- that CSV system sounds promising, I may try that eventually.  Maybe another way would be to implement your solution to my Re: Where is the 'Room message editor?' question.


I'm going to sketch out a plan and then I'll be able to ask more specific questions.

Best regards

MDC

MDC
#18

Hi everybody.

I'm getting the hang of AGS, and I like it very much.
But I'm going to put my Adventure Game project on hold:
I want to make a 'quiz' game using AGS.

I think it'll be good, with trivia categories, reflex based games, puzzles, picture, memory, and audio challenges.

But there are distinct technical issues.


The big one is making databases to hold categories of questions, and difficulty levels of those questions.

I'd like to represent the category selection as a big spinning 'wheel of fortune' so not quite random but rather the wheel slows to a stop on a category (eg 'Animals').  Then Animals appears on the Question Map(GUI), with  10 20 30 40 and 50 point buttons (randomly from the relevent databases).  They spin the wheel again and so on until the Question Map(GUI) looks like this:



animals music mystery literature
10       10     10      10         10
20       20     20      20         20
30       30     30      30         30


Like in 'Jeopardy'
I want the player(s) to be able to select a question (EG Animals, for 30 points).  Then the computer should select an Animals question randomly from the correct database of 30 point animal questions.

I think I can just about make that happen.  But does anybody know the best way to proceed?  I don't see how to make it easy to go back and upload more questions when the structure is in place. Assuming I get that far. without haduken-ing my monitor.

I don't mean to make someone else do all the work for me;
but collaborators opinions and colossal insights are all alike welcome.

#19
Thankyou, I'll try that.
#20


Hi all.


Hard to articulate this question -

I want to make a trigger in room_RepExec() that activates something else.
Like:

room_RepExec()
{


if (object[1].Visible == false){
// then [1]
}
}


where

[1] is:

gGui12.Visible = true;
cChar3.move(222,333);
and other stuff.

Is there a name for this kind of set up?
How is it phrased and where would the [1] be defined for the computer and where should it go in the code?
(I've found it can't go in the room_RepExec() because sounds stutter, gGuis flicker and mouse pointers disappear.)
SMF spam blocked by CleanTalk