The Black Wyrm Lair Forums
The Black Wyrm's Lair Terms of Use Help Search Members Calendar

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> MoveToSavedLocationn(S:GLOBAL*,S:Area*), Moving between areas
jastey
post May 22 2005, 10:22 AM
Post #1





Forum Member
Posts: 1366
Joined: 22-August 04
From: Germany




Hi,
what I want to do is:

-teleport the PC and one NPC into another area
-play a cutscene and some dialogue
-move PC and NPC back to where they were

Problem: I do not know in which area they were when the teleporting took place.

I guess the actions "SaveObjectLocation" and "MoveToSavedLocationn(S:GLOBAL*,S:Area*)" are the ones to use here?

My code for the teleporting is
CODE
IF
     True()
THEN
   RESPONSE #100
    CutSceneId("ajantis")
    ClearAllActions()
    SaveObjectLocation("GLOBAL","LOCX#AjRomAjantis","ajantis")
    SaveObjectLocation("GLOBAL","LOCX#AjRomPlayer1",Player1)
    FadeToColor([20.0],0)
    Wait(1)
    LeaveAreaLUA("AR1402","",[900.700],0)
    ActionOverride(Player1,LeaveAreaLUA("AR1402","",[1024.1072],9))
    MoveViewPoint([1070.905],INSTANT)
    Wait(1)
    FadeFromColor([20.0],0)
    EndCutSceneMode()
    Dialog(Myself)
END

And for moving back I used
CODE
IF
     True()
THEN
   RESPONSE #100
    CutSceneId("ajantis")
    ClearAllActions()
    FadeToColor([20.0],0)
    Wait(1)
