Jump to content

MoveBetweenAreas() and MoveGlobal()


Meira

Recommended Posts

225 MoveBetweenAreas(S:Area*,P:Location*,I:Face*)

 

This, although not often seen, is an extremely useful effect. It will allow an actor to move himself from one area to another, keeping his HP, effects, vital statistics, etc. This is the ideal action to move non-party NPC's from area to area.

 

Example:

ActionOverride("Malaaq",MoveBetweenAreas("AR0601",[345.591],14))

 

197 MoveGlobal(S:Area*,O:Object*,P:Point*)

 

This action is ONLY useful for NPC's that have already been added to the saved game file. It will jump the given object to the area and point specified. The syntax is pretty straightforward:

MoveGlobal("AREA","MINSC",[x.y])

 

Currently I'm using MakeGlobal() on a bunch of non-party NPCs in order to be able to move them between two areas during combat with MoveGlobal(). Yet now it looks like I could just as well use MoveBetweenAreas() and forget about the MakeGlobal(). Is the any essential difference between the two commands?

 

I'm pretty sure that I must have had a reason for choosing one over the other when the quest was originally coded, but I can't remember what it might have been. ???

Link to comment

It is only my experience, but:

 

- when my NPC was leaving the party, MoveBetweenAreas worked fine: "Wait us in AR1000." - "Sure."

 

- when my party was transported via a cutscene, MoveBetweenAreas worked fine, too. "Let's go to Irenicus' Dungeon again!" - "Sure, why not?"

 

- however, when there was a time to leave the party and to spawn again somewhere else(say, in a day), via some other script, I needed MoveGlobal, or MoveGlobalObjectOffScreen. I am not sure MoveBetweenAreas would have worked. (I must note, though, that I didn't use MakeGlobal - MakeGlobal is TOB-only function. MoveGlobal, however, is not).

Link to comment

Is it even possible to use MoveBetweenAreas() if the actor you want to move is not in the current area, and you're doing it from the area script or another creature script? I don't see a way it would work.

 

So, if you need to move the actor from the current area to another area - MoveBetweenAreas() is much better. Otherwise, I think you're stuck with using MakeGlobal() and MoveGlobal() pair (unless the NPC you're moving has been in party, in that case, MakeGlobal() is not needed).

Link to comment

I used MoveBetweenAreas() to move quest creatures from their spawn point to their final locations. When I started on the quest, not all areas had scripts, so it was necessary to spawn them somewhere and move them somewhere else. Now, that isn't needed, but it works, and I don't see the sense in changing the code.

Link to comment
Is it even possible to use MoveBetweenAreas() if the actor you want to move is not in the current area, and you're doing it from the area script or another creature script? I don't see a way it would work.

 

So, if you need to move the actor from the current area to another area - MoveBetweenAreas() is much better. Otherwise, I think you're stuck with using MakeGlobal() and MoveGlobal() pair (unless the NPC you're moving has been in party, in that case, MakeGlobal() is not needed).

 

That's probably the reason behind my original decision to use MoveGlobal(). The thugs are supposed to follow the party if they move to the next area. The difference is just not immediately clear from the descriptions of the two actions. However now that I think of it; MoveBetweenAreas() needs to be used from the creature's own script or with ActionOverride() from another script. Thus the creature needs to be on the active area.

 

Maybe I should write these things down, so that I don't have re-think them again every few years. ???

Link to comment

Archived

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

×
×
  • Create New...