Ha ha. Funnily enough, I did know about this, but have forgotten in recent times. I've been writing the coordinates into the room script file as comments until I added it to a function.
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 MenuQuote from: Gabarts on Mon 09/06/2014 08:23:05
Interesting posts
Would be nice to add a randomizer for the code. Each time the game starts it mixes up the correct sequence for the hotspots or buttons...
is possible to do?
int ran = Random(2); //Gives you 3 random passwords. 0, 1 and 2.
if (ran == 0)
{
sPanelPassword = "1234";
}
else if (ran == 1)
{
sPanelPassword = "4321";
}
else if (ran == 2)
{
sPanelPassword = "9876";
}
/*Global strings:
sPanelPassword: What the password is set to.
sPanelPasswordEntry: What the numbers entered on the panel are.
Then to check the password: */
if (sPanelPassword == sPanelPasswordEntry)
{
//whatever happens.
}
Quote from: monkey_05_06 on Wed 30/10/2013 06:10:43
Well coming at that question from the opposite angle, why would someone define member functions if the instances have no members on which to function?
//Some kind of wallet
struct wallet
{
import static void addMoney(int money);
import static void loseMoney(int money);
import static void getStolen();
};
//Then you could use:
wallet.addMoney(20); //and so on.
struct cashCarrier
{
int money;
import void getStolen();
};
cashCarrier wallet;
wallet.money += 20;
Quote from: Crimson Wizard on Tue 29/10/2013 15:28:52
Here's a tip, though: if you are not adding any variables to struct, then declare all functions as "static" and use the struct without creating actual object
//script header
struct thing
{
import void Thisfuction();
};
import thing mystruct;
thing mystruct;
void thing::Thisfuction()
{
QuitGame(0);
}
export mystruct;
mystruct.Thisfunction();
struct thing
{
int whatever;
import void Thisfuction();
};
if (gQuit_Gui.Visible == true)
{
if (keycode == eKeyY)
{
QuitGame(0);
}
else if (keycode == eKeyN)
{
gQuit_Gui.Visible = false;
gMenu_Gui.Visible = false;
gMenu_Gui.Clickable = true; //See my edit below for why this is here.
}
}
Quote from: Armageddon on Tue 12/06/2012 05:14:38Also I was wondering how you display a quitting GUI when you try to close the game?
QuitGame(1);
QuitGame(0);
gQuitGui.Visible = false;
Quote from: GrimReapYou on Tue 14/02/2012 17:26:15
1.Cant find any way to make inventory items interact with anything but other inventory items and the ego himself.
2.Follow char doesnt seem to be stopping on command.
function cRandomNPC_UseInv()
{
if (player.ActiveInventory == iDagger) // If the player is using the dagger on cRandomNPC
{
//Some dagger code
}
}
cdag.FollowCharacter(null);
cdag.Walk(mouse.x, mouse.y, eBlock);
Quote from: Ghost on Thu 02/02/2012 14:04:55Quote from: Creator on Thu 02/02/2012 13:38:34
I'm thinking about doing something similar as the OP and I'm pretty sure I can do reading and writing to a file, but how could I go about doing this?
There's a module for that- I have not tried it out myself and it's pretty old, but maybe it's useful:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23109.0
Quote from: cat on Thu 02/02/2012 12:43:39
You could also encrypt the textfile or add a checksum to avoid that players might edit it.
Quote from: Khris on Wed 25/01/2012 08:10:00because
It sure sounds like it.
Quote from: octochan on Wed 25/01/2012 07:40:01
[The only other character in the game right now is the default cEgo.
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.074 seconds with 19 queries.