Glad it works.

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
if (button == 4) {
if (GetPlayerCharacter() == SOF) DisplaySpeech(SOF, "You're already playing as me.");
else {
SetPlayerCharacter(SOF);
GUIOff (GUI3);
SetDefaultCursor();
}
}
// missing closing brace here so GUI4 gets included in GUI3:
if (interface == GUI4) {
if (button ==0) {
GUIOn(3);
SetMouseCursor(6);
}
Quote from: sameeralord on Tue 21/06/2005 12:58:58Thanks for the help but I still don't know how to do it. I'm new to this sripting business and could you please explain bit more.
Quote from: sameeralord on Tue 21/06/2005 12:58:58By the way how do I do something like you got 10 minutes or you'll die. Style in abstructed 10 minutes.
cArmyguya.FollowCharacter(player);
if (cArmyguya.IsColldingWithChar(player) == true) {
player.ChangeRoom(6);
}
Quote
How do you script that when you are playing the first adult croc (EGO) and clicks on his GUI button nothing will happen or maybe execute a DisplaySpeech commando: "Hey, you're already playing as me."?
if (player == cEgo) cEgo.Say("You're already playing as me.");
else cEgo.SetAsPlayer();
if (GetPlayerCharacter() == EGO) DisplaySpeech(EGO, "You're already playing as me.");
else SetPlayerCharacter(EGO);
//...
//}
else if (button == eMouseLeftInv) { // if left mouse button clicked on an inv item
inventory[game.inv_activated].RunInteraction(mouse.Mode);
}
else if (button == eMouseRightInv) { // if right mouse button clicked on an inv item
inventory[game.inv_activated].RunInteraction(eModeLookAt); // this is the standard behaviour, change as desired
}
//else { // right-click, so cycle cursor
//...
cWelder.FollowCharacter(player); // check manual for options, also check out game.following_room_timer variable
if (cWelder.IsColldingWithChar(player) == true) {
Display("Game over!");
}
// room script
#define AREA_NUM 2
#define AREA_SCALING_TOP 100
#define AREA_SCALING_BOTTOM 10
#define AREA_EDGE_TOP 100
#define AREA_EDGE_BOTTOM 190
function repeatedly_execute_always() {
//...
if (GetWalkableAreaAt(player.x - GetViewportX(), player.y - GetViewportY()) == AREA_NUM) {
int scaling = AREA_SCALING_BOTTOM + (((AREA_EDGE_BOTTOM - player.y) * (AREA_SCALING_TOP - AREA_SCALING_BOTTOM)) / (AREA_EDGE_BOTTOM - AREA_EDGE_TOP));
SetAreaScaling(AREA_NUM, scaling, scaling);
}
//...
}
SetNextScreenTransition(eTransitionInstant);
player.ChangeRoom(1);
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.424 seconds with 15 queries.