When somebody follows the main char, hotspot don't work

Started by shaungaryevans, Sun 17/05/2009 21:49:15

Previous topic - Next topic

shaungaryevans

hi,

I have made somebody to follow the main character, but the hotspots for the main character don't work while he is been followed. Can somebody tell me why this happens and how to fix this problem please?

Trent R

What's your script look like? I take it you're using the character.FollowCharacter command?


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune


Trent R

Then what do your scripts look like? Like one of your hotspots, rep_exec, and whatever contains FollowCharacter, and other relevant scripts. And are you sure the events are linked to the functions correctly? (the ellipses buttons under the lightning bolt)


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

shaungaryevans

I don't know what you mean? everything was working untill i put this code in:

character.followcharacter(.....

Do i need the disable the follow character when i walk on the hotspot or something?


Trent R

I mean that FollowCharacter AFAIK doesn't break any functions like that. Which is why I'm asking to see your script.

Are you using the stand_on_hotspot function? Try moving the code to a region (not may not have anything to do with this probably, and I'd suggest doing it anyways).


[Edit]: And please, would you just post the script? It's much easier to debug that way.


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

shaungaryevans

That problem is solved now, don't ask me how lol sorry.

Can I put another question to you please?

When the main character(A) walks on a hotspot, i want them to stop, for the other charater(B) to catch up with him, THEN, the second character(B) to say something to the main charater(A)

Trent R

Alrighty then.

Play with this for a while:
Code: ags

charA.StopMoving;
charB.FollowCharacter(null); //stops charB from following
charB.Walk(charA.x-30, charA.y, eBlock); //walks to 30 pixels to the right, change these values as needed
charB.Say("I've been watching you Mr. A.");



~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

shaungaryevans

I have got another problem based on the same topic, i now have two characters on the same time, one following the other one. I have also got a two hospots and when you go over thing happens and when you go over the other one it does the oppusite (on/off). Can you put a code in so that if char A walks on the hopstot, something happens for him and nobody else please?

P.S. THANK YOU EVERYBODY WHO HAVE HELPED ME SO FAR, I'M REALLY LEARNING ALOT FROM THESE FORMS. THANKS  :)

SMF spam blocked by CleanTalk