This is for my game Dragon slayers 1st demo out now but someone noticed a bug and i have searched the help with no idea how to fix it.
Right I have a janitor cleaning in the park his idle anination is sweeping, then later in the game you knock him out and his idle animation changes to being knocked out with stars above his head.
I want at this point not to be able to talk to the charactor after he is unconsious. Is there a IfCharatorIdle(no. view, Char);
so I can set it so if the charactor is idle when knocked out it does not start the convosation, thanks
gemmalah :)
For stuff like this I use variables.
There's probably another (easier way) but I am used to doing it like this.
You create a variable called janitor (whatever you want to call it) and it's set to 0 to start. When you try to talk to the janitor first check the variable. If it's 0, run the dialogue options.
When the janitor get's knocked out, set the variable to 1. When you try to talk to the janitor and that variable = 1 you display "He's not saying much ... 'cause he's out cold!" Or something like that!
When/If he wakes back up be sure to reset the variable to 0.
Hope this is a good way of doing it!
])]v[
Still, if you need to know his current view look for character[].view variable. Pay attention that it holds current view of the character graphic (minus 1).
So, if his idle view 5
if (character[CHAR_NAME].view == 4) {
//you can't talk
} else {
//talk
}
~Cheers