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

#361
Hi

I have just started using Easy Pen G5 Tablet.

It makes for precision drawing and techniques.

However, I wish the pen would actually draw on the tablet instead of all eyes on the Screen. Plus the tablet area is larger than say 320 x 240.

I find that drawing a basic sketch on thin paper and tracing over it with the pen works ok.

Do you know of a better way?

cheers

steptoe

#362
Hi Monkey

took out the Room update Label part and added import update Labels as instructed.

Global ash at top:

Code: ags

import function UpdateLabels(int money); 


and this in Global asc:

Code: ags

function repeatedly_execute_always() {
  
//LABELS £

  LabelA.Text = String.Format("£: %d", A);
  LabelB.Text = String.Format("£: %d", A*3);
  LabelC.Text = String.Format("£: %d", A/5);

}


In room script:
Code: ags

A=(A+9000);


Works a treat as I only need to adjust Int A.

Solved.

Cheers Guys

:=

#363
Hi Monkey/Khris

I have INT 'A' set at 1000 for test run as well as 3 Labels A, B and C.

I then used this as per Khris which works:

Code: ags

function UpdateLabels(int money) {
  A += money;
  LabelA.Text = String.Format("£%d", A);
  LabelB.Text = String.Format("£%d", A*3);
  LabelC.Text = String.Format("£%d", A/5);
}


and this which gives an error:

Code: ags

function room_AfterFadeIn()
{
  UpdateLabels(0); // Undefined token 'UpdateLabels' 

}


Using AGS 3.2.1.111



#364
Hi

wont take updateLabels(0) in after fadein (UNDEFINED error)

I can definately see the advantage of updating all labels in one script.

It makes it more lengthy if i update all labels frequently like:

Example after awarding £ To Int A:

Code: ags

LabelA.Text = String.Format("£: %d", A);

LabelB.Text = String.Format("£: %d", A*3);

LabelC.Text = String.Format("£: %d", A/5);


Have deleted ints B and C and just have A.

Works but is repetitive. Could add (Labels) to globally Rep Exe Always.

cheers


#365
Good job someone did  :=

I'll give it a whirl

cheers Khris

EDIT: Created 3 LABELS: LabelA   LabelB  LabelC
Made 3 Ints A B C..

I put Int A at 5000 start.

Put you code in room yet only A (5000) shows whilst others display 0

Code: ags

