You must be logged in to post messages.
Please login or register

Scenario Design
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: A new amazing tri(ck)gger!
posted 17 October 2009 04:03 PM EDT (US)   
Army deploy everywhere in area (Objects)

This trigger deploys a protounit everywhere in a random place between two units

You can create amazing factors looping it (see the video!)


Line of Sight Fire


This is the code:


<Effect name="Army Deploy everywhere in area (objects)">
<Param name="SrcArmy" dispName="$$22348$$Army" VarType="group">default</Param>
<Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
<Param name="SrcObject" dispName="Object 1" varType="unit">default</Param>
<Param name="SrcObjectt" dispName="Object 2" varType="unit">default</Param>
<Param name="Count" dispName="$$22435$$Count" varType="long">0</Param>
<Param name="Heading" dispName="$$22432$$Heading" varType="long">0</Param>
<Param name="Clear" dispName="$$22464$$Clear Existing Units:" varType="bool">true</Param>
<Command>trQuestVarSet("lostrolastplayerxD", xsGetContextPlayer());</Command>
<Command>xsSetContextPlayer(0);</Command>
<Command>kbLookAtAllUnitsOnMap();</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvX", xsVectorGetX(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvXX", xsVectorGetX(kbGetBlockPosition("%SrcObjectt%")));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZ", xsVectorGetZ(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZZ", xsVectorGetZ(kbGetBlockPosition("%SrcObjectt%")));</Command>
<Command>if(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX"))trQuestVarSetFromRand("lostroMetresXlol", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX"), trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"), false);</Command>
<Command>if(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"))trQuestVarSetFromRand("lostroMetresXlol", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"), trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX"), false);</Command>
<Command>if(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ"))trQuestVarSetFromRand("lostroMetresZlol", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ"), trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"), false);</Command>
<Command>if(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"))trQuestVarSetFromRand("lostroMetresZlol", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"), trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ"), false);</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", %Count%, trQuestVarGet("lostroMetresXlol"),0,trQuestVarGet("lostroMetresZlol"), %Heading%, %Clear%);</Command>
<Command>xsSetContextPlayer(trQuestVarGet("lostrolastplayerxD"));</Command>
</Effect>

<Effect name="Army Deploy random unit everywhere in area (objects)">
<Param name="SrcArmy" dispName="$$22348$$Army" VarType="group">default</Param>
<Param name="SrcObject" dispName="Object 1" varType="unit">default</Param>
<Param name="SrcObjectt" dispName="Object 2" varType="unit">default</Param>
<Param name="Count" dispName="$$22435$$Count" varType="long">0</Param>
<Param name="Heading" dispName="$$22432$$Heading" varType="long">0</Param>
<Param name="Clear" dispName="$$22464$$Clear Existing Units:" varType="bool">true</Param>
<Command>trQuestVarSet("lostrolastplayerxD", xsGetContextPlayer());</Command>
<Command>xsSetContextPlayer(0);</Command>
<Command>kbLookAtAllUnitsOnMap();</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvX", xsVectorGetX(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvXX", xsVectorGetX(kbGetBlockPosition("%SrcObjectt%")));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZ", xsVectorGetZ(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZZ", xsVectorGetZ(kbGetBlockPosition("%SrcObjectt%")));</Command>
<Command>if(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX"))trQuestVarSetFromRand("lostroMetresXlol", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX"), trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"), false);</Command>
<Command>if(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"))trQuestVarSetFromRand("lostroMetresXlol", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"), trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX"), false);</Command>
<Command>if(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ"))trQuestVarSetFromRand("lostroMetresZlol", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ"), trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"), false);</Command>
<Command>if(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"))trQuestVarSetFromRand("lostroMetresZlol", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"), trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ"), false);</Command>
<Command>trQuestVarSetFromRand("lostrozzabcdlolrand",1,800,true);</Command>
<Command>trArmyDispatch("%SrcArmy%", ""+kbGetProtoUnitName(trQuestVarGet("lostrozzabcdlolrand")), %Count%, trQuestVarGet("lostroMetresXlol"),0,trQuestVarGet("lostroMetresZlol"), %Heading%, %Clear%);</Command>
<Command>xsSetContextPlayer(trQuestVarGet("lostrolastplayerxD"));</Command>
</Effect>


