I was wondering, would it be possible... if I wanted to interact with a character... I select my interaction mode, and I click on one part of the character (his arm)and make one thing happen, but if I click on another part of the character (say his leg), something different would happen.
Is this at all possible? Is there anyway I could possibly set hotspots on characters (without them being a part of an actual background?) Or is there a possibility that I make some thing happen by clicking on "this group of pixels" as opposed to "that group of pixels" on a character's sprite?
...or am I just walking around with my head in the clouds?
If such a thing exists... how would I go about doing this... where would I start?
It's been awhile, but this was suggested and talked about before. Last I remember, it was just put away on the future file.
I think there're currently several ways to do it, just not so convenient. Two of such i can think of:
1. Separate a character into several characters, for example, head as one character, body as one, hands as one, then make "body" the player character, and use FollowCharacterEx() for the other 2 "characters", setting DIST to FOLLOW_EXACTLY (see manual), so you can set their interactions separately.
2. By means of checking coordinates in script, make the interaction with character script something like below to check for clicks at rectangular sections:
int clickx,clicky;
clickx=mouse.x-character[EGO].x;
clicky=mouse.y-character[EGO].y;
if (clicky<-20){//head blah bla bla}
else if ((clicky>-20)&&(clickx>10)){//Left hand, blah bla}....
The problem with method 2 is that you may need lots of nested if to check, and the checks should be different if the character is facing at different directions, moreover, the checking routines suck if the character is supposed to be scaled in game, so I think method is probably easier and more reasonable.
Thank you, gentlemen... I will give it a try.
Scummy: Sorry, I didn't think to check the other posts first... my bad. ;D