function UpdateLabels(int money) {
  A += money;
  LabelA.Text = String.Format("£%d", A);
  LabelB.Text = String.Format("£%d", A*3);
  LabelC.Text = String.Format("£%d", A/5);


and

Code: ags

function room_AfterFadeIn()
{
  
LabelA.Text = String.Format("£: %d", A);

LabelB.Text = String.Format("£: %d", B);

LabelC.Text = String.Format("£: %d", C);

}


:(





#366
Hi all you mathematical  geniuses

Is it possible and if so how to do the following:

Int A: adds £ per correct answer and displays total on Label A.

IE £1000 per question correct = 5 correct answers= £5000 displayed on Label A.

After which:

Int B: Label B takes the total of Label A and x 3 to it and displays it (£15000) on Label B.

Meanwhile:

Int C: Label C takes the total of Label A and / 5 from it and displays it on Label C.

IE Label A £5000 Label B £15000 Label C 1000

Grateful if anyone can help

cheers




#367
Done this and works ok

ENTER NAME:

Code: ags


function btnEnter2_OnClick(GUIControl *control, MouseButton button)
{
 
 if (tbInput2.Text != "")
 
 {
  player.Name = tbInput2.Text;
  gName.Visible=false;
  
  cEgo.Say("Hello %s.", character[EGO].Name);
cEgo.Say("You and I have a lot to talk about %s.",character[EGO].Name);
cClaudia.Say("Hello %s, I'm Claudia",character[EGO].Name);
 
 }
 else
  Display("Can't use an empty string! You can't be the Nameless One!");
}


ENTER PASSWORD:

Code: ags

function btnEnter_OnClick(GUIControl *control, MouseButton button)
{
  
  
    if (tbInput.Text == "PASSWORD")
    {
        gPasswordGUI.Visible=false;  
        cEgo.Say("Yeah, correct!");
        cEgo.Say("Wow. That WAS easy %s", character[EGO].Name);
        
     }
  else
 {
    Display("WRONG!");
    TimesTried++;
    if (TimesTried >= 3)
    {
       TimesTried = 0;
       cEgo.Say("Go back and try again!");
        gPasswordGUI.Visible=false;
    
   }
 }
}


Many thanks Ghost

:=

#368
Just about perfik Ghost..

I've now got 2 types of Text Box situations under my belt.

cheers mate

:=

Final question... if i did a new GUI for players name input what can I use instead of:

Game.InputBox("What is your name?"); to specify text box entry as it brings up default Input Gui?


#369
Quote from: Ghost on Fri 02/12/2011 19:10:42
I can see that in the first block of code a bracket is "off", that has caused the problem.

Your edit looks okay to me, what's not working?

Hi Ghost

I'm playing with getting the TimesTried int working properly.

cheers

#370
Cheers Ghost

first part ok...

So far have just the if/ else display.. need to incorporate TimesTried int properly.

Amended timestried part:

Code: ags


function btnEnter_OnClick(GUIControl *control, MouseButton button)
{

  if (tbInput.Text == "SWORDFISH")
  Display("Yeah, correct!");
  
   
   {
   if (TimesTried > 1)
   TimesTried++;
   Display("Wrong");
    
   {
     TimesTried == 0;
     Display("WRONG LAST TIME!");// player failed- move to new room!
   }
  }
 
}


Clicks also seem to happen 'off' the button

EDIT
Have this now so far (works):
Code: ags

function btnEnter_OnClick(GUIControl *control, MouseButton button)
{ 

  if (tbInput.Text == "SWORD")
  {
  Display("Yeah, correct!");
  gPasswordGUI.Visible=false;
  
   
  }
  else{
   
   Display("WRONG!");
     // player failed- move to new room!
   }
  }


Close but not yet there

cheers


#371
Hi

Thanks Ghost,

Have Made the Variable Int (TimesTried)

Obviously I need to add that to the button script but I believe it is hardcoded as default. I assume it would involve making a new Text box and button?

Waiting to continue
...................

#372
Hi

this may be a noob question but I have not used text input boxes before and thought it would add to my armoury for future use. I have been reading up about them but need some assistance.

So far:

Code: ags

player.Name=Game.InputBox("What is your name?");
cEgo.Say("Your Name is %s.", character[EGO].Name);
cEgo.Say("Come with me %s", character[EGO].Name);
cEgo.Say("You and I have a lot to talk about %s.",character[EGO].Name);


which works fine and I can display Players name anytime.

However, imagine it to be a password for example and you have to type the correct password in else Display Incorrect password. You have 3 chances to get it right else automatically go back to last room and try again or something else for example.

The Input box is naturally reset.

Also, changing Characters Name (Not script Name). Example: Roger(cEgo) to players name based on input text box.

This is a loose idea and any guidance would be appreciated.

:o


#373
Hi Snake

I sort of anticipated some people just clicking on answers willy nilly (if they are lucky enough not to get 3 strikes) and exhausting all questions..

I did not expect all questions to be done so soon to be honest with you though I expect the majority won't.

Looks like 'll need to add a few more questions in..

I will look into it.

EDIT: more questions added.

cheers

steptoe


#374
Hi

You should stick info in the 'Games in Production' first, then, once it is finished, put it in 'Completed Games' when you are ready to hit the world with it.

Meanwhile read about getting your game ready to upload to AGS.

Good luck
#375
Hi

Welcome to the MONEY CAB: The only cab that pays YOU!

Based on the TV game show 'Cash Cab'.

Win lots of money by answering questions in the Money Cab.

You have the distance of your journey to answer questions and win money.

Get a question wrong or run out of question time and you get a Strike, 3 Strikes and you get booted out and leave with nothing!

If you get stuck you can do a Mob Shout and someone will try to help you.
You can only do a Mob Shout once.

There are 3 Modes to choose from at the start.

Money Won, Strikes, Time and Distance are displayed.

Beware, not for the feint hearted!

Are you full of trivia?

CONTOLS: USE MOUSE POINTER TO CLICK ON ANSWER BUTTONS AT THE BOTTOM.

To QUIT Game: click the X image or press Alt + X on keyboard.

There is no Saving or Loading.

This is a very short game so get those questions right!

This game is 2nd party untested so please PM (NOT here) any bugs/problems found.

This game remains open for a deluxe game.

cheers





Download:

http://www.adventuregamestudio.co.uk/games.php?category=&action=detail&id=1500&refresh1322572724




#376
Khris:

It was a thought I had, but opted out for fail-safe reasons as mentioned (after consideration).

I overlooked Abort because I was looking at 407(Alt) + X.

In game design you do need an exit, period. I do have an exit sign visible and of course good old Alt + X is available as well.

I appreciate your words of wisdom for future reference.

Monkey:

Likewise as with Khris, thanks.

OSP: How to script crap in the best possible way.

Don't steal any crap ideas from us minor urchins :D

Thanks guys

#377
Hi

thanks for your answers guys.   

It was more of a quest to find an answer than to actually use it so no total Troll points monkey  ;D

It is fine as it is with alt + x to quit.

I do have a visual Quit option available during the game.

Thanks again.




#378
Hi

I am trying to disable the keyboard for every room.

The below code in each room works but does not stop Alt + x, though it does disable Esc, F save, F Load etc.

In each Room I have:

Code: ags

function on_key_press(eKeyCode k) {

  // kill all keyboard functionality
  ClaimEvent();
}


Even tried this Top of Global:

Code: ags

bool kb_on = true;


and with this in Global:

Code: ags

function on_key_press(eKeyCode keycode)

{
  if (!kb_on)   // and with if (kb_on)
  {
    ClaimEvent();
    return;


Can you help?

Cheers




#379
AGS Games in Production / Re: ** Money Cab
Fri 25/11/2011 13:39:23
Hi

Money Cab Game is now 99% done.

Updated Screenshot:


Just need a good tester to help iron out any bugs/problems... Please PM.

steptoe




#380
Tester wanted for new quiz game 'Money Cab'

Screenshot


Please PM for details and download.

cheers

steptoe


SMF spam blocked by CleanTalk