A few things that keep me from finishing my game

Started by LeChuck, Sun 10/10/2004 03:03:27

Previous topic - Next topic

LeChuck

These are questions that have bothered me during the entire making of it, and I can't find any answers to them on these forums.Ã,  :\


1. How do you make the mouse totally ignore the player character? Like, for example, in Lucasarts games, when you click on the player character, it acts like you weren't even there.Ã,  If there's something behind you, you get to click that item. Basically the opposite of Sierra games where you can touch yourself and silly things like that.

Will there be any problems implementing this when I'm using a Sam'n Max interface where the cursor changes when it's over objects and characters. As the game is now, I get a cursor change over the ego character, which I don't want. I figure this will be solved if I can somehow 'disable' the player interactive-wise as described above?

Here's the code that's used to do the mousecursor changes:

Quotestring name;
GetLocationName(mouse.x, mouse.y, name);   // Get the name of what's under the cursor   
if (StrComp(name,"")==0) SetDefaultCursor();   // if blank ( or hotspot with no name ) do nothing   
else {   
Ã,  Ã, if (GetCursorMode()==1) {
Ã,  Ã,  Ã,  if (GetLocationType(mouse.x,mouse.y)>0) SetMouseCursor(8);
Ã,  Ã, else SetDefaultCursor();
Ã,  Ã, }
Ã,  Ã, if (GetCursorMode()==2) {
Ã,  Ã,  Ã,  if (GetLocationType(mouse.x,mouse.y)>0) SetMouseCursor(9);
Ã,  Ã, else SetDefaultCursor();
Ã,  Ã, }
Ã,  Ã, if (GetCursorMode()==3) {
Ã,  Ã,  Ã,  if (GetLocationType(mouse.x,mouse.y)==2) SetMouseCursor(10);
Ã,  Ã, else SetDefaultCursor();
Ã,  Ã, }
}




2.Ã,  This will seem really silly. I've got a character that is set to have a static view until a global variable is changed, then he is going to continously run a loop until he's talked to, in which he will run a simple talking animation. When done talking to him, he will go back to his continous loop.

I guess basically what I'm asking is: How do you make a character run a continous loop (triggered by a global variable) as long as he's not being talked to?

Mr Jake

1: On character panel tick 'No Interactions' on the character you want to be un-clickable
2:Im not sure, Id have to play with this for awhile to get some ideas

InCreator

QuoteI've got a character that is set to have a static view until a global variable is changed, then he is going to continously run a loop until he's talked to, in which he will run a simple talking animation. When done talking to him, he will go back to his continous loop.

Hm. Hard to explain, but you need to put some script into "repeatedly execute" and "talk to character" events:
I'll try to make a plan how you should do it

character's room's repeatedly_execute script:
if (GetGlobalInt(int) == what)
{
SetCharacterview command to give character right animation
Animatecharacter - and use the repeating argument in this command, it was 1 or -1, don't remember exactly
SetGlobalint(int, some else value, to stop looping this part)
}

character script, interaction "talk to character":
Do the talking script/dialog
and Set the Globalint back to the value which forced character to loop the animation, so he starts animating again


LeChuck

Thanks to both of you, my problems are now solved. I can't believe I never thought about the "No Interaction" function, I always thought it was something completely different...

As for the idle character animation, it was solved by SetCharacterIdle function. Thanks again!

SMF spam blocked by CleanTalk