2 characters collide and Main character has to die... How would I do this?????

Started by barefoot, Mon 23/11/2009 20:40:59

Previous topic - Next topic

barefoot

Hi

I have a character following the main character, if the follower catches up to the character then the main character dies... its a collision question i suppose..

can anyone tell me if this can be done.. in laymans terms..

les
I May Not Be Perfect but I Have A Big Heart ..

discordance

Fear not, there is a function for this - character.IsCollidingWithChar I believe. You can look it up in the manual if you require more details.

barefoot

I'm still using earlier version 2.62... cant find that function in manual...

found: AreCharactersColliding....     just need to know how to implement it...
main character is named Red Pants...

Ive used this:

    }
    if (AreCharactersColliding(REDPANTS,GUFF)==0)
   ChangeCharacterView(REDPANTS,11);

global script accepts it but character does not change view..



les
I May Not Be Perfect but I Have A Big Heart ..

discordance

2.62? Sorry, I can't help you with that version, I know nothing of it. Maybe someone else has more knowledge. Or you might consider upgrading to the newer version. It's pretty awesome.

Khris

Where did you put that code?

Also, yes, I too recommend moving on to at least 2.72, better 3.x, especially if you've just started using AGS.
If not, familiarize yourself with the new code style of 2.7x, then the new editor introduced with 3.x.

The main reason being that in the meantime, a ton of bugs have been removed, and a ton of new features added.

barefoot

i did look at the latest ags..  i could not seem to find a way to make a character walk-to from region....

les
I May Not Be Perfect but I Have A Big Heart ..

Gilbert

For AreCharactersColliding(), you have to check whether the value is non-zero for a collision, also, where did you put that two lines in the script?

barefoot

I May Not Be Perfect but I Have A Big Heart ..

Gilbert

Where in your global script did you add it? That's what I have asked.

Did you add it to the repeatedly execute function or elsewhere?

barefoot

Thanks for help..    but I have now chosen other options to complete the Maze room... what ide like to be able to do, not essential, is set it on a TIMER if I can..

Les
I May Not Be Perfect but I Have A Big Heart ..

Khris


Calin Leafshade


barefoot

I May Not Be Perfect but I Have A Big Heart ..

SMF spam blocked by CleanTalk