Skip to content

Scripting Help

The Idea is to move to the map, and get rid of draconis.

IF
TRIGGER()
THEN
RESPONSE #100
StartCutSceneMode()
ClearAllActions()
FadeToColor([20.0],5)
ActionOverride(Player1,LeaveAreaLUA("AR6000","",[2000.2000],E))
ActionOverride(Player2,LeaveAreaLUA("AR6000","",[2000.2000],E))
ActionOverride(Player3,LeaveAreaLUA("AR6000","",[2000.2000],E))
ActionOverride(Player4,LeaveAreaLUA("AR6000","",[2000.2000],E))
ActionOverride(Player5,LeaveAreaLUA("AR6000","",[2000.2000],E))
ActionOverride(Player6,LeaveAreaLUA("AR6000","",[2000.2000],E))
ActionOverride(Player6,LeaveAreaLUA("AR6000","",[2000.2000],E))
FadeFromColor([20.0],5)

ActionOverride("BAZDRA01",DestroySelf())
Deactivate("BAZDRA01")
EndCutSceneMode()
END

It doesn't seem to work, unless there's another trigger activated afterwords that isn't in the cut scene script.
i'm still new to this so any help would be appreciated.

Comments

  • CoM_SolaufeinCoM_Solaufein Member Posts: 2,606
    You should look at examples in the game, they're the best way to learn scripting or dialogs. I'm going to use an example from Mazzy. You need something to trigger a cutscene be it in a script file or a dialog.

    This is taken from Mazzy's mazzyj.dlg file State 117:
    StartCutSceneMode()
    StartCutScene("Cut40c")

    This is taken from BCS file Cut40c.bcs

    IF
    True()
    THEN
    RESPONSE #100
    CutSceneId(Player1)
    Wait(1)
    FadeToColor([20.0],0)
    Wait(1)
    LeaveAreaLUAPanic("AR2002","",[424.366],NNW)
    LeaveAreaLUA("AR2002","",[424.366],NNW)
    ActionOverride(Player2,LeaveAreaLUA("AR2002","",[380.393],S))
    ActionOverride(Player3,LeaveAreaLUA("AR2002","",[342.420],S))
    ActionOverride(Player4,LeaveAreaLUA("AR2002","",[457.403],S))
    ActionOverride(Player5,LeaveAreaLUA("AR2002","",[413.435],S))
    ActionOverride(Player6,LeaveAreaLUA("AR2002","",[375.460],S))
    MultiPlayerSync()
    Wait(1)
    FadeFromColor([20.0],0)
    Wait(1)
    ActionOverride("Vara",StartDialogueNoSet(Player1))
    END

    Which is similar to your moving to an area. Your coordinates for where the six players are going have to be different and not the same. Otherwise they'll be placed on top of each other and probably crash the game.

    The top two is for "player1"
    LeaveAreaLUAPanic("AR2002","",[424.366],NNW)
    LeaveAreaLUA("AR2002","",[424.366],NNW)
    and their coordinates have to be the same.
  • GeorgeBakerGeorgeBaker Member Posts: 10
    i already have the trigger and coords set up, the script i put above is just an example.
    the real problem i'm having is getting rid of draconis. i've tried removing the spawn point, deactivating him and even override destroy self, for some reason he's still there.

    unless the action is done out side of a cut scene mode.
  • CoM_SolaufeinCoM_Solaufein Member Posts: 2,606
    edited September 2014
    You have to do that through an area script or a personal script assigned to the creature file.

    Area script would look like this.

    Do an extend_top ar6000

    IF
    Global("SomeTriggerToDeactivate","GLOBAL",1)
    Global("DeactivateDraconis","AR6000",0)
    THEN
    RESPONSE #100
    Deactivate("BAZDRA01")
    SetGlobal("DeactivateDraconis","AR6000",1)
    END
  • GeorgeBakerGeorgeBaker Member Posts: 10
    Ok i'll make this simple.

    This is the actual Script, close to anyway.
    IF
    // TRIGGER()
    THEN
    RESPONSE #100
    StartCutSceneMode()
    ClearAllActions()
    CutSceneId(Myself)
    StartRainNow()
    MoveViewObject(Myself,VERY_FAST)
    PlaySong(74)
    Wait(3)
    SpellNoDec(Myself,CLERIC_KNOW_ALIGNMENT)
    FadeToColor([20.0],5)
    LeaveAreaLUAPanic("AR6000","",[2000.2000],S)
    LeaveAreaLUA("AR6000","",[2000.2000],S)
    ActionOverride(Player1,LeaveAreaLUA("AR6000","",[2070.2070],E))
    ActionOverride(Player2,LeaveAreaLUA("AR6000","",[2060.2060],E))
    ActionOverride(Player3,LeaveAreaLUA("AR6000","",[2050.2050],E))
    ActionOverride(Player4,LeaveAreaLUA("AR6000","",[2040.2040],E))
    ActionOverride(Player5,LeaveAreaLUA("AR6000","",[2030.2030],E))
    ActionOverride(Player6,LeaveAreaLUA("AR6000","",[2020.2020],E))
    ActionOverride(Player6,LeaveAreaLUA("AR6000","",[2010.2010],E))
    FadeFromColor([20.0],5)
    Deactivate("bazdra01")
    EndCutSceneMode()
    END

    Which all works but Draconis is still active on the map. BUT!! if i use the script below, after the cutscene has ended, he disappears.

    I've tested this before clearing Fog of war, and after activating his dialog by walking close enough to see him. Before or after the script below removes him. Do you know why it won't work within the cut scene?

    IF
    HotKey(F)
    THEN
    RESPONSE #100
    ClearAllActions()
    Deactivate("bazdra01")
    END
  • GeorgeBakerGeorgeBaker Member Posts: 10
    i don't want to assign a new script to the area of edit the game in any fashion. the idea is for it to work on the fly with the original game by just using the script assigned to my player character.

    So far the script works 100%. but removing draconis only seems to work if i add the second part and use it outside of cutscene mode. i can find a work around for that but it would be much better if there was a cleaner way to script it and without having to mod the game as it would not work for other players in multiplayer.
Sign In or Register to comment.