Invoke God Power everywhere in area (Objects)

This trigger invokes a god power everywhere in a random place between two units



The code:


<Effect name="Invoke God Power everywhere in area (objects)">
<Param name="Player" dispName="Player" varType="player">0</Param>
<Param name="Power" dispName="Power" varType="godpower">default</Param>
<Param name="SrcObject" dispName="Object 1" varType="unit">default</Param>
<Param name="SrcObjectt" dispName="Object 2" varType="unit">default</Param>
<Command>trQuestVarSet("lostrolastplayerxD", xsGetContextPlayer());</Command>
<Command>xsSetContextPlayer(0);</Command>
<Command>kbLookAtAllUnitsOnMap();</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvX", xsVectorGetX(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvXX", xsVectorGetX(kbGetBlockPosition("%SrcObjectt%")));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZ", xsVectorGetZ(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZZ", xsVectorGetZ(kbGetBlockPosition("%SrcObjectt%")));</Command>
<Command>if(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX"))trQuestVarSetFromRand("lostroMetresXlol", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX"), trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"), false);</Command>
<Command>if(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"))trQuestVarSetFromRand("lostroMetresXlol", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"), trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX"), false);</Command>
<Command>if(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ"))trQuestVarSetFromRand("lostroMetresZlol", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ"), trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"), false);</Command>
<Command>if(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"))trQuestVarSetFromRand("lostroMetresZlol", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"), trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ"), false);</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvX2", xsVectorGetX(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvXX2", xsVectorGetX(kbGetBlockPosition("%SrcObjectt%")));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZ2", xsVectorGetZ(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZZ2", xsVectorGetZ(kbGetBlockPosition("%SrcObjectt%")));</Command>
<Command>if(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX2")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX2"))trQuestVarSetFromRand("lostroMetresXlol2", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX2"), trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX2"), false);</Command>
<Command>if(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX2")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX2"))trQuestVarSetFromRand("lostroMetresXlol2", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX2"), trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX2"), false);</Command>
<Command>if(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ2")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ2"))trQuestVarSetFromRand("lostroMetresZlol2", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ2"), trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ2"), false);</Command>
<Command>if(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ2")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ2"))trQuestVarSetFromRand("lostroMetresZlol2", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ2"), trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ2"), false);</Command>
<Command>trTechInvokeGodPower(%Player%, "%Power%", xsVectorSet(trQuestVarGet("lostroMetresXlol"), 1, trQuestVarGet("lostroMetresZlol")), xsVectorSet(trQuestVarGet("lostroMetresXlol2"), 1, trQuestVarGet("lostroMetresZlol2")));</Command>
<Command>xsSetContextPlayer(trQuestVarGet("lostrolastplayerxD"));</Command>
</Effect>


Army Deploy in perimeter of area (Objects)

This Deploys an army in every point of the perimeter between two units




