Hi!
I'm quite noobÃ, in AGS but I have some Delphi-experience. My problem is this:
I have a corridor which EGO must cross, but I want the guard in the otherside of the corridor first check if EGO has his ID(an item which is in the starting room :)) and if not he won't let ego pass. I had this working with help of demo questÃ, some versions backwards(it was about a year ago). If someone could be so kind and post me the correct scrpit to use. Thanks to you allready.
Do you want that to happen all by itself?
Create a region next to the guard.
Then use the interaction editor ("Player walks onto region") and add the following script:
if (player.InventoryQuantity[iIdcard.ID]==1) {
Ã, cGuard.Say("Go on through.");
Ã, player.Walk(300,130);Ã, // end of corridor
}
else {
Ã, player.StopMoving();
Ã, cGuard.Say("You don't have an ID, sorry.");
Ã, player.Walk(100,130);Ã, // player walks back, off the region
}
Of course, you could add an animation of the player showing his ID, or you could run a dialog. But as long as you're still learning the script language, I'd recommend sticking to simple solutions.
Thanks, though I solved it by myself allready, but I can use that script with something else. And i managed to put the handing over animation too^^.