Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Tue 18/11/2003 09:32:59

Title: Interaction action scripting question
Post by: on Tue 18/11/2003 09:32:59
I was hoping that someone can tell me how to alter the INTERACTION action, so the character first walks to the object/hotspot and then interacts with it.

Thanks in advance
Title: Re:Interaction action scripting question
Post by: Timosity on Tue 18/11/2003 12:34:19
You can set a 'walk to point' with hotspots while under the hotspot tab in the AGS editor.

You can also use:

MoveCharacterToHotspot(EGO,2); //will move character EGO to the walk to point of Hotspot 2

for objects:

MoveCharacterToObject(EGO,2); //will move character EGO to object 2


you could also just manually move the character to any spot before interacting.

EG.

MoveCharacter(EGO,100,150);
while (character[EGO].walking) Wait(1);

then the rest of script here.

for an object You could also set a walk to point for a hotspot, just so it is more acurate, using MoveCharacterToHotspot(EGO,2);


There's a few ways to do it. hopre it helps.

~Tim
Title: Re:Interaction action scripting question
Post by: on Wed 19/11/2003 06:42:27
Thanks a bunch :) This will help.
By the way, i'm working on a sequel to The Neverhood :) so far i've gone almost nowhere but you can check the pre-alpha :
http://3dmindgame.hit.bg/Images/Personal/NVH2v0.2bSFX.exe (http://3dmindgame.hit.bg/Images/Personal/NVH2v0.2bSFX.exe)