Jump to content

MoveToObject


Salk

Recommended Posts

Hello!

 

I'd like to create a cutscene where the nearest party member alive moves towards the protagonist and says a line once (s)he arrives. Would you suggest using MoveToObject in this case?

 

Could I use this action from the protagonist script? How would the syntax be?

 

Thanks!

Link to comment
I'd like to create a cutscene where the nearest party member alive moves towards the protagonist and says a line once (s)he arrives. Would you suggest using MoveToObject in this case?
I think Dialogue(Protagonist) would suffice, as that IIRC moves the object to the addressee (unlike StartDialogue which can work from a distance). Unless you're using DisplayString or something instead, in which case maybe something like:

IF
 See(Protagonist)
 !StateCheck(Protagonist,CD_STATE_NOTVALID)
 !Range(Protagonist,4)
THEN
 RESPONSE #100
MoveToObject(LastSeenBy())
END

IF
 See(Protagonist)
 !StateCheck(Protagonist,CD_STATE_NOTVALID)
 Range(Protagonist,4)
 Global("myvar","LOCALS",0)
THEN
 RESPONSE #100
SetGlobal("myvar","LOCALS",1)
DisplayString(Myself,1234)
END

If you want it non-interruptable by other actions, use MoveToObjectNoInterrupt.

Could I use this action from the protagonist script? How would the syntax be?
Eh, you want the protagonist to move to himself? :)

 

(P.S.: Don't expect any scripting I post to work or even parse...)

 

Edit: Or not to loop continuously (added var check in 2nd block).

Link to comment
What I meant to say is if it was possible to make this call from DPLAYER3.BCS.
In theory, but you'd probably need to use ActionOverride() - see IESDP action #1: "This action can be used to control another creature." Offhand, I can't give you the exact syntax because you might need a block (at least) for each Player2 .. Player6. Maybe some scripting guru could, but it might help if you post some of your existing script syntax.
Link to comment
What I meant to say is if it was possible to make this call from DPLAYER3.BCS.
In theory, but you'd probably need to use ActionOverride() - see IESDP action #1: "This action can be used to control another creature." Offhand, I can't give you the exact syntax because you might need a block (at least) for each Player2 .. Player6. Maybe some scripting guru could, but it might help if you post some of your existing script syntax.

 

Thank you.

 

I have actually decided that having another party member check on how the protagonist is feeling is overkill and will just have a short cutscene instead using MoveViewObject(Myself, INSTANT). I tested it and it worked rather fine.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...