Menu

Show posts

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

Messages - metalmario991

#21
I am working on the cursors for my game when I was wondering, how do I program it so the cursor changes on stuff you can interact with?
#22
How do I get a screen to scroll to another instead of completely changing the room?
#23
In the Inventory section for General Settings I have this:

Display multiple icons for multiple items = false
Inventory item cursor hotspot marker = none
Override built-in inventory window click handling = false
Use selected inventory graphic for cursor

Will that help?
#24
I got the cursor to change but it is just doing the same thing as the pointer icon. I need the player to be able to interact items within the inventory. How do I do this?
#25
I am trying to implement a Use/Interact Icon in the inventory box, but I am running into some problems. When you click on it changes to the walk icon and it doesn't interact with anything. Here's how I wrote it;

function bInteract_OnClick(GUIControl *control, MouseButton button)
{
mouse.Mode = eModeInteract;
mouse.UseModeGraphic(eModeInteract);
}
#26
Thank you.
#27
I wanted to know if there is a way to lock the cursor on one specific type. For example, when the player dies and gets the Death Screen how do I make it so they can only use the Pointer cursor?
#28
Yeah, sorry about that. I just was stressed a little. But it turns out a just had a real stupid moment and actually put in my timer id instead of the actual ID. I didn't realize my mistake until after I put that up. Again, sorry.
#29
I am still having trouble on cancelling timers. Here is what I am asking: How do you make sure a timer DOESN'T run out. You need to a get to a certain area in a certain time limit afterwards the timer should go away. How do I do this?
#30
Because I can't find the answer anywhere else how do I tie a timer to the whole game so the event that occurs when it expires happens anywhere instead of just one room? If I need to be more specific, I am just asking where I put the execution after it expires.
#31
This is the following script for an action in my game.

function hRed_Interact()
{
if (Power == 0)
{
Display("Nothing works without power.");
}
else if (Power == 1)
{
cEgo.Say("Maybe I shouldn't have pressed that...");
Display("You think?!?");
Wait(1);
cEgo.ChangeRoom(27, 900, 900);
Display("I hope I am in your will.");
cPod.ChangeView(15);
cPod.Animate(0, 5, eOnce, eBlock, eForwards);
Display("After blowing a big orfice in the side of the ship the pressure from space does a find job turning your already warped body into a hellish abomination. It is too sad and hideous to see.");
Display("(It's more hideous than your Mother-in-Law!)");
cEgo.ChangeRoom(11);
}
else if (Power == 2)
{
Display("There is no need for that.");
}
}

For some reason the game ignores cEgo.ChangeRoom(27, 900, 900);, displays the message afterwards, and then gets stuck on WAIT. What on Earth is Wrong here?
#32
Thank you. That worked fine.
#33
In my game you need to press a button to open a door in another room but when I put that in the script and start playtesting it says the object is undefined because it is not in that room. How do I make something in one room affect something in another?
#34
Okay the error has been fixed. Everything works fine now.
#35
I fixed that but I am still getting the same error.
#36
I'm going to try this. This is my entire code for this room.

function hDood_Interact()
{
Display("Unlike many doors aboard the USS Arvaid II this one requires a code card!");
}

function hDood_Look()
{
Display("The ship's EVA suits are stored in these closets.");
}

function hDood_Talk()
{
Display("You won't get in there doing that.");
}

