Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
btecbuddies
22
Years of Service
User Offline
Joined: 21st Oct 2002
Location: United Kingdom
Posted: 24th Mar 2003 15:26
Is there a possible way of making a game scan for a code being entered and then when it has been entered the code is edited.

Thanks in advance
cusoi
22
Years of Service
User Offline
Joined: 3rd Jan 2003
Location: Netherlands
Posted: 24th Mar 2003 17:43
Of course!
You can do this:

do
cheat$=cheat$+inkey$()
if cheat$="hello"
live=live+1
cheat$=""
endif
loop


But this is very basic. You have to search the string for the cheats, that's a better way.

Pentium IV 2.4 GHZ 256 MB Ram Geforce 4 TI 4200 128 MB
www.cuso.tk
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 25th Mar 2003 03:44
I think method is not quite right



AnalSauceMonkey
22
Years of Service
User Offline
Joined: 24th Oct 2002
Location: I can't find myself
Posted: 26th Mar 2003 00:54
this is the method i use:



Leade
22
Years of Service
User Offline
Joined: 8th Nov 2002
Location: United Kingdom
Posted: 26th Mar 2003 15:58
something i was working on, it helps to have a registered DB v1.13



This function checks the end of the entry buffer and if it is the same as the cheat text returns a 1 and empties the buffer.
Attreid
22
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 26th Mar 2003 18:08
I use another system :
I just use an input when the user press this key : "§"

Bu$herie
How many civilians is he going to kill ? I know that Bush will sit at God's left, next to Saddam.
minkus
22
Years of Service
User Offline
Joined: 18th Jan 2003
Location: My House
Posted: 27th Mar 2003 05:35
i usually do:



They say I'm crazy
but I'm actually REALLY crazy
large_nostril
22
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 27th Mar 2003 08:38
This "§" isn't a standard character on a US keyboard (at least I can't find it). What key value does it hold ( Scancode()=? ).

If you want fresh underwear in the morning, take it off the night before.
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 27th Mar 2003 09:12
like most of these characters they have a code associated with holding the alt key

open notepad then hold the alt key then pres these buttons in a sequence 0167
eg Alt - 0167

the character map application provided with all flavours of Windows will show them to you.

btw that symbol is in verdana for sure.

darkCorridor
22
Years of Service
User Offline
Joined: 27th Jan 2003
Location:
Posted: 27th Mar 2003 22:04 Edited at: 27th Mar 2003 22:05


[br]mikey
darkCorridor
22
Years of Service
User Offline
Joined: 27th Jan 2003
Location:
Posted: 27th Mar 2003 22:04
is it just this or does that not work indi? (im using XP if that matters.)

[br]mikey
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 28th Mar 2003 06:56
if u installed xp without a character map then consult your CD for installing more parts of the Os.

darkCorridor
22
Years of Service
User Offline
Joined: 27th Jan 2003
Location:
Posted: 28th Mar 2003 18:23
i have the charecter map

[br]mikey
Tigerdane
22
Years of Service
User Offline
Joined: 28th Mar 2003
Location:
Posted: 29th Mar 2003 03:39
I would try something like this... I suppose? =)

In the main loop

If returnkey()=1
input "Enter Cheat: ";Cheat$
if Cheat$="Life" then Life=Life+1
if Cheat$="Armor" then Armor=Armor+1
endif

Where Life is your Life and typing Life in the cheat box gives you one extra life, same as armor. If you don't enter any of the cheats, it will not do anything, but if you want to have a "No such Code" message then do this.

If returnkey()=1
input "Enter Cheat: ";Cheat$
if Cheat$="Life" then Life=Life+1
if Cheat$="Armor" then Armor=Armor+1
else
Set Cursor 0,0
Print "No Such Code!"
endif

That does the exact same thing as before except it prints at 0,0 on the screen "No Such Code!" if you didn't type a right code!


Hope that Helps!

btecbuddies
22
Years of Service
User Offline
Joined: 21st Oct 2002
Location: United Kingdom
Posted: 31st Mar 2003 11:22
Hey thanks for all the help

Login to post a reply

Server time is: 2025-05-16 15:29:27
Your offset time is: 2025-05-16 15:29:27