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 - qcenaman

#1
Thank you too khris, ill try to do that from now on.
#2
It was my fault too, besides that brace i forgot to add something to the events, its working fine now, everything is ok.

Thank you very very much for your time.

And about the search, this scripting thing has so many words and functions that i really don´t know what to search for!!

Anyway, thank you again for your time, you really helped me a lot.
#3
ok i put what you said but now i get a error, it says:

Error (line 13): Nested functions not supported (you may have forgotten a closing brace)


This is what i have there:

// room script file
bool doorlock=true;

function hHotspot2_UseInv()
{
if (cEgo.ActiveInventory == iKey){
  if (doorlock) {
    cEgo.Say ("I unlocked the door");
    doorlock=false;
  }
  else cEgo.Say ("The door is already unlocked.");
}
function hHotspot2_Interact()------------------------------------------>here is line 13
{
if (doorlock) cEgo.Say ("It's locked.");
else player.ChangeRoom(3, 477, 477);
}




I tried to put a } before that line and it will enter game, but it doesn´t say it´s locked when interacting without key, and after interacting with key, it wont teleport to the other room, what do you think it´s wrong here?

Btw thank you for your time.
#4
Thank you for your answer, but please remember I'm a "noob" on this program.

What i did was something i saw on a video and this is what i used:



function hHotspot2_UseInv()
{
if (cEgo.ActiveInventory == iKey)
player.ChangeRoom(3, 477, 477);
}


So how would i integrate your code with this?
#5
Hi, everyone, i started experimenting with AGS a few days ago, i have been following some videos on youtube, but those videos do not adress some of my problems.

I made a few rooms just as a test so i can learn the program, and in one of those rooms, i made a door wich is locked, so you need a key you can find in another room.

Everything works fine, i get the key open the door and enter the room.

But i do not know how to make that door always open after the key has been used.

I thought of teleporting the player to another copy of the room where the door is always open, but i think this is no real solution. There must be a way to do this with scripting.

Can anyone help me on this?

Thanks is advance.
SMF spam blocked by CleanTalk