hiya guys. I have a rather hard request (well so i think). I wondering if its possible to have an enemy field of vision that is obstructed by objects. like the picture below
I suspect that the api tool is involved but i realy am not sure how i would pull this off.
Yeah i’ve seen this done before, can’t seem to find a fla file for it though, i think how he did it was for the angle that the player was to the enemy, he’d check if the wall was closer, or the man, so it was kinda checking if a wall was in the way, gets kindof choppy for lots of enemys though
i was shown a way where a path is drawn between the enemy and the hero, and the path checks if it is hitting anything, and if it is then the vision is obstructed. Im still trying to figure out how i could use this way. If anyone has any idea please tell me.
send em an example swf and i can get eh swf and if we are lucky it won’t be protected
I’m not sure what u r talking about? As for skribble, your line idea may work, but i don’t really like using hitTests so i would avoid it, but you can try if you like
i think this would require some math or i think it would have to be a tile based game
i meant that i would like to see if its been done before and i’m gonna check my java book and see how you do it in java then see if i can translate it into actionscript and if not i’ll post the code in a txt so i don’t take up excess psace on the fourm gui
That’s sort of the way i would do it, in that link, yeah you could use it for obstruction. Like i said before copy what’s in the link but have inside there an check if the wall is closer than the player