PDA

View Full Version : npc dilema



howling shooter
January 28th, 2008, 04:44 PM
hiya people
i am working on an rpg and working on npcs, now i know i could use some distance stuff and code but i would prefer hitests, i have tried to get this to work with a hittest inside a movieclip but with no luck, so could somebody change this so that the movieclip changes the box movieclip to its second frame on touch insdie a movieclip, once somebody has done that i will mention them in the credits of my game :)
thank you :p:

ArmoredSandwich
January 28th, 2008, 05:18 PM
hiya people
i am working on an rpg and working on npcs, now i know i could use some distance stuff and code but i would prefer hitests, i have tried to get this to work with a hittest inside a movieclip but with no luck, so could somebody change this so that the movieclip changes the box movieclip to its second frame on touch insdie a movieclip, once somebody has done that i will mention them in the credits of my game :)
thank you :p:

*Unexpected file format*

I'm using flash 8.

However, you problably need something like this

if (_root.movieclip.hitTest(_root.movieclipContainer. movieclipInside)) {

howling shooter
January 28th, 2008, 05:34 PM
well how would i get it the other way round, so its the hittest that is on the movieclip on the inside that makes the box movieclip change, do you have any idea how to do that ?

ArmoredSandwich
January 28th, 2008, 06:29 PM
I have no idea what you are talking about :S

howling shooter
January 28th, 2008, 06:57 PM
well you know that the code would be placed on the main character for what you surgested, im trying to find something that would be placed on the npc
so if you can help i would be very grateful :)

parkerdc
January 28th, 2008, 07:05 PM
Here is a flash 8 version.

parkerdc
January 28th, 2008, 07:21 PM
I have fixed your code and put the walking/rotation code in the one frame.

howling shooter
January 29th, 2008, 03:58 PM
thank you veyr veyr very much :)
my game is now coming along quite well, terribly stuck on enemies but il see if i can use this system :)
thank you :)