<?xml version="1.0" encoding="utf-8"?>
<TriggerData>
    <Standard Id="D01CDCEC"/>
    <Name>Lighting</Name>
    <Root>
        <Item Type="Category" Library="D01CDCEC" Id="F47CFB6D"/>
        <Item Type="FunctionDef" Library="D01CDCEC" Id="7987EA97"/>
        <Item Type="FunctionDef" Library="D01CDCEC" Id="3F35265D"/>
        <Item Type="FunctionDef" Library="D01CDCEC" Id="E68EEDEA"/>
        <Item Type="CustomScript" Library="D01CDCEC" Id="4D8DDCBF"/>
        <Item Type="Label" Library="D01CDCEC" Id="BFF05731"/>
    </Root>
    <Element Type="Label" Id="BFF05731">
        <Name>Lighting</Name>
        <Icon>Assets\Textures\ui-editoricons-layers_terrain.dds</Icon>
    </Element>
    <Element Type="Category" Id="F47CFB6D">
        <Name>supporters</Name>
        <Item Type="FunctionDef" Library="D01CDCEC" Id="552E436B"/>
        <Item Type="Preset" Library="D01CDCEC" Id="EE165607"/>
    </Element>
    <Element Type="CustomScript" Id="4D8DDCBF">
        <Name>itGalaxy</Name>
        <ScriptCode>
            actor lit_LightningCreate (actor from, actor to, string model) {
            
                actorscope actorScope = ActorScopeFromActor(from);
                ActorScopeRefSet(actorScope,"::scope.BeamFrom",from);
                ActorScopeRefSet(actorScope,"::scope.BeamTo",to);
                return ActorCreate(actorScope, "BeamSimple", model, "::scope.BeamFrom", "::scope.BeamTo");
            }
            
            void lit_LightningMove (actor lightning, actor target, string site) {
            
                //UIDisplayMessage(PlayerGroupAll(), c_messageAreaError, StringToText("site="+site));
                ActorRefSet(lightning,site,ActorFromActor(target,"::Self"));
            }
            
            void lit_LightningSet(actor lightning, string col, fixed scale, string model, bool swap) {
                ActorSend(lightning, "SetTintColor "+col);
                ActorSend(lightning, "SetScale "+FixedToString(scale,6));
                if (swap == true) {
                    ActorSend(lightning, "ModelSwap "+model);
                }
            }
            
            actor lit_Point2Site (point p){
                
                actor act;
            
                ActorCreate(null, "SiteHosted", null, null, null);
                act = libNtve_gf_ActorLastCreated();
            
                ActorSend(act, "SetPositionH "
                    +FixedToString(PointGetX(p),6)+","
                    +FixedToString(PointGetY(p),6)+" "
                    +FixedToString(PointGetHeight(p),6) );
                return act;
            }
        </ScriptCode>
    </Element>
    <Element Type="FunctionDef" Id="3F35265D">
        <Name>Lightning Move</Name>
        <Label Type="Label" Library="D01CDCEC" Id="BFF05731"/>
        <FlagAction/>
        <Parameter Type="ParamDef" Library="D01CDCEC" Id="4E5D78EB"/>
        <Parameter Type="ParamDef" Library="D01CDCEC" Id="179EF80F"/>
        <Parameter Type="ParamDef" Library="D01CDCEC" Id="1DF85C14"/>
        <FunctionCall Type="FunctionCall" Library="D01CDCEC" Id="10FEAFFF"/>
    </Element>
    <Element Type="FunctionDef" Id="552E436B">
        <Name>point2Site</Name>
        <Label Type="Label" Library="D01CDCEC" Id="BFF05731"/>
        <FlagCall/>
        <ReturnType>
            <Type Value="actor"/>
        </ReturnType>
        <Parameter Type="ParamDef" Library="D01CDCEC" Id="A66FF24A"/>
        <FunctionCall Type="FunctionCall" Library="D01CDCEC" Id="2D3C11DC"/>
    </Element>
    <Element Type="FunctionDef" Id="7987EA97">
        <Identifier>LightingCreate</Identifier>
        <Name>Lightning Create</Name>
        <Label Type="Label" Library="D01CDCEC" Id="BFF05731"/>
        <FlagAction/>
        <ReturnType>
            <Type Value="actor"/>
        </ReturnType>
        <Parameter Type="ParamDef" Library="D01CDCEC" Id="6EA8D9C7"/>
        <Parameter Type="ParamDef" Library="D01CDCEC" Id="8CB6EA81"/>
        <Parameter Type="ParamDef" Library="D01CDCEC" Id="0AE2F0C8"/>
        <FunctionCall Type="FunctionCall" Library="D01CDCEC" Id="DDB91BE9"/>
    </Element>
    <Element Type="FunctionDef" Id="E68EEDEA">
        <Name>Lightning Set</Name>
        <Label Type="Label" Library="D01CDCEC" Id="BFF05731"/>
        <FlagAction/>
        <Parameter Type="ParamDef" Library="D01CDCEC" Id="30EF3271"/>
        <Parameter Type="ParamDef" Library="D01CDCEC" Id="CBC31068"/>
        <Parameter Type="ParamDef" Library="D01CDCEC" Id="0E530ED0"/>
        <Parameter Type="ParamDef" Library="D01CDCEC" Id="C3727DBB"/>
        <Parameter Type="ParamDef" Library="D01CDCEC" Id="79E694E2"/>
        <FunctionCall Type="FunctionCall" Library="D01CDCEC" Id="9AC5D216"/>
    </Element>
    <Element Type="FunctionCall" Id="10FEAFFF">
        <Name></Name>
        <FunctionDef Type="FunctionDef" Library="Ntve" Id="00000123"/>
        <ScriptCode>
            lit_LightningMove(lp_lightning, lp_target, lp_site);
        </ScriptCode>
    </Element>
    <Element Type="FunctionCall" Id="2D3C11DC">
        <Name></Name>
        <FunctionDef Type="FunctionDef" Library="Ntve" Id="00000123"/>
        <ScriptCode>
            return lit_Point2Site(lp_point);
        </ScriptCode>
    </Element>
    <Element Type="FunctionCall" Id="9AC5D216">
        <Name></Name>
        <FunctionDef Type="FunctionDef" Library="Ntve" Id="00000123"/>
        <ScriptCode>
            lit_LightningSet(lp_lightning, libNtve_gf_ConvertColorToString(lp_color), lp_scale, lp_model, lp_do);
        </ScriptCode>
    </Element>
    <Element Type="FunctionCall" Id="DDB91BE9">
        <Name></Name>
        <FunctionDef Type="FunctionDef" Library="Ntve" Id="00000123"/>
        <ScriptCode>
            return lit_LightningCreate(lp_from, lp_to, lp_modelLink);
        </ScriptCode>
    </Element>
    <Element Type="Param" Id="0C3DA5E1">
        <Name></Name>
        <Preset Type="PresetValue" Library="Ntve" Id="52D5A28A"/>
    </Element>
    <Element Type="Param" Id="0DD36600">
        <Name></Name>
        <Preset Type="PresetValue" Library="Ntve" Id="C9DCA6C0"/>
    </Element>
    <Element Type="Param" Id="0F045CDB">
        <Name></Name>
        <Preset Type="PresetValue" Library="Ntve" Id="52D5A28A"/>
    </Element>
    <Element Type="Param" Id="35FB3161">
        <Name></Name>
        <Preset Type="PresetValue" Library="Ntve" Id="568CBBF1"/>
    </Element>
    <Element Type="Param" Id="44005862">
        <Name></Name>
        <Preset Type="PresetValue" Library="Ntve" Id="52D5A28A"/>
    </Element>
    <Element Type="Param" Id="502C3AA3">
        <Name></Name>
        <Value>1.0</Value>
        <ValueType Type="fixed"/>
    </Element>
    <Element Type="Param" Id="5B8FF9CC">
        <Name></Name>
        <Preset Type="PresetValue" Library="Ntve" Id="C9DCA6C0"/>
    </Element>
    <Element Type="Param" Id="7480D9E2">
        <Name></Name>
        <Preset Type="PresetValue" Library="Ntve" Id="52D5A28A"/>
    </Element>
    <Element Type="Param" Id="86BB9659">
        <Name></Name>
        <Preset Type="PresetValue" Library="D01CDCEC" Id="9511D022"/>
    </Element>
    <Element Type="Param" Id="8E5807F6">
        <Name></Name>
        <Value>255,255,255,255</Value>
        <ValueType Type="color"/>
    </Element>
    <Element Type="Param" Id="A5313606">
        <Name></Name>
        <Preset Type="PresetValue" Library="Ntve" Id="52D5A28A"/>
    </Element>
    <Element Type="Param" Id="C216049B">
        <Name></Name>
        <Value>false</Value>
        <ValueType Type="bool"/>
    </Element>
    <Element Type="ParamDef" Id="0AE2F0C8">
        <Name>ModelLink</Name>
        <ParameterType>
            <Type Value="gamelink"/>
            <GameType Value="Model"/>
        </ParameterType>
        <Default Type="Param" Library="D01CDCEC" Id="0DD36600"/>
    </Element>
    <Element Type="ParamDef" Id="0E530ED0">
        <Name>color</Name>
        <ParameterType>
            <Type Value="color"/>
        </ParameterType>
        <Default Type="Param" Library="D01CDCEC" Id="8E5807F6"/>
    </Element>
    <Element Type="ParamDef" Id="179EF80F">
        <Name>site</Name>
        <ParameterType>
            <Type Value="preset"/>
            <TypeElement Type="Preset" Library="D01CDCEC" Id="EE165607"/>
        </ParameterType>
        <Default Type="Param" Library="D01CDCEC" Id="86BB9659"/>
    </Element>
    <Element Type="ParamDef" Id="1DF85C14">
        <Name>target</Name>
        <ParameterType>
            <Type Value="actor"/>
        </ParameterType>
        <Default Type="Param" Library="D01CDCEC" Id="7480D9E2"/>
    </Element>
    <Element Type="ParamDef" Id="30EF3271">
        <Name>lightning</Name>
        <ParameterType>
            <Type Value="actor"/>
        </ParameterType>
        <Default Type="Param" Library="D01CDCEC" Id="0C3DA5E1"/>
    </Element>
    <Element Type="ParamDef" Id="4E5D78EB">
        <Name>lightning</Name>
        <ParameterType>
            <Type Value="actor"/>
        </ParameterType>
        <Default Type="Param" Library="D01CDCEC" Id="44005862"/>
    </Element>
    <Element Type="ParamDef" Id="6EA8D9C7">
        <Name>from</Name>
        <ParameterType>
            <Type Value="actor"/>
        </ParameterType>
        <Default Type="Param" Library="D01CDCEC" Id="A5313606"/>
    </Element>
    <Element Type="ParamDef" Id="79E694E2">
        <Name>do</Name>
        <ParameterType>
            <Type Value="bool"/>
        </ParameterType>
        <Default Type="Param" Library="D01CDCEC" Id="C216049B"/>
    </Element>
    <Element Type="ParamDef" Id="8CB6EA81">
        <Name>to</Name>
        <ParameterType>
            <Type Value="actor"/>
        </ParameterType>
        <Default Type="Param" Library="D01CDCEC" Id="0F045CDB"/>
    </Element>
    <Element Type="ParamDef" Id="A66FF24A">
        <Name>point</Name>
        <ParameterType>
            <Type Value="point"/>
        </ParameterType>
        <Default Type="Param" Library="D01CDCEC" Id="35FB3161"/>
    </Element>
    <Element Type="ParamDef" Id="C3727DBB">
        <Name>model</Name>
        <ParameterType>
            <Type Value="gamelink"/>
            <GameType Value="Model"/>
        </ParameterType>
        <Default Type="Param" Library="D01CDCEC" Id="5B8FF9CC"/>
    </Element>
    <Element Type="ParamDef" Id="CBC31068">
        <Name>scale</Name>
        <ParameterType>
            <Type Value="fixed"/>
        </ParameterType>
        <Default Type="Param" Library="D01CDCEC" Id="502C3AA3"/>
    </Element>
    <Element Type="Preset" Id="EE165607">
        <Name>lightning site</Name>
        <PresetCustom/>
        <BaseType Value="string"/>
        <Item Type="PresetValue" Library="D01CDCEC" Id="9511D022"/>
        <Item Type="PresetValue" Library="D01CDCEC" Id="5FBFB28B"/>
    </Element>
    <Element Type="PresetValue" Id="5FBFB28B">
        <Name>Impact</Name>
        <Value>"::HostImpact"</Value>
    </Element>
    <Element Type="PresetValue" Id="9511D022">
        <Name>Launch</Name>
        <DefinesDefault/>
        <Value>"::HostLaunch"</Value>
    </Element>
</TriggerData>