walk-to point for dialogue

Started by urgrue, Fri 31/10/2003 20:04:33

Previous topic - Next topic

urgrue

what would be the simplest way to have a "walk-to" point for starting a conversation?

i know i could do it by scripting a movecharacter so ego walks up to the character, then talks, but this means i have to go through all my dialogue.
is there a more elegant way?

also, ive used the GiveScore command in a number of places, and realized now that that doesnt prevent the player from just doing the same thing over and over again and racking up a huge score.

it seems silly if i have to go through all those, too, converting them all to scripts that set global variables when activated. isnt there a more elegant way to do this, too?

CB..

#1
if the give score event is tied to a hot spot/region
then disabling the hotspot or region after wards should prevent the player getting the points more than the once..
or yu could give the player a minor inventory item
make the givescore conditional on having that item ,then immediately remove the item..bit daft but works

or use this sort of thing

if (game.score < 15)
GiveScore(10);
else if (game.score > 15)
GiveScore(-0);


ie if the player has less than 15 points; he gets ten points
if he has more than 15 points he gets nothing..

could perhaps do something similar with the dialog and a region..
if player has an item when he walks onto a region run dialog..when he walks of remove item..i dunno bit basic and klunky again but thats my level at the moment

or make it dependant on the score to tie it in with the score event somehow..for continuity?



Squinky

just hit the button at the top of the room settings thing that looks like a {} and declare an int
like

int score;

right at the top.

then in the interation for the hotspot or whatever put in run script

if (score==0){
Do what you wanna do here, check out the manual for functions...
score=1;
}



and thats it, when you run your interaction, your int is set to one and it wont allow a player to do it anymore....

Ytterbium

I think the tutorial tells you how without even using the script. In the interaction, just toss a "move character" event before running the dialogue script. Of course, if you're one of those "sentence structure programming purists," I can't help you.

Currently in production: Septigon

urgrue

thanks people.
the "int score;" trick is simplest so im using that now.

as for the walking up to someone before talking, is this okay:
FollowCharacterEx(EGO,MAN,10,1);
while (character[EGO].walking) Wait(1);
RunDialog(1);

only trouble i can think of is that it doesnt allow you to "cancel" the talk request (like you can do in lucasarts games).
but other than that i cant think of anything better...


SMF spam blocked by CleanTalk