I'm almost embarased to ask this, but I have no idea how to actually get the active inventory item to do anything, here's a quick rundown of my problem:
I need to be able to use an item on a character that then takes you to a different room.
here's the scripting I've tried to use:
function character4_a() {
// script for character4: Use inventory on character
if character[PZY].activeinv (6);
and (GetGlobalInt(6)=1);
Displayspeech (PZY, "here we go");
Fadeout (30)
NewRoomEx (7, 39, 228);
}
and lo and behold, it doesn't work in the slightest, hooray.
sounds pretty simple to me, but I have a very low level of understanding for the scripting, I've only been using AGS for little over a week, so feel free to laugh all you want.
Well, I'm not experienced in this field, but I think it should be:
function character4_a() {
// script for character4: Use inventory on character
if ((character[PZY].activeinv==6)&&(GetGlobalInt(6)==1)){
DisplaySpeech (PZY, "here we go");
FadeOut (30);
NewRoomEx (7, 39, 228);
}
}
Remember also when doing comparisons you need == other than =. Notice the cases of letters in function names also.