Can you add cheats to your game?

Started by computerbynar, Fri 26/03/2004 13:51:35

Previous topic - Next topic

computerbynar

I think i'd use a gui text field, but what is the code i'd use?

Ishmael

What about if you read the manual part about the String functions? And, type in the search "InputBox" and you'll be a bit wiser, methinks.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Hollister Man

A cheat is really only usually a "feature" used by the developers to make the game easier to test.  It becomes a cheat when they leave it in and a consumer or player finds out about it. :)

So it shouldn't be too hard to do, just program it like it were a "feature."
That's like looking through a microscope at a bacterial culture and seeing a THOUSAND DANCING HAMSTERS!

Your whole planet is gonna blow up!  Your whole DAMN planet...

Mr Flibble

You could alter the debug keycodes in the global script to make your cheats less obvious.
Obviously using the ASCII cose, you could change things from
Keycode == (blah) )= Change room // crt+ x
to
Keycode == (blah) )= Change room // crt+alt+s

or something.
Or add a new script function like
KeyPress(blah)
Return all health

Sorry I don't know it exactly.
Ah! There is no emoticon for what I'm feeling!

Akumayo

I'm using "cheats" in the game I am developing right now.  I use an input box.  Anyway, here is the exact code for cheats:

--------------------------------------------------------------------

string buffer;
InputBox ("Please enter a password", buffer);

if (StrComp (buffer, GetTranslation ("cheat 1"))==0) {
Cheat 1's script
}

else if (StrComp (buffer, GetTranslation ("cheat 2"))==0) {
Cheat 2's script
}

else if (StrComp (buffer, GetTranslation ("cheat 3"))==0) {
Cheat 3's script


-----------------------------------------------------------------


Perhaps after the player beats the game, a text box appears that says: "In the password box, enter these words for cheats, cheat 1, cheat 2, cheat 3

At the title screen, have a button that when clicked runs the cheat script above.

Luck
"Power is not a means - it is an end."

Hollister Man

So its more like the "cheats" feature in Neversoft's games like Tony Hawk and Spiderman, yes?
That's like looking through a microscope at a bacterial culture and seeing a THOUSAND DANCING HAMSTERS!

Your whole planet is gonna blow up!  Your whole DAMN planet...

Ishmael

You can do it any way you want. One of my games has a feature that you can turn on debug mode with a key combination. You can use key combinations, secret rooms where you can pick what to do, input boxes, 1 pixel hotspots to click on to activate a cheat... what ever you can make.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Akumayo

Hollister man:

Yes, just like in those games.  Only, in my game, you can find some cheats by means of secret passages, etc.  When you beat the game you can get cheats like: increase speed, slowdown enemies, get 1000 points, wear red suit, be snake, etc.  You gave me an idea though, mabye you can use your score to buy new cheats like in Tony Hawk Underground.  
"Power is not a means - it is an end."

Cpt Ezz

i was think you could use a input box and use some code to make it do things if you type in the right thing.
just like in age of empires!!!!

Khris

You mean like Akumayo explained a few posts up five years ago?

Dualnames

Quote from: KhrisMUC on Mon 30/03/2009 13:37:41
You mean like Akumayo explained a few posts up five years ago?

I thought Akumayo was back, then was little disappointed. I recall me and Ashen made a console(Quake styled one).
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

SMF spam blocked by CleanTalk