FollowCharacter & dialog_request

Started by Afflict, Tue 28/02/2006 18:05:13

Previous topic - Next topic

Afflict

Well did search and found this so what the heck..

I said this

Character[DEVIL].FollowCharacter(EGO, 5, 80);
and even tried this
DEVIL.FollowCharacter(EGO. 5, 80);

it tells me DEVIL / Charcter[DEVIL] is an unknown command.

Note I am writing this in the dialog script...

Ashen

You can't run that from a dialog script, you need to use run-script and dialog_request. See this BFAQ entry, the manual (about halfway down the page), or do a forum search for more details.

Also, even in normal scripting, it'd need to be character[DEVIL].FollowCharacter(character[EGO], 5,80); (note capitalisation of character). Or, as Gilbot said, cDevil and cEgo.
I know what you're thinking ... Don't think that.

Afflict

#2
Devil: "Where?"
Ego: "Just here come look"
return;

character[DEVIL].FollowCharacter(character[EGO], 5,80)

Ok if I need the character to follow him after something he said eg : see above!

Edit:// Ok I see there is a run script thingy awesome will try that! Sorry for bothering
just really new to coding!

Edit2//
DIALOG
@3  // option 3
Devil: "Where?"
Ego: "Just here come look"
run-script 1

GLOBAL SCRIPT
  function dialog_request (1 xvalue)  \lbraceraw {
character[DEVIL].FollowCharacter(character[EGO], 5,80)
}
  \rbraceraw

I dont know I am really stupid with these things!  Its not even running its saying I need to add {
I did?? I have no idea what i need to put in the (1 xvalue) section and also where exactly in glabal script this code must come?

Ashen

#3
READ THE BFAQ ENTRY, it's pretty clear:
Code: ags

function dialog_request (int xvalue)  {
  if (xvalue == 1) character[DEVIL].FollowCharacter(character[EGO], 5,80);
}


Quotewhere exactly in glabal script this code must come?
It needs to go anywhere in the Global script, provided it's not inside another function. Selecting dialog_request on the 'Script' menu will take you there immediately, if it already exists - and will CREATE it at the bottom of the Global Script if it doesn't.

EDIT: Topic split, since it's not really a FollowCharacter problem.
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk