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.

Dark GDK / Help please on typing input while game is running

Author
Message
Dragon Tiger Wolf Bald Eagle
16
Years of Service
User Offline
Joined: 5th Feb 2008
Location:
Posted: 20th Mar 2008 00:12
I have made a simple 3D maze for a person to go through however I would like to add some cheats so that if I want to test a maze or if they have completed one that they just type in a code and it brings them right there. Like lets say they type in mwend. What do I use like char* or is there a string or what in this DB I know what to use in Normal C++ but this doesn't allow some of the normall C++

The quality of what a man gives without seeking anything in return shows his integrity.
Dragon Tiger Wolf Bald Eagle
16
Years of Service
User Offline
Joined: 5th Feb 2008
Location:
Posted: 20th Mar 2008 03:50 Edited at: 20th Mar 2008 05:09
I Figured it out.
if (dbControlKey()==1)
{
cheatcds=1;
}
if (cheatcds==1)
{

dbText(0,0,"Enter Cheat Code ");
char* cheatcode;

cheatcode=dbInput();
if (_stricmp(cheatcode,"mcend")==0)
{

dbPositionCamera(1811,dbCameraPositionY(),4810);
}
if (_stricmp(cheatcode,"i want a ball")==0)
{
dbMakeObjectSphere(444,33,33,2);
dbPositionObject(444,dbCameraPositionX(),dbCameraPositionY(),dbCameraPositionZ());

}

cheatcds=0;
}


The quality of what a man gives without seeking anything in return shows his integrity.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA

Login to post a reply

Server time is: 2024-09-29 15:16:48
Your offset time is: 2024-09-29 15:16:48