function hDood_UseInv()
{
if (cEgo.ActiveInventory == iCard)
{
Display("It's out of order. Also, you are doing it WRONG.");
}
else
{
  Display("That won't accomplish anything.");
}

function hSign2_Look()
{
Display("This sign indicates that this door is out of order. Too bad.");
}

function hSign2_Interact()
{
Display("No out of order sign is needed in this journey.");
}

function hSign2_Talk()
{
Display("No response will ever be gained from that.");
}

function hSign2_UseInv()
{
Display("Nothing Happens.");
}

function hSlot1_Interact()
{
cEgo.Walk(127, 79, eBlock, eWalkableAreas);
Display("You try fitting your finger into the slot but fail and feel rather sad.");
}

function hSlot1_Look()
{
Display("Code cards go in here to access the EVA suit storage.");
}

function hSlot1_Talk()
{
Display("That won't work.");
}

function hSlot1_UseInv()
{
if (cEgo.ActiveInventory == iCard)
{
  cEgo.Walk(127, 79, eBlock, eWalkableAreas);
  Display("You slip the code card into the slot.");
  Display("You miss however, the fact that the slot, quite clearly, is out of order.");
  cEgo.Say("D'oh!");
}
else
{
  Display("That won't work in the slot.");
}
function hSlot2_Talk()
{
Display("Your witty words won't open the door.");
}

function hSlot2_UseInv()
{
if (cEgo.ActiveInventory == iCard)
{
  if (oEvaDoor.Visible == true)
  {
    cEgo.Walk(210, 81, eBlock, eWalkableAreas);
    cEgo.FaceLocation(209, 53, eBlock);
    Wait(10);
    cEgo.FaceLocation(127, 73, eBlock);
    oEvaDoor.Visible = false;
    oKall.Visible = true;
  }
  else
   cEgo.Walk(210, 81, eBlock, eWalkableAreas);
    cEgo.FaceLocation(209, 53, eBlock);
    Wait(10);
    cEgo.FaceLocation(127, 73, eBlock);
    oEvaDoor.Visible = true;
    oKall.Visible = false;
}
else {
Display("Wrong!");
}

function hSlot2_Interact()
{
Display("Try something smarter.");
}

function hSlot2_Look()
{
function hSlot2_Look()
{
Display("Code cards go in here to access the EVA suit storage.");
}

}

function hCrest_Interact()
{
Display("Don't disgrace that crest, George!");
}

function hCrest_Look()
{
Display("This is a rug in the image of the Cosmo Confederation Crest Design #12. Used from 3239 to 3930.");
}

function hCrest_Talk()
{
Display("Nothing will ever respond.");
}

function hCrest_UseInv()
{
Display("Don't mess with it!");
}

function hKeiBoard_Interact()
{
cEgo.Walk(135, 185, eBlock, eWalkableAreas);
Display("You try to something with the keyboard but you have no idea what any of these buttons do so, you decide to leave them alone.");
}

function hKeiBoard_Look()
{
Display("A keyboard lies on the console.");
}

function hKeiBoard_Talk()
{
Display("STOP TALKING TO INANIMATE OBJECTS!!!");
cEgo.Say("No.");
Display("Ok.");
}

function hKeiBoard_UseInv()
{
Display("Nothing can be used there.");
}

function hConsole2_Interact()
{
cEgo.Walk(97, 155, eBlock, eWalkableAreas);
Display("You bang repeatedly on the console, never notcing the keyboard and button attached to it.");
}

function hConsole2_Look()
{
Display("A console is mounted on the southeren area of the Airlock.");
}

function hConsole2_Talk()
{
Dislay("The console ignores you.");
}

function hConsole2_UseInv()
{
Display("Why would you want to use that there?");
}

function hElen_Interact()
{
cEgo.Walk(55, 108, eBlock, eWalkableAreas);
cEgo.ChangeRoom(6, 900, 900);
}

function hHotspot13_Look()
{
Display("You are standing inside the USS Arvaid II Airlock. The scenery is different (thankfully) from the rest of the ship, though I doubt and airlock would need to look good. Why would it have to? Two doors and a console occupy this room. On the east wall is a door to the shuttle area and your escape!");
}


Do you see anything that could cause this: Failed to save room room22.crm; details below
room22.asc(29): Error (line 29): Nested functions not supported (you may have forgotten a closing brace)
#37
Tzachs, how would that look like in code?
#38
function hSlot2_UseInv()
{
if (cEgo.ActiveInventory == iCard);
{
  if (oEvaDoor.Visible = true);
  {
    cEgo.Walk(210, 81, eBlock, eWalkableAreas);
    cEgo.FaceLocation(209, 53, eBlock);
    Wait(10);
    cEgo.FaceLocation(127, 73, eBlock);
    oEvaDoor.Visible = false;
    oKall.Visible = true;
  }
  else
   cEgo.Walk(210, 81, eBlock, eWalkableAreas);
    cEgo.FaceLocation(209, 53, eBlock);
    Wait(10);
    cEgo.FaceLocation(127, 73, eBlock);
    oEvaDoor.Visible = true;
    oKall.Visible = false;
}
else
Display("Wrong!");
}
}

Could this have something to do with it?
#39
Yes that works. Thank you.:smiley:
#40
I keep getting this error when I try to play my game where it says room22.asc(80): Error (line 80): Nested functions not supported (you may have forgotten a closing brace)
but my line looks like this:
function hSlot2_Talk()
What is wrong?!?
SMF spam blocked by CleanTalk