Meira Posted February 1, 2007 Share Posted February 1, 2007 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
berelinde Posted February 1, 2007 Share Posted February 1, 2007 Apart from the fact that MoveGlobal() doesn't specify a face direction, you mean? I would think that MoveBetweenAreas() would do the job. Link to comment
Meira Posted February 1, 2007 Author Share Posted February 1, 2007 Apart from the fact that MoveGlobal() doesn't specify a face direction, you mean? Yes, apart from face direction. Link to comment
Kulyok Posted February 1, 2007 Share Posted February 1, 2007 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
pro5 Posted February 1, 2007 Share Posted February 1, 2007 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
berelinde Posted February 1, 2007 Share Posted February 1, 2007 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
Meira Posted February 1, 2007 Author Share Posted February 1, 2007 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
Meira Posted February 1, 2007 Author Share Posted February 1, 2007 On the other hand, Ascension64 claims that MoveBetweenAreas() can be used to move creatures from an non-active area. Here. Link to comment
Ascension64 Posted February 2, 2007 Share Posted February 2, 2007 Oh, sorry. MBA() needs to have the CRE in the active area. I got a bit carried away there. Link to comment
Meira Posted February 2, 2007 Author Share Posted February 2, 2007 No problem, I'm just glad that it's all clear(er) to me again. Link to comment
Avenger Posted February 3, 2007 Share Posted February 3, 2007 Be aware, that MakeGlobal makes an npc technically joinable npc. (adds the npc to the save game). This might cause weirdness and also slows loading significantly if there are many such (n)pcs. Link to comment
Meira Posted February 4, 2007 Author Share Posted February 4, 2007 Is it possible to undo MakeGlobal() after it's no longer needed? Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.