ActionOverride(Player1,MoveToSavedLocationn("LOCX#AjRomPlayer1","GLOBAL")
    MoveToSavedLocationn("LOCX#AjRomAjantis","GLOBAL")
    Wait(1)
    FadeFromColor([20.0],0)
    EndCutSceneMode()
END


but it is not working, PC and NPC remain in the other area and do *not* move back to the starting area.

The variables "LOCX#AjRomPlayer1" and "LOCX#AjRomAjantis" are set (checked with Shadowkeeper).

I'm not sure whether it is a syntax error (WeiDU installer does not complain) or whether I am using the wrong action codes for this purpose.

Thank you for any help.
Go to the top of the page
 
Quote Post
dragon_lord
post May 22 2005, 10:30 AM
Post #2


The original one


Retired team member
Posts: 789
Joined: 9-September 04
From: WA, Australia




StorePartyLocations()
RestorePartyLocations()

are what you want. EDIT: Unless ajantis isnt actually in the party (i assumed he was). StorePartyLocations() actually works across save game reloads - the iesdp is wrong in this regard.

This post has been edited by dragon_lord: May 22 2005, 10:47 AM


--------------------
Maintainer of the Dragon's Hoard Download Center
Member of the World Transition Project
The Items Mart - A comprehensive guide to item locations with maps for BG2
Portrait City - The largest collection of portraits for BG2 on the net.
Go to the top of the page
 
Quote Post
jastey
post May 22 2005, 10:54 AM
Post #3





Forum Member
Posts: 1366
Joined: 22-August 04
From: Germany




That did it!! Thank you, dragon lord! biggrin.gif

Just in case someone is interested in the correct code, this is the one that worked (EDIT: Yes, it is for Ajantis in the party):
CODE
IF
     True()
THEN
   RESPONSE #100
    CutSceneId("ajantis")
    ClearAllActions()
    StorePartyLocations()
    FadeToColor([20.0],0)
    Wait(1)
    LeaveAreaLUA("AR1402","",[900.700],0)
    ActionOverride(Player1,LeaveAreaLUA("AR1402","",[1024.1072],9))
    MoveViewPoint([1070.905],INSTANT)
    Wait(1)
    FadeFromColor([20.0],0)
    EndCutSceneMode()
    Dialog(Myself)
END


CODE
IF
     True()
THEN
   RESPONSE #100
    CutSceneId("ajantis")
    ClearAllActions()
    FadeToColor([20.0],0)
    Wait(1)
    RestorePartyLocations()
    Wait(1)
    FadeFromColor([20.0],0)
    EndCutSceneMode()
END


IESDP: Either I'm blind, or "StorePartyLocations()" and "RestorePartyLocations()" are not listed in BGII:ToB Action triggers in the IESDP online version. confused.gif

This post has been edited by jastey: May 22 2005, 10:55 AM
Go to the top of the page
 
Quote Post
dragon_lord
post May 22 2005, 11:19 AM
Post #4


The original one


Retired team member
Posts: 789
Joined: 9-September 04
From: WA, Australia




QUOTE
IESDP: Either I'm blind, or "StorePartyLocations()" and "RestorePartyLocations()" are not listed in BGII:ToB Action triggers in the IESDP online version. confused.gif


Yep, you're blind wink.gif . They are action 236 and 237.

This post has been edited by dragon_lord: May 22 2005, 11:21 AM


--------------------
Maintainer of the Dragon's Hoard Download Center
Member of the World Transition Project
The Items Mart - A comprehensive guide to item locations with maps for BG2
Portrait City - The largest collection of portraits for BG2 on the net.
Go to the top of the page
 
Quote Post
jastey
post May 22 2005, 02:55 PM
Post #5





Forum Member
Posts: 1366
Joined: 22-August 04
From: Germany




blink.gif OK I guess I have to train more with using the "Find on this page"-browser search option... I did use it, now I wonder what I actually typed into.
Thank you dragon lord!
Go to the top of the page
 
Quote Post
Galactygon
post May 22 2005, 03:21 PM
Post #6



Group Icon

Mod Developer
Posts: 1158
Joined: 22-July 04
From: Sweden




Unfortunately, the only method to execute that action is what Dragon_lord mentioned above, since all the other ones are broken.

-Galactygon

This post has been edited by Galactygon: May 22 2005, 03:24 PM


--------------------
Go to the top of the page
 
Quote Post
jastey
post May 22 2005, 06:26 PM
Post #7





Forum Member
Posts: 1366
Joined: 22-August 04
From: Germany




Meaning there would be no possibility to "teleport" a non-party character as mentioned between areas?
Go to the top of the page
 
Quote Post
Avenger_teambg
post Jul 24 2005, 11:41 AM
Post #8





Forum Member
Posts: 78
Joined: 13-July 05




The problem with movetosavedlocationn/saveobjectlocation (aside from their multiply flawed syntax) is it doesn't store orientation and area.

But you are saved!
Check: 277 EscapeAreaObjectMove biggrin.gif
If you don't want to show the guy moving out, you could try to fade the screen, or something like that.

This post has been edited by Avenger_teambg: Jul 24 2005, 11:44 AM


--------------------
See GemRB !
Go to the top of the page
 
Quote Post
jastey
post Jul 24 2005, 08:16 PM
Post #9





Forum Member
Posts: 1366
Joined: 22-August 04
From: Germany




QUOTE(Avenger_teambg @ Jul 24 2005, 01:41 PM)
Check: 277 EscapeAreaObjectMove

Would I use this instead of " LeaveAreaLUA()"? What would be the advantage?
Go to the top of the page
 
Quote Post
devSin
post Jul 24 2005, 09:00 PM
Post #10





Forum Member
Posts: 53
Joined: 22-March 05




You wouldn't ever use LeaveAreaLua*() for a NPC. Instead you'd use the various actions that move a creature object to a different area.

EscapeAreaMove() can be useful if you're going to do EscapeArea() anyway (EscapeAreaObjectMove() just lets you specify an object in the current area so that the creature escapes in the right direction).

Most likely, you'll just want to use MoveBetweenAreas() (or MoveBetweenAreasEffect(), except that the effect and move happen simultaneously; it looks pretty dumb with no delay between the effect and move).

This post has been edited by devSin: Jul 24 2005, 09:02 PM
Go to the top of the page
 
Quote Post
jastey
post Jul 25 2005, 08:35 AM
Post #11





Forum Member
Posts: 1366
Joined: 22-August 04
From: Germany




Why wouldn't I use "LeaveAreaLua*()" for an NPC? For what would I use it?
I really don't know. I used "LeaveAreaLUA()" for the NPC and PC in the cutscene now and it seems to work fine...
Go to the top of the page
 
Quote Post
Avenger_teambg
post Jul 25 2005, 09:42 AM
Post #12





Forum Member
Posts: 78
Joined: 13-July 05




I misunderstood you, i thought you don't have a way to move an npc to a specific position smile.gif


--------------------
See GemRB !
Go to the top of the page
 
Quote Post
devSin
post Jul 25 2005, 06:48 PM
Post #13





Forum Member
Posts: 53
Joined: 22-March 05




Honestly, simply because it's never been used in that fashion. It's possible that it works because you're doing them together, but I think LeaveArea* actions load the destination area regardless, and this obviously makes no sense for an NPC. I really would suggest sticking to MoveBetweenAreas() for NPCs, but it may be something that won't make any difference in the game.

LeaveAreaLua() is used when you want to move PCs to a new area (the new area has to be loaded, otherwise your PCs will just disappear and it's likely the cutscene will stall).
Go to the top of the page
 
Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:



- Lo-Fi Version Time is now: 18th May 2024 - 11:28 PM