<Effect name="Army Deploy in perimeter of area (objects)">
<Param name="SrcArmy" dispName="$$22348$$Army" VarType="group">default</Param>
<Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager Greek</Param>
<Param name="SrcObject" dispName="Object 1" varType="unit">default</Param>
<Param name="SrcObjectt" dispName="Object 2" varType="unit">default</Param>
<Param name="Step" dispName="Step size" varType="string">1</Param>
<Param name="Heading" dispName="$$22432$$Heading" varType="string">0</Param>
<Param name="Clear" dispName="$$22464$$Clear Existing Units:" varType="bool">true</Param>
<Command>trQuestVarSet("lostrolastplayerxD", xsGetContextPlayer());</Command>
<Command>xsSetContextPlayer(0);</Command>
<Command>kbLookAtAllUnitsOnMap();</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvX", xsVectorGetX(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvXX", xsVectorGetX(kbGetBlockPosition("%SrcObjectt%")));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZ", xsVectorGetZ(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZZ", xsVectorGetZ(kbGetBlockPosition("%SrcObjectt%")));</Command>
<Command><![CDATA[if((trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX"))&&(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ"))){]]></Command>
<Command>while(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX")){</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", 1, trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX"),0,trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ"), %Heading%, %Clear%);</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvX", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX")+%Step%);}</Command>
<Command>while(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ")){</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", 1, trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX"),0,trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ"), %Heading%, %Clear%);</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZ", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ")+%Step%);}</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvX", xsVectorGetX(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZ", xsVectorGetZ(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>while(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ")){</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", 1, trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX"),0,trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ"), %Heading%, %Clear%);</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZ", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ")+%Step%);}</Command>
<Command>while(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX")){</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", 1, trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX"),0,trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ"), %Heading%, %Clear%);</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvX", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX")+%Step%);}</Command>
<Command>}</Command>
<Command><![CDATA[if((trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"))&&(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"))){]]></Command>
<Command>while(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX")){</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", 1, trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"),0,trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"), %Heading%, %Clear%);</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvXX", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX")+%Step%);}</Command>
<Command>while(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ")){</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", 1, trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"),0,trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"), %Heading%, %Clear%);</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZZ", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ")+%Step%);}</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvXX", xsVectorGetX(kbGetBlockPosition("%SrcObjectt%")));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZZ", xsVectorGetZ(kbGetBlockPosition("%SrcObjectt%")));</Command>
<Command>while(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ")){</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", 1, trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"),0,trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"), %Heading%, %Clear%);</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZZ", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ")+%Step%);}</Command>
<Command>while(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX")){</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", 1, trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"),0,trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"), %Heading%, %Clear%);</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvXX", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX")+%Step%);}</Command>
<Command>}</Command>
<Command><![CDATA[if((trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"))&&(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ")<=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"))){]]></Command>
<Command>while(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX")){</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", 1, trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"),0,trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ"), %Heading%, %Clear%);</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvXX", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX")+%Step%);}</Command>
<Command>while(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ")){</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", 1, trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"),0,trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ"), %Heading%, %Clear%);</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZ", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ")+%Step%);}</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvXX", xsVectorGetX(kbGetBlockPosition("%SrcObjectt%")));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZ", xsVectorGetZ(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>while(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ")){</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", 1, trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"),0,trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ"), %Heading%, %Clear%);</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZ", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ")+%Step%);}</Command>
<Command>while(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX")){</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", 1, trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"),0,trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ"), %Heading%, %Clear%);</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvXX", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX")+%Step%);}</Command>
<Command>}</Command>
<Command><![CDATA[if((trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX")<=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"))&&(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"))){]]></Command>
<Command>while(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX")){</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", 1, trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX"),0,trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"), %Heading%, %Clear%);</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvX", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX")+%Step%);}</Command>
<Command>while(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ")){</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", 1, trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX"),0,trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"), %Heading%, %Clear%);</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZZ", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ")+%Step%);}</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvX", xsVectorGetX(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZZ", xsVectorGetZ(kbGetBlockPosition("%SrcObjectt%")));</Command>
<Command>while(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ")){</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", 1, trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX"),0,trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"), %Heading%, %Clear%);</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZZ", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ")+%Step%);}</Command>
<Command>while(trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX")>=trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX")){</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", 1, trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX"),0,trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"), %Heading%, %Clear%);</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvX", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX")+%Step%);}</Command>
<Command>}</Command>
<Command>xsSetContextPlayer(trQuestVarGet("lostrolastplayerxD"));</Command>
</Effect>


Army Deploy in perimeter of circle (Center object)

This Deploys an army in every point of the perimeter of a circle, that has as center point an unit


