LucasArts style hotspots interaction

Started by , Wed 02/07/2003 17:50:33

Previous topic - Next topic

RotAtoR

I can't seem to figure out a way to make the hotspots w/ walk-to point work like they do in LacasArts games.

When a hotspot is clicked on, I want the character to move to the walk-to point and not perform the action until they get to that point. But...I want that action request to be cancellable by clicking somewhere else. For example, when a player interacts with a hotspot, I want them to first start moving the the walk-to point, but I want them to be able to, for example, click to walk somewhere else while they are still en route to the walk-to point and then go to the new point instead, cancelling the old requested action.

I can't seem to figure out how, if its even possible, to get this to work like this. There doesn't seem to be a way to not make walking to a walk-to point blocking. Plus, the "character interacts with hotpoint" action seems to be triggered before the "any click on hotpoint" action. I'm stumped, hopefully someone can help, thanks.

Wolfgang Abenteuer

Have you tried MoveCharacter (CHAR,x,y) and manually enter the x,y location of the hotspot?

~Wolfgang

RotAtoR

Yes, but the problem is if I have a hotspot interaction event, it will be called before the character reaches the point. The only way I can find to have it wait for the character to reach the point is for the action o be blocking, which I don't want.

On the other hand, If I had some kind of event triggered when the character reached the place where I wanted him, how would I be able to know which interaction request sent the character there or if the character randomly walked over that point? So that wouldn't work either...

Wolfgang Abenteuer

#3
Try,
if ((character[EGO].walking == 0) && (GetCharacterAt (x,y)) {
//code for interaction here
}

where x,y is the coordinates for the hotspot's walk-to point (that you specified in MoveCharacter).  That should (theoretically) not cause the interaction to take place until the character has both stopped moving and is standing on the hotspot.

~Wolfgang


RotAtoR

Thanks, exactly what I was looking for  ;D

SMF spam blocked by CleanTalk