<Effect name="Army Deploy in perimeter of circle (center object)"> <!--Thanks to HailToTheOboe--> <Param name="SrcObject" dispName="Source Units" varType="unit">default</Param> <Param name="SrcArmy" dispName="$$22348$$Army" VarType="group">default</Param> <Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param> <Param name="Radius" dispName="Radius" varType="string">10</Param> <Param name="Step" dispName="Step Size" varType="string">5</Param> <Param name="Heading" dispName="$$22432$$Heading" varType="string">0</Param> <Param name="Clear" dispName="$$22464$$Clear Existing Units:" varType="bool">true</Param> <Command>for(id=0;>1) {} for(theta=0;>1) {}</Command> <Command>id=kbGetBlockID("%SrcObject%");</Command> <Command>while(360>=trQuestVarGet("deploycircle"+id)){</Command> <Command>theta=trQuestVarGet("deploycircle"+id);</Command> <Command>trUnitSelectClear();</Command> <Command loop="" loopParm="SrcObject">trUnitSelect("%SrcObject%");</Command> <Command>trVectorQuestVarSet("SrcObjPos", kbGetBlockPosition("%SrcObject%"));</Command> <Command>trQuestVarSet("stepx",trVectorQuestVarGetX("SrcObjPos")+1.0*%Radius%*Math_sin(1.0*theta*PI/180.0));</Command> <Command>trQuestVarSet("stepy",trVectorQuestVarGetY("SrcObjPos"));</Command> <Command>trQuestVarSet("stepz",trVectorQuestVarGetZ("SrcObjPos")+1.0*%Radius%*Math_cos(1.0*theta*PI/180.0));</Command> <Command>trVectorQuestVarSet("currentstep", xsVectorSet(trQuestVarGet("stepx"),trQuestVarGet("stepy"),trQuestVarGet("stepz")));</Command> <Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", 1, trVectorQuestVarGetX("currentstep"),trVectorQuestVarGetY("currentstep"),trVectorQuestVarGetZ("currentstep"), %Heading%, %Clear%);</Command> <Command>trQuestVarSet("deploycircle"+id,trQuestVarGet("deploycircle"+id)+%Step%);}</Command> <Command>trQuestVarSet("deploycircle"+id,0);</Command> </Effect>

Utilities || Map Tool 3.1 Inventory Triggers MP Triggers Comic AoM
RandomMaps || Mad Supremacy Escape Your Mates Escape
Scenarios || Bomberman Minigames Y 2.0 Convert & Fight
Games || Bullet Demo Ball Bouncer 3D
WRP_Beater: "Meglio una gallina oggi che un uovo domani."
My name has been misspelled 132 times (Last: BSU_DoLhades Best: Lostrozzabercrombie In a row: 5)

[This message has been edited by lostrozzacavalli (edited 12-25-2009 @ 05:56 PM).]

Replies:
posted 17 October 2009 04:40 PM EDT (US)     1 / 25  
that should be really good for sp eyecandy!
unfortunately, i think it can lag online

AoMH retired Scenario designer
Skarr: "I wish WRP_Beater would stop abusing the poor BBCode."
lostrozzacavalli: "Mezzo e un minuto." | "I'm joking ragazzo."
Dr. Newt: "You are WRP. A slightly manic Italian presence on the forums, you have improved over the years to be a fairly reliable pair of hands, either as town or scum."
posted 17 October 2009 04:48 PM EDT (US)     2 / 25  
You can use it for the first pass of decorating a section of map, set up that trigger and playtest in editor, then take the trigger out, then fine tune what you just added.

Handy.

Generating the line of SFX between two units is pretty cool.
posted 17 October 2009 06:43 PM EDT (US)     3 / 25  
CLUSTER BOMB!

Use a 'meteor impact ground'... need I say more?
posted 18 October 2009 04:06 AM EDT (US)     4 / 25  
Thread updated with "Invoke god power everywhere in area (objects)"

Utilities || Map Tool 3.1 Inventory Triggers MP Triggers Comic AoM
RandomMaps || Mad Supremacy Escape Your Mates Escape
Scenarios || Bomberman Minigames Y 2.0 Convert & Fight
Games || Bullet Demo Ball Bouncer 3D
WRP_Beater: "Meglio una gallina oggi che un uovo domani."
My name has been misspelled 132 times (Last: BSU_DoLhades Best: Lostrozzabercrombie In a row: 5)
posted 18 October 2009 05:37 AM EDT (US)     5 / 25  
Looks very handy!

______________________________________ Yeebaagooon ______________________________________
____________________ AoMH Seraph ____________________
"You can't trust yeebaagooon to lead a rebelion, He would send everyone to steal mirrors so he could bask in his own brilliance." - Out Reach
"Yeebaagooon had never seen a more handsome man in all his life. He couldn't control himself, He needed to act. Gripping the mirror in his strong arms he kissed the figure before him..." - Out Reach
AoMH: Unfinished Scenarios|Singleplayer: Codename Ripto|Multiplayer: Minigames Z|CSC 7
Ex Seraphs Dictator, Spore Heaven Seraph
posted 18 October 2009 02:07 PM EDT (US)     6 / 25  
This is sweet!

oh you can wait for what I can give
you know what I am so you know how I live
try to look proud but you’re not in the slightest
its happening now and it’s always been like this.
posted 18 October 2009 02:24 PM EDT (US)     7 / 25  
Does this work online?

Immortal_Anubite -Pholax Cynopolis- A 9' tall Immortal beast that feeds off of human flesh!!
posted 18 October 2009 02:31 PM EDT (US)     8 / 25  
i think it can lag, but in sp its amazing

AoMH retired Scenario designer
Skarr: "I wish WRP_Beater would stop abusing the poor BBCode."
lostrozzacavalli: "Mezzo e un minuto." | "I'm joking ragazzo."
Dr. Newt: "You are WRP. A slightly manic Italian presence on the forums, you have improved over the years to be a fairly reliable pair of hands, either as town or scum."
posted 18 October 2009 02:45 PM EDT (US)     9 / 25  
Just reduce the speed of the loop and you can control how much it lags. Also, you can control the lag by using different effects, naturally the spectacular ones are the laggiest.
posted 18 October 2009 04:32 PM EDT (US)     10 / 25  
Could you make this with armies please? That would probably make it easier to use effectively.
posted 18 October 2009 04:44 PM EDT (US)     11 / 25  
Using armies instead of units for the endpoints is doable, and would be handy I guess.

But you know what would be really incredibly amazing?

Use a single army to define the "outline" of the area, and deploy in that area. If you've got two units in the army it'd work the same way as you've got now, but if you have more you could make polygons.

Hell, I don't even know if that'd be possible.
posted 18 October 2009 09:19 PM EDT (US)     12 / 25  
Aw ya, combine that with a bunch of fancy army deploys (like that circle one) and you could get some pretty neat effects.
posted 19 October 2009 08:18 AM EDT (US)     13 / 25  
You've been doing a lot of good work, lostrozzacavalli, you could probably release your own trigger pack separate to the CASTWCRT one given how many trigger effects you've made.

Here's an effect I made similar to yours. It uses a Unit to specify a corner, then deploys an army to a random point within an area defined by distances from the corner unit.
   <Effect name="Army Deploy Random Area From Unit">
<Param name="SrcArmy" dispName="Army" VarType="group">default</Param>
<Param name="ProtoName" dispName="ProtoName" varType="protounit">Anubite</Param>
<Param name="SrcObject" dispName="Unit" varType="unit">default</Param>
<Param name="DistX" dispName="Distance X" varType="long">100</Param>
<Param name="DistZ" dispName="Distance Z" varType="long">100</Param>
<Param name="Count" dispName="Count" varType="long">1</Param>
<Param name="Heading" dispName="Heading" varType="long">0</Param>
<Command>trQuestVarSet("lastplayer", xsGetContextPlayer());</Command>
<Command>xsSetContextPlayer(0);</Command>
<Command>kbLookAtAllUnitsOnMap();</Command>
<Command>trQuestVarSet("CornerUnitX", xsVectorGetX(kbUnitGetPosition(%SrcObject%)));</Command>
<Command>trQuestVarSet("CornerUnitZ", xsVectorGetZ(kbUnitGetPosition(%SrcObject%)));</Command>
<Command>trQuestVarSetFromRand("DeployPositionX", trQuestVarGet("CornerUnitX"), trQuestVarGet("CornerUnitX") + %DistX%, false);</Command>
<Command>trQuestVarSetFromRand("DeployPositionZ", trQuestVarGet("CornerUnitZ"), trQuestVarGet("CornerUnitZ") + %DistZ%, false);</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", %Count%, trQuestVarGet("DeployPositionX"),0,trQuestVarGet("DeployPositionZ"), %Heading%, true);</Command>
<Command>xsSetContextPlayer(trQuestVarGet("lastplayer"));</Command>
</Effect>


I've had to set Clear Units to true as there wasn't enough room to include it as a paramater.
posted 19 October 2009 09:56 AM EDT (US)     14 / 25  
@Immortal Anubite| It works, sure!
Use a single army to define the "outline" of the area, and deploy in that area. If you've got two units in the army it'd work the same way as you've got now, but if you have more you could make polygons.
I don't know how to make a trigger like this

@Papaya/Yeebaagooon| Yes, thanks !

@Perpetual| Yes, you're right, I'll make a trigger pack from myself including these triggers, but not the other.

P.S. Thanks for your trigger, I add it to my list signing it as your, and if you want I could add it to the pack too.

@Everyone| Could someone try to debug this trigger (Perpetual )? It works (no trigger lock), but deploy the unit in the corner of the map.

   <Effect name="Army Deploy everywhere in area (armies)">
<Param name="SrcArmy" dispName="$$22348$$Army" VarType="group">default</Param>
<Param name="ProtoName" dispName="$$22434$$ProtoName" varType="protounit">Villager</Param>
<Param name="SrcArmyy" dispName="Army 1" varType="group">default</Param>
<Param name="SrcArmyyy" dispName="Army 2" varType="group">default</Param>
<Param name="Count" dispName="$$22435$$Count" varType="long">0</Param>
<Param name="Heading" dispName="$$22432$$Heading" varType="long">0</Param>
<Param name="Clear" dispName="$$22464$$Clear Existing Units:" varType="bool">true</Param>
<Command>xsSetContextPlayer(xsVectorGetX(vector(%SrcArmyy%,0)));</Command>
<Command>xsSetContextPlayer(xsVectorGetX(vector(%SrcArmyyy%,0)));</Command>
<Command>xsSetContextPlayer(xsVectorGetZ(vector(%SrcArmyy%,0)));</Command>
<Command>xsSetContextPlayer(xsVectorGetZ(vector(%SrcArmyyy%,0)));</Command>
<Command>kbLookAtAllUnitsOnMap();</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvX", xsVectorGetX(kbArmyGetLocation(xsVectorGetY(vector(%SrcArmyy%,-1)))));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvXX", xsVectorGetX(kbArmyGetLocation(xsVectorGetY(vector(%SrcArmyyy%,-1)))));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZ", xsVectorGetZ(kbArmyGetLocation(xsVectorGetY(vector(%SrcArmyy%,-1)))));</Command>
<Command>trQuestVarSet("lostroasdiosfvnaoisnaiosdfvZZ", xsVectorGetZ(kbArmyGetLocation(xsVectorGetY(vector(%SrcArmyyy%,-1)))));</Command>
<Command>trQuestVarSetFromRand("lostroMetresXlol", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvX"), trQuestVarGet("lostroasdiosfvnaoisnaiosdfvXX"), false);</Command>
<Command>trQuestVarSetFromRand("lostroMetresZlol", trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZ"), trQuestVarGet("lostroasdiosfvnaoisnaiosdfvZZ"), false);</Command>
<Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", %Count%, trQuestVarGet("lostroMetresXlol"),0,trQuestVarGet("lostroMetresZlol"), %Heading%, %Clear%);</Command>
</Effect>

Utilities || Map Tool 3.1 Inventory Triggers MP Triggers Comic AoM
RandomMaps || Mad Supremacy Escape Your Mates Escape
Scenarios || Bomberman Minigames Y 2.0 Convert & Fight
Games || Bullet Demo Ball Bouncer 3D
WRP_Beater: "Meglio una gallina oggi che un uovo domani."
My name has been misspelled 132 times (Last: BSU_DoLhades Best: Lostrozzabercrombie In a row: 5)
posted 19 October 2009 10:34 AM EDT (US)     15 / 25  
nice find

Wolverhampton Wanderers F.C.
posted 19 October 2009 12:04 PM EDT (US)     16 / 25  
Main post updated: if you already downloaded these triggers please redownload them: there's a better version!
Added the picture of: Line of Fire

Utilities || Map Tool 3.1 Inventory Triggers MP Triggers Comic AoM
RandomMaps || Mad Supremacy Escape Your Mates Escape
Scenarios || Bomberman Minigames Y 2.0 Convert & Fight
Games || Bullet Demo Ball Bouncer 3D
WRP_Beater: "Meglio una gallina oggi che un uovo domani."
My name has been misspelled 132 times (Last: BSU_DoLhades Best: Lostrozzabercrombie In a row: 5)
posted 19 October 2009 01:14 PM EDT (US)     17 / 25  
posted 10 December 2009 09:59 AM EDT (US)     18 / 25  
I'm sorry to bump this old thread but as HailToTheOboe (Thanks! ) has said me, I needed a different command, so I've updated all the triggers (You need to redownload them).

Then I made a trigger called "Army Deploy in Perimeter of Area (Objects)". See the new video! It creates nice effects and it's a bit less "random" than the other ones.

Utilities || Map Tool 3.1 Inventory Triggers MP Triggers Comic AoM
RandomMaps || Mad Supremacy Escape Your Mates Escape
Scenarios || Bomberman Minigames Y 2.0 Convert & Fight
Games || Bullet Demo Ball Bouncer 3D
WRP_Beater: "Meglio una gallina oggi che un uovo domani."
My name has been misspelled 132 times (Last: BSU_DoLhades Best: Lostrozzabercrombie In a row: 5)
posted 10 December 2009 07:39 PM EDT (US)     19 / 25  
These look very cool. But is there a way to change the types of shapes the areas are. Like instead of a square, or a line between them, have a circle perimeter and all spaces between the two units, not just in a line. Do they lag?

Tired of unorigional, boring campaigns? Try out DEMO|Legacy - The Uprising|DEMO
Completely New Gameplay. Random Map Type Replayability. Delve into Nomadican|FEATURES|DOWNLOAD|
Want to know how to use triggers and/or create amazing factors in your scenarios? You need Combination Effects|FEATURES|DOWNLOAD|
Automaton Metals Textures, New Custom Triggers
Upcoming Projects: Legacy - The Uprising, Destiny
6/12/1997, a day that will live in infamy.
posted 10 December 2009 08:21 PM EDT (US)     20 / 25  
From what I can tell not really. It is hard to make circles when it comes to this kind of trigger, it uses the grids I believe.

"I even heard rumors of a return of the SST (hint, hint..)" - Elrich

You heard it folks... Spam him until he makes a new SST thread!
posted 10 December 2009 08:32 PM EDT (US)     21 / 25  
From what I can tell not really. It is hard to make circles when it comes to this kind of trigger, it uses the grids I believe.
Why not?

First, find the midpoint between the two units, and then deploy randomly in that area. Randomize X between 0 and Radius, and then randomize Z between 0 and sqrt(R^2-X^2).
posted 11 December 2009 07:27 AM EDT (US)     22 / 25  
Don't sleep in math class people!

P.S.: whats with the new BB-code bar?

If we knew what it was we were doing, it would not be called research, would it? - Einstein, A.
Master XS - AoM Code Reference - Trigger Loader - Trigger Requests - Chess

Wow, I never thought that I would actually know something before nottud did... it's actually not all that satisfying ~ Steak
posted 11 December 2009 08:13 AM EDT (US)     23 / 25  
I've now made a circle one -More thanks to Hail (I just copied his "Teleport in circle" with some modifies)- but it's not so accurate as Army deploy can only be used with integers, while Teleport does with floats too...

Utilities || Map Tool 3.1 Inventory Triggers MP Triggers Comic AoM
RandomMaps || Mad Supremacy Escape Your Mates Escape
Scenarios || Bomberman Minigames Y 2.0 Convert & Fight
Games || Bullet Demo Ball Bouncer 3D
WRP_Beater: "Meglio una gallina oggi che un uovo domani."
My name has been misspelled 132 times (Last: BSU_DoLhades Best: Lostrozzabercrombie In a row: 5)
posted 11 December 2009 08:21 AM EDT (US)     24 / 25  
Sorry I got it wrong, should be X between -R and +R, and Z between -sqrt(R^2-X^2) and +sqrt(R^2-X^2) so you get more than a quarter circle.

Sorry MF I'll try to stay awake next time.

[This message has been edited by HailToTheOboe (edited 12-11-2009 @ 02:52 PM).]

posted 11 December 2009 08:29 AM EDT (US)     25 / 25  
Ah ok thanks I'll try that later, what I did was "in perimeter of circle" not "everywhere in area (circle)".

Utilities || Map Tool 3.1 Inventory Triggers MP Triggers Comic AoM
RandomMaps || Mad Supremacy Escape Your Mates Escape
Scenarios || Bomberman Minigames Y 2.0 Convert & Fight
Games || Bullet Demo Ball Bouncer 3D
WRP_Beater: "Meglio una gallina oggi che un uovo domani."
My name has been misspelled 132 times (Last: BSU_DoLhades Best: Lostrozzabercrombie In a row: 5)
Age of Mythology Heaven » Forums » Scenario Design » A new amazing tri(ck)gger!
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Mythology Heaven | HeavenGames