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

Scenario Design
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: YES! Copy terrain from ANYWHERE and paste it ANYWHERE trigger breakthrough!
« Previous Page  1 2  Next Page »
posted 30 December 2007 07:16 PM EDT (US)   
Yes, finally done it! You can now copy terrain from anywhere on the map you like any size. Then you can paste it anywhere you like on the map.


Note - trigger shown in screenshot is now out of date and has been updated.

In edtior - place cienamtics blocks at opposite corners of the area you want to copy and select them. Next place blocks in an IDENTICAL layout in an area you want to paste. Have the terrain grid to help you. Then fire event copy trigger 2. This is nessisary for it to work and I have tried very hard and have found no way to do it with just 1 trigger. The fire event creates a slight pause that is required for the trigger to work.

Next fire event paste trigger 1 with the copy trigger 2. Select the blocks in opposite corners again IN THE SAME WAY as the first one. e.g. if you selected the block in the top right corner the copy first do it for the paste first also to avoid problems. Finally fire event paste 2 where you can specifiy if you want the height or elevation pasting or even both!



Hey presto! You have painted the snow in the other area! Interestingly enough, it does NOT also paste the passability. e.g. if you pasted cliff on grass then it will act as grass still. If you do not want this you need to use the refresh terrain passability which makes the game sort of "reload" the passability of the terrain on the map making the cliff pasted on grass actaully act as cliff.

VERY small drawbacks that can't be fixed:
@Fire eventing business and 2 parts can be a pain and tiresome to set up but cannot be helped. (4 triggers used in all)
@Interface my flash due to rapid interface changes. Unfortunate this cannot be helped either.

One BIG problem I have recenty found but could be fixed:
NOW FIXED THANKS TO invent00r!

I have tested to see if they work on LAN and it is fine. (game runs in multiplayer mode and it works with no crash!)

Triggers are below:
   <Effect name="zCopy Terrain to Clipboard Part 1">
<Param name="warning" dispName="Info" varType="string">Place 2 cinematic blocks at opposite corners of the square of land you want to copy and select them</Param>
<Param name="SrcObject" dispName="Cine Block1" varType="unit">default</Param>
<Param name="SrcObject2" dispName="Cine Block2" varType="unit">default</Param>
<Param name="EventID" dispName="$$22362$$Trigger" varType="event">-1</Param>
<Command>map("mouse1down", "copy", "");</Command>
<Command>map("mouse1up", "copy", "");</Command>
<Command>map("mouse1up", "TerrainPaste", "");</Command>
<Command>map("mouse2up", "TerrainPaste", "");</Command>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>configToggle("cameraMovementLock");</Command>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>modeEnter("pregame");</Command>
<Command>modeEnter("Simulation");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
<Command>editMode("copy");</Command>
<Command>trackInsert();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackAddWaypoint();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trQuestVarSet("zzza",xsVectorGetX(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("zzzb",xsVectorGetY(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("zzzc",xsVectorGetZ(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzza"),trQuestVarGet("zzzb"),trQuestVarGet("zzzc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>uiTerrainSelection(0);</Command>
<Command>trQuestVarSet("zzzaa",xsVectorGetX(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trQuestVarSet("zzzbb",xsVectorGetY(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trQuestVarSet("zzzcc",xsVectorGetZ(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzzaa"),trQuestVarGet("zzzbb"),trQuestVarGet("zzzcc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>trackInsert();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackAddWaypoint();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackPlay(10000,-1);</Command>
<Command>trEventFire(%EventID%);</Command>
</Effect>

<Effect name="zCopy Terrain to Clipboard Part 2">
<Param name="warning" dispName="Info" varType="string">Insert version 1 (Other one) then FIRE EVENT part 2 to make it work!</Param>
<Param name="EventID" dispName="$$22362$$Trigger" varType="event">-1</Param>
<Command>uiTerrainSelection(1);</Command>
<Command>uiCopyToClipboard();</Command>
<Command>editMode("none");</Command>
<Command>subModeLeave("Simulation", "Editor");</Command>
<Command>trackRemove();</Command>
<Command>trackPlay(1,-1);</Command>
<Command>configToggle("cameraMovementLock");</Command>
<Command>trEventFire(%EventID%);</Command>
<Command>map("mouse1down", "copy", "uiTerrainSelection(0)");</Command>
<Command>map("mouse1up", "copy", "uiTerrainSelection(1)");</Command>
<Command>map("mouse1up", "TerrainPaste", "uiPasteFromClipboard");</Command>
<Command>map("mouse2up", "TerrainPaste", "editMode(\"copy\")");</Command>
</Effect>

<Effect name="zPaste Terrain from Clipboard Part 1">
<Param name="warning" dispName="Info" varType="string">Place 2 cinematic blocks at opposite corners of the square of land you want to copy and select them</Param>
<Param name="SrcObject" dispName="Cine Block1" varType="unit">default</Param>
<Param name="SrcObject2" dispName="Cine Block2" varType="unit">default</Param>
<Param name="v" dispName="Paste rotation" varType="stringid">0</Param>
<Param name="EventID" dispName="$$22362$$Trigger" varType="event">-1</Param>
<Command>map("mouse1down", "copy", "");</Command>
<Command>map("mouse1up", "copy", "");</Command>
<Command>map("mouse1up", "TerrainPaste", "");</Command>
<Command>map("mouse2up", "TerrainPaste", "");</Command>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>configToggle("cameraMovementLock");</Command>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>modeEnter("pregame");</Command>
<Command>modeEnter("Simulation");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
<Command>editMode("TerrainPaste");</Command>
<Command>trackInsert();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackAddWaypoint();</Command>
<Command>trackEditWaypoint();</Command>
<Command>uiChangeBrushType("Rectangular");</Command>
<Command>uiSetClipboardRotation(%v%);</Command>
<Command>trQuestVarSet("zzza",xsVectorGetX(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("zzzb",xsVectorGetY(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("zzzc",xsVectorGetZ(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzza"),trQuestVarGet("zzzb"),trQuestVarGet("zzzc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>uiTerrainSelection(0);</Command>
<Command>trQuestVarSet("zzzaa",xsVectorGetX(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trQuestVarSet("zzzbb",xsVectorGetY(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trQuestVarSet("zzzcc",xsVectorGetZ(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzzaa"),trQuestVarGet("zzzbb"),trQuestVarGet("zzzcc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>trackInsert();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackAddWaypoint();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackPlay(10000,-1);</Command>
<Command>trEventFire(%EventID%);</Command>
</Effect>

<Effect name="zPaste Terrain from Clipboard Part 2">
<Param name="warning" dispName="Info" varType="string">Paste area needs to be same size as one you copied. Fire event part 2 after part 1.</Param>
<Param name="v1" dispName="Enable Height Paste" varType="Bool">true</Param>
<Param name="v2" dispName="Enable Terrain Paste" varType="Bool">true</Param>
<Param name="EventID" dispName="$$22362$$Trigger" varType="event">-1</Param>
<Command>uiTerrainSelection(1);</Command>
<Command>if(%v1% == false)uiToggleTerrainPasteMode(2);</Command>
<Command>if(%v2% == false)uiToggleTerrainPasteMode(1);</Command>
<Command>uiPasteFromClipboard();</Command>
<Command>if(%v1% == false)uiToggleTerrainPasteMode(2);</Command>
<Command>if(%v2% == false)uiToggleTerrainPasteMode(1);</Command>
<Command>editMode("none");</Command>
<Command>subModeLeave("Simulation", "Editor");</Command>
<Command>trackRemove();</Command>
<Command>trackPlay(1,-1);</Command>
<Command>configToggle("cameraMovementLock");</Command>
<Command>trEventFire(%EventID%);</Command>
<Command>map("mouse1down", "copy", "uiTerrainSelection(0)");</Command>
<Command>map("mouse1up", "copy", "uiTerrainSelection(1)");</Command>
<Command>map("mouse1up", "TerrainPaste", "uiPasteFromClipboard");</Command>
<Command>map("mouse2up", "TerrainPaste", "editMode(\"copy\")");</Command>
</Effect>
You can now store multiple terrains at once - use the number version of the triggers instead and select the clipboard number you want to copy to.
   <Effect name="zCopy Terrain to Clipboard number Part 2">
<Param name="warning" dispName="Info" varType="string">Insert version 1 (Other one) then FIRE EVENT part 2 to make it work!</Param>
<Param name="EventID" dispName="$$22362$$Trigger" varType="event">-1</Param>
<Param name="number" dispName="Clipboard number" VarType="long">1</Param>
<Command>uiTerrainSelection(1);</Command>
<Command>uiCopyToClipboard();</Command>
<Command>terrainPasteBufferSave("%number%");</Command>
<Command>editMode("none");</Command>
<Command>subModeLeave("Simulation", "Editor");</Command>
<Command>trackRemove();</Command>
<Command>trackPlay(1,-1);</Command>
<Command>configToggle("cameraMovementLock");</Command>
<Command>trEventFire(%EventID%);</Command>
<Command>map("mouse1down", "copy", "uiTerrainSelection(0)");</Command>
<Command>map("mouse1up", "copy", "uiTerrainSelection(1)");</Command>
<Command>map("mouse1up", "TerrainPaste", "uiPasteFromClipboard");</Command>
<Command>map("mouse2up", "TerrainPaste", "editMode(\"copy\")");</Command>
</Effect>

<Effect name="zPaste Terrain from Clipboard number Part 1">
<Param name="warning" dispName="Info" varType="string">Place 2 cinematic blocks at opposite corners of the square of land you want to copy and select them</Param>
<Param name="SrcObject" dispName="Cine Block1" varType="unit">default</Param>
<Param name="SrcObject2" dispName="Cine Block2" varType="unit">default</Param>
<Param name="v" dispName="Paste rotation" varType="stringid">0</Param>
<Param name="EventID" dispName="$$22362$$Trigger" varType="event">-1</Param>
<Param name="number" dispName="Clipboard number" VarType="long">1</Param>
<Command>map("mouse1down", "copy", "");</Command>
<Command>map("mouse1up", "copy", "");</Command>
<Command>map("mouse1up", "TerrainPaste", "");</Command>
<Command>map("mouse2up", "TerrainPaste", "");</Command>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>configToggle("cameraMovementLock");</Command>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>modeEnter("pregame");</Command>
<Command>modeEnter("Simulation");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
<Command>editMode("TerrainPaste");</Command>
<Command>trackInsert();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackAddWaypoint();</Command>
<Command>trackEditWaypoint();</Command>
<Command>uiChangeBrushType("Rectangular");</Command>
<Command>terrainPasteBufferLoad("%number%");</Command>
<Command>uiSetClipboardRotation(%v%);</Command>
<Command>trQuestVarSet("zzza",xsVectorGetX(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("zzzb",xsVectorGetY(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("zzzc",xsVectorGetZ(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzza"),trQuestVarGet("zzzb"),trQuestVarGet("zzzc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>uiTerrainSelection(0);</Command>
<Command>trQuestVarSet("zzzaa",xsVectorGetX(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trQuestVarSet("zzzbb",xsVectorGetY(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trQuestVarSet("zzzcc",xsVectorGetZ(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzzaa"),trQuestVarGet("zzzbb"),trQuestVarGet("zzzcc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>trackInsert();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackAddWaypoint();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackPlay(10000,-1);</Command>
<Command>trEventFire(%EventID%);</Command>
</Effect>
Shortcut trigger now created. Simply insert ONE trigger with the condition always. Make sure all the boxes are UNCHKECKED and priority is on max. Then insert the zquick copy and paste terrain trigger and fill in the fields. Then if you want it to activate simply fire event the trigger!
   <Effect name="zQuick copy and paste terrain">
<Param name="SrcObject" dispName="Copy Block1" varType="unit">default</Param>
<Param name="SrcObject2" dispName="Copy Block2" varType="unit">default</Param>
<Param name="SrcObject3" dispName="Paste Block1" varType="unit">default</Param>
<Param name="SrcObject4" dispName="Paste Block2" varType="unit">default</Param>
<Param name="v1" dispName="Enable Height Paste" varType="Bool">true</Param>
<Param name="v2" dispName="Enable Terrain Paste" varType="Bool">true</Param>
<Param name="v" dispName="Trigger Name" varType="stringid">copy1</Param>
<Command>trQuestVarSet("zzzz", trQuestVarGet("zzzz") + 1);</Command>
<Command>if(trQuestVarGet("zzzz") == 1){</Command>
<Command>map("mouse1down", "copy", "");</Command>
<Command>map("mouse1up", "copy", "");</Command>
<Command>map("mouse1up", "TerrainPaste", "");</Command>
<Command>map("mouse2up", "TerrainPaste", "");</Command>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>configToggle("cameraMovementLock");</Command>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>modeEnter("pregame");</Command>
<Command>modeEnter("Simulation");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
<Command>editMode("copy");</Command>
<Command>trackInsert();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackAddWaypoint();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trQuestVarSet("zzza",xsVectorGetX(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("zzzb",xsVectorGetY(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("zzzc",xsVectorGetZ(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzza"),trQuestVarGet("zzzb"),trQuestVarGet("zzzc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>uiTerrainSelection(0);</Command>
<Command>trQuestVarSet("zzzaa",xsVectorGetX(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trQuestVarSet("zzzbb",xsVectorGetY(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trQuestVarSet("zzzcc",xsVectorGetZ(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzzaa"),trQuestVarGet("zzzbb"),trQuestVarGet("zzzcc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>trackInsert();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackAddWaypoint();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackPlay(10000,-1);</Command>
<Command>}</Command>
<Command>if(trQuestVarGet("zzzz") == 2){</Command>
<Command>uiTerrainSelection(1);</Command>
<Command>uiCopyToClipboard();</Command>
<Command>editMode("none");</Command>
<Command>trackRemove();</Command>
<Command>}</Command>
<Command>if(trQuestVarGet("zzzz") == 3){</Command>
<Command>editMode("TerrainPaste");</Command>
<Command>uiChangeBrushType("Rectangular");</Command>
<Command>uiSetClipboardRotation(0);</Command>
<Command>trQuestVarSet("zzzza",xsVectorGetX(kbGetBlockPosition("%SrcObject3%")));</Command>
<Command>trQuestVarSet("zzzzb",xsVectorGetY(kbGetBlockPosition("%SrcObject3%")));</Command>
<Command>trQuestVarSet("zzzzc",xsVectorGetZ(kbGetBlockPosition("%SrcObject3%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzzza"),trQuestVarGet("zzzzb"),trQuestVarGet("zzzzc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>uiTerrainSelection(0);</Command>
<Command>trQuestVarSet("zzzzaa",xsVectorGetX(kbGetBlockPosition("%SrcObject4%")));</Command>
<Command>trQuestVarSet("zzzzbb",xsVectorGetY(kbGetBlockPosition("%SrcObject4%")));</Command>
<Command>trQuestVarSet("zzzzcc",xsVectorGetZ(kbGetBlockPosition("%SrcObject4%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzzzaa"),trQuestVarGet("zzzzbb"),trQuestVarGet("zzzzcc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>trackInsert();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackAddWaypoint();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackPlay(10000,-1);</Command>
<Command>}</Command>
<Command>if(trQuestVarGet("zzzz") == 4){</Command>
<Command>uiTerrainSelection(1);</Command>
<Command>if(%v1% == false)uiToggleTerrainPasteMode(2);</Command>
<Command>if(%v2% == false)uiToggleTerrainPasteMode(1);</Command>
<Command>uiPasteFromClipboard();</Command>
<Command>if(%v1% == false)uiToggleTerrainPasteMode(2);</Command>
<Command>if(%v2% == false)uiToggleTerrainPasteMode(1);</Command>
<Command>editMode("none");</Command>
<Command>subModeLeave("Simulation", "Editor");</Command>
<Command>trackRemove();</Command>
<Command>trackPlay(1,-1);</Command>
<Command>configToggle("cameraMovementLock");</Command>
<Command>trQuestVarSet("zzzz",0);</Command>
<Command>map("mouse1down", "copy", "uiTerrainSelection(0)");</Command>
<Command>map("mouse1up", "copy", "uiTerrainSelection(1)");</Command>
<Command>map("mouse1up", "TerrainPaste", "uiPasteFromClipboard");</Command>
<Command>map("mouse2up", "TerrainPaste", "editMode(\"copy\")");</Command>
<Command>}</Command>
<Command>if(trQuestVarGet("zzzz") != 0){</Command>
<Command>trDelayedRuleActivation("_%v%");</Command>
<Command>}</Command>
</Effect>
Plus here is the refresh terrain passability trigger:
   <Effect name="zRefresh Terrain Passability">
<Param name="warning" dispName="Info" varType="string">Will clear your terrain paste clipboard and undo/redo clipboard (not the clipboard number copies)</Param>
<Command>map("mouse1down", "copy", "");</Command>
<Command>map("mouse1up", "copy", "");</Command>
<Command>map("mouse1up", "TerrainPaste", "");</Command>
<Command>map("mouse2up", "TerrainPaste", "");</Command>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>editMode("copy");</Command>
<Command>uiChangeBrushSize(2,2,2,2);</Command>
<Command>uiCopyToClipboard();</Command>
<Command>editMode("none");</Command>
<Command>subModeLeave("Simulation", "Editor");</Command>
<Command>modeEnter("pregame");</Command>
<Command>modeEnter("Simulation");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>editMode("TerrainPaste");</Command>
<Command>uiChangeBrushType("Rectangular");</Command>
<Command>uiSetClipboardRotation(0);</Command>
<Command>uiToggleTerrainPasteMode(2);</Command>
<Command>uiPasteFromClipboard();</Command>
<Command>uiToggleTerrainPasteMode(2);</Command>
<Command>editMode("none");</Command>
<Command>subModeLeave("Simulation", "Editor");</Command>
<Command>modeEnter("pregame");</Command>
<Command>modeEnter("Simulation");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>undo();</Command>
<Command>editMode("none");</Command>
<Command>subModeLeave("Simulation", "Editor");</Command>
<Command>modeEnter("pregame");</Command>
<Command>modeEnter("Simulation");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
<Command>map("mouse1down", "copy", "uiTerrainSelection(0)");</Command>
<Command>map("mouse1up", "copy", "uiTerrainSelection(1)");</Command>
<Command>map("mouse1up", "TerrainPaste", "uiPasteFromClipboard");</Command>
<Command>map("mouse2up", "TerrainPaste", "editMode(\"copy\")");</Command>
</Effect>
This set of triggers may even have more potential than the transform trigger! It definately has me very excited!

These triggers work online!

NOTE - A MAJOR UPDATE HAS BEEN DONE! It is a good idea to reinstall them!

NOTE2:When copying triggers please press the edit post button first or they might not paste properly in your typetest file. This will hopefully shortly be included in my editor pack.

The boy with the mad imagination
Prepare for the ultimate duel!
Learn to use all my triggers and what you can do with them. Visit here.
Find out and download the transform trigger here.
Play some minigames I have created outside AOM including some 3D games here.

[This message has been edited by nottud (edited 01-04-2008 @ 11:52 AM).]

Replies:
posted 30 December 2007 07:33 PM EDT (US)     1 / 35  
DAM! Found small bug - if you are currently selecting units it does not work - looking for a quick fix for this!

EDIT1:Current fix - only run this during cinematic mode.


EDIT2:Still no fix for it - now down online testing with 3 different people:Imp_survivor, Killer_Dong and Nanodude and it worked fix for all 3 of them! This should hopefully prove that it works online fine which is terrific - especially when always until today I thought that the trigger would be impossible to make without crashes and vast complications!

The boy with the mad imagination
Prepare for the ultimate duel!
Learn to use all my triggers and what you can do with them. Visit here.
Find out and download the transform trigger here.
Play some minigames I have created outside AOM including some 3D games here.

[This message has been edited by nottud (edited 12-30-2007 @ 08:30 PM).]

posted 30 December 2007 09:09 PM EDT (US)     2 / 35  
I did everything correct, and heres what happened

While doing it I had to open terrain tools twice, since I could not paint the first time after using the trigger.

I gave myself an Ajax, and player 2 an anubite. And head into a game (playtest) and the screen went black. I changed the pitch to 10, I did not see the terrain copied- but I saw two Ajax's hammering the anubite o.o!

1) Will this serve any uses?
2) What am I doing wrong? ^^

Edit: Re-reading your post I see you already covered the copying the units thing :-p

Haha, trigger paster and non reader for the win

[This message has been edited by Xzyiothe (edited 12-30-2007 @ 09:19 PM).]

posted 30 December 2007 09:36 PM EDT (US)     3 / 35  
Wooo hooo, are you going to add this into your super pack any time soon?

Ăžųŗ§ƒ¡ŗë
--------------------
Scenario Scriptor for Reverie World Studios
-Forums-
posted 30 December 2007 09:46 PM EDT (US)     4 / 35  
Nice find, definately using this one. I was going to suggest user controls be set to off until I remembered you can still click with that ~ Khan

<||=================================||>
Proud Member of Forgotten Empires
96Reviews KaS Dota2 Halo 5 Reach
{ "Work until your idols become your rivals" }
༼ つ ◕_◕ ༽つ trGetUnitScenarioName(); ༼ つ ◕_◕ ༽つ
posted 30 December 2007 09:50 PM EDT (US)     5 / 35  
Wicked nottud, you've done it again

Long life to AOM and to nottud (u had better get all A*)

||||||||||||||||My Videos||||||||||||||||
Roxas, his heart was human, yet because of his status as a being his fate was sealed since he was born. How many times must humanity judge others like that as well without giving them a fair chance?

"It would be very irresponsible of me to give you my thoughts as you are clearly incapable of handling the ones you already have" ~some guy in OD
posted 30 December 2007 10:10 PM EDT (US)     6 / 35  
posted 30 December 2007 10:14 PM EDT (US)     7 / 35  
Hah! I'm already making a mini game with this trigger. Stole ya thunder, nottud!


Though the trigger work will be anything but mini; since I am randomizing (I estimate) 120 triggers only involving the terrain.
posted 31 December 2007 02:59 AM EDT (US)     8 / 35  
DAM! Found small bug - if you are currently selecting units it does not work - looking for a quick fix for this!
Deselect all units trigger?

Anyway great breakthrough!

______________________________________ 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 31 December 2007 05:45 AM EDT (US)     9 / 35  
If you are SELECTING units it happens. (really if you jsut have left click held down it happens)
With invent00r's quest vars, should this work in vanilla?
SHOULD DO!


Note:These triggers are currently in beta stage and there is a possibility that they could be changed if a solution is found to that problem.

What you could do is turn cinematic mode on, then immediately fire event the copy and paste triggers and on the last paste turn cinematic mode off! That could work nicely.

The boy with the mad imagination
Prepare for the ultimate duel!
Learn to use all my triggers and what you can do with them. Visit here.
Find out and download the transform trigger here.
Play some minigames I have created outside AOM including some 3D games here.
posted 31 December 2007 06:12 AM EDT (US)     10 / 35  
Well done! I knew you could do it! .

If having a unit selected is the problem, then maybe this trigger can help:
   <Effect name="UI Unselect Unit">
<Command>for(oP=xsGetContextPlayer();>oP+1){}</Command>
<Command>xsSetContextPlayer(0);kbArmyRemoveUnits(1);</Command>
<Command>uiSelectNumberGroup(1);</Command>
<Command>xsSetContextPlayer(oP);</Command>
</Effect>

It unselects any unit that a player has selected - hope this will fix the bug.
(Btw could you try not to define QV which you are only going to use once? ¬¬'.)
-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.
posted 31 December 2007 06:25 AM EDT (US)     11 / 35  
Can't seem to activate the beginning copy trigger by slapping a quest var check and randomizing a few of 'em.


Think your 'fire random event' effect might work? Too lazy to get back on editor, totally killed my buzz.

[This message has been edited by Xzyiothe (edited 12-31-2007 @ 06:26 AM).]

posted 31 December 2007 08:28 AM EDT (US)     12 / 35  
They are complicated to use unfotunately but there is nothing I can do. I am going to slap in a fire event with the triggers to make the fire eventing easier.

I am also going to try and make a copy to clipboard number version working which will allow you to copy and store multiple land sectors before pasting them all.
It unselects any unit that a player has selected - hope this will fix the bug.
(Btw could you try not to define QV which you are only going to use once? ¬¬'.)
-invent00r
no - if you have units selected already that is fine - it the left click select command that seems to muck it up if you are doing it WHILE the trigger activates.

Soz about the QVS - I will change the name to one people are not going to use.

I have now created a copy and past to clipboard number which allows you to store multiple copies at once. Use it to store multiple copies of terrain before pasting.

I am now going try to create a "quick" copy and paste trigger which will require only ONE trigger! This trigger will need to be on it's own not active but on high priority and looped. You simply fire event it to work. It will loop a couple of times running each process in tern and then disable itself.

EDIT:Shortcut trigger now created. Simply insert ONE trigger with the conditional always. Tick only the loop box and set the priority on highest. Then insert the zquick copy and paste terrain trigger and fill in the fields. Then if you want it to activate simply fire event the trigger!

I have updated all the triggers and I have added the number clipboard pasting. If you want to copy multiple terrains before pasting substitute the number copy and pastes and select the number.

Here are all the updated triggers!
   <Effect name="zCopy Terrain to Clipboard Part 1">
<Param name="warning" dispName="Info" varType="string">Place 2 cinematic blocks at opposite corners of the square of land you want to copy and select them</Param>
<Param name="SrcObject" dispName="Cine Block1" varType="unit">default</Param>
<Param name="SrcObject2" dispName="Cine Block2" varType="unit">default</Param>
<Param name="EventID" dispName="$$22362$$Trigger" varType="event">-1</Param>
<Command>configToggle("cameraMovementLock");</Command>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>modeEnter("pregame");</Command>
<Command>modeEnter("Simulation");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
<Command>editMode("copy");</Command>
<Command>trackInsert();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackAddWaypoint();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trQuestVarSet("zzza",xsVectorGetX(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("zzzb",xsVectorGetY(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("zzzc",xsVectorGetZ(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzza"),trQuestVarGet("zzzb"),trQuestVarGet("zzzc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>uiTerrainSelection(0);</Command>
<Command>trQuestVarSet("zzzaa",xsVectorGetX(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trQuestVarSet("zzzbb",xsVectorGetY(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trQuestVarSet("zzzcc",xsVectorGetZ(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzzaa"),trQuestVarGet("zzzbb"),trQuestVarGet("zzzcc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>trEventFire(%EventID%);</Command>
</Effect>

<Effect name="zCopy Terrain to Clipboard Part 2">
<Param name="warning" dispName="Info" varType="string">Insert version 1 (Other one) then FIRE EVENT part 2 to make it work!</Param>
<Param name="EventID" dispName="$$22362$$Trigger" varType="event">-1</Param>
<Command>uiTerrainSelection(1);</Command>
<Command>uiCopyToClipboard();</Command>
<Command>editMode("none");</Command>
<Command>subModeLeave("Simulation", "Editor");</Command>
<Command>trackPlay(1,-1);</Command>
<Command>configToggle("cameraMovementLock");</Command>
<Command>trEventFire(%EventID%);</Command>
</Effect>

<Effect name="zPaste Terrain from Clipboard Part 1">
<Param name="warning" dispName="Info" varType="string">Place 2 cinematic blocks at opposite corners of the square of land you want to copy and select them</Param>
<Param name="SrcObject" dispName="Cine Block1" varType="unit">default</Param>
<Param name="SrcObject2" dispName="Cine Block2" varType="unit">default</Param>
<Param name="v" dispName="Paste rotation" varType="stringid">0</Param>
<Param name="EventID" dispName="$$22362$$Trigger" varType="event">-1</Param>
<Command>configToggle("cameraMovementLock");</Command>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>modeEnter("pregame");</Command>
<Command>modeEnter("Simulation");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
<Command>editMode("TerrainPaste");</Command>
<Command>trackInsert();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackAddWaypoint();</Command>
<Command>trackEditWaypoint();</Command>
<Command>uiChangeBrushType("Rectangular");</Command>
<Command>uiSetClipboardRotation(%v%);</Command>
<Command>trQuestVarSet("zzza",xsVectorGetX(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("zzzb",xsVectorGetY(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("zzzc",xsVectorGetZ(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzza"),trQuestVarGet("zzzb"),trQuestVarGet("zzzc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>uiTerrainSelection(0);</Command>
<Command>trQuestVarSet("zzzaa",xsVectorGetX(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trQuestVarSet("zzzbb",xsVectorGetY(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trQuestVarSet("zzzcc",xsVectorGetZ(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzzaa"),trQuestVarGet("zzzbb"),trQuestVarGet("zzzcc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>trEventFire(%EventID%);</Command>
</Effect>

<Effect name="zPaste Terrain from Clipboard Part 2">
<Param name="warning" dispName="Info" varType="string">Paste area needs to be same size as one you copied. Fire event part 2 after part 1.</Param>
<Param name="v1" dispName="Enable Height Paste" varType="Bool">true</Param>
<Param name="v2" dispName="Enable Terrain Paste" varType="Bool">true</Param>
<Param name="EventID" dispName="$$22362$$Trigger" varType="event">-1</Param>
<Command>uiTerrainSelection(1);</Command>
<Command>if(%v1% == false)uiToggleTerrainPasteMode(2);</Command>
<Command>if(%v2% == false)uiToggleTerrainPasteMode(1);</Command>
<Command>uiPasteFromClipboard();</Command>
<Command>if(%v1% == false)uiToggleTerrainPasteMode(2);</Command>
<Command>if(%v2% == false)uiToggleTerrainPasteMode(1);</Command>
<Command>editMode("none");</Command>
<Command>subModeLeave("Simulation", "Editor");</Command>
<Command>trackPlay(1,-1);</Command>
<Command>configToggle("cameraMovementLock");</Command>
<Command>trEventFire(%EventID%);</Command>
</Effect>

<Effect name="zCopy Terrain to Clipboard number Part 2">
<Param name="warning" dispName="Info" varType="string">Insert version 1 (Other one) then FIRE EVENT part 2 to make it work!</Param>
<Param name="EventID" dispName="$$22362$$Trigger" varType="event">-1</Param>
<Param name="number" dispName="Clipboard number" VarType="long">1</Param>
<Command>uiTerrainSelection(1);</Command>
<Command>uiCopyToClipboard();</Command>
<Command>terrainPasteBufferSave("%number%");</Command>
<Command>editMode("none");</Command>
<Command>subModeLeave("Simulation", "Editor");</Command>
<Command>trackPlay(1,-1);</Command>
<Command>configToggle("cameraMovementLock");</Command>
<Command>trEventFire(%EventID%);</Command>
</Effect>

<Effect name="zPaste Terrain from Clipboard number Part 1">
<Param name="warning" dispName="Info" varType="string">Place 2 cinematic blocks at opposite corners of the square of land you want to copy and select them</Param>
<Param name="SrcObject" dispName="Cine Block1" varType="unit">default</Param>
<Param name="SrcObject2" dispName="Cine Block2" varType="unit">default</Param>
<Param name="v" dispName="Paste rotation" varType="stringid">0</Param>
<Param name="EventID" dispName="$$22362$$Trigger" varType="event">-1</Param>
<Param name="number" dispName="Clipboard number" VarType="long">1</Param>
<Command>configToggle("cameraMovementLock");</Command>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>modeEnter("pregame");</Command>
<Command>modeEnter("Simulation");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
<Command>editMode("TerrainPaste");</Command>
<Command>trackInsert();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackAddWaypoint();</Command>
<Command>trackEditWaypoint();</Command>
<Command>uiChangeBrushType("Rectangular");</Command>
<Command>terrainPasteBufferLoad("%number%");</Command>
<Command>uiSetClipboardRotation(%v%);</Command>
<Command>trQuestVarSet("zzza",xsVectorGetX(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("zzzb",xsVectorGetY(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("zzzc",xsVectorGetZ(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzza"),trQuestVarGet("zzzb"),trQuestVarGet("zzzc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>uiTerrainSelection(0);</Command>
<Command>trQuestVarSet("zzzaa",xsVectorGetX(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trQuestVarSet("zzzbb",xsVectorGetY(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trQuestVarSet("zzzcc",xsVectorGetZ(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzzaa"),trQuestVarGet("zzzbb"),trQuestVarGet("zzzcc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>trEventFire(%EventID%);</Command>
</Effect>

<Effect name="zQuick copy and paste terrain">
<Param name="SrcObject" dispName="Copy Block1" varType="unit">default</Param>
<Param name="SrcObject2" dispName="Copy Block2" varType="unit">default</Param>
<Param name="SrcObject3" dispName="Paste Block1" varType="unit">default</Param>
<Param name="SrcObject4" dispName="Paste Block2" varType="unit">default</Param>
<Param name="v" dispName="Paste rotation" varType="stringid">0</Param>
<Param name="v1" dispName="Enable Height Paste" varType="Bool">true</Param>
<Param name="v2" dispName="Enable Terrain Paste" varType="Bool">true</Param>
<Command>trQuestVarSet("zzzz", trQuestVarGet("zzzz") + 1);</Command>
<Command>if(trQuestVarGet("zzzz") == 1){</Command>
<Command>configToggle("cameraMovementLock");</Command>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>modeEnter("pregame");</Command>
<Command>modeEnter("Simulation");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
<Command>editMode("copy");</Command>
<Command>trackInsert();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackAddWaypoint();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trQuestVarSet("zzza",xsVectorGetX(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("zzzb",xsVectorGetY(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("zzzc",xsVectorGetZ(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzza"),trQuestVarGet("zzzb"),trQuestVarGet("zzzc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>uiTerrainSelection(0);</Command>
<Command>trQuestVarSet("zzzaa",xsVectorGetX(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trQuestVarSet("zzzbb",xsVectorGetY(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trQuestVarSet("zzzcc",xsVectorGetZ(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzzaa"),trQuestVarGet("zzzbb"),trQuestVarGet("zzzcc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>}</Command>
<Command>if(trQuestVarGet("zzzz") == 2){</Command>
<Command>uiTerrainSelection(1);</Command>
<Command>uiCopyToClipboard();</Command>
<Command>editMode("none");</Command>
<Command>}</Command>
<Command>if(trQuestVarGet("zzzz") == 3){</Command>
<Command>editMode("TerrainPaste");</Command>
<Command>uiChangeBrushType("Rectangular");</Command>
<Command>uiSetClipboardRotation(%v%);</Command>
<Command>trQuestVarSet("zzzza",xsVectorGetX(kbGetBlockPosition("%SrcObject3%")));</Command>
<Command>trQuestVarSet("zzzzb",xsVectorGetY(kbGetBlockPosition("%SrcObject3%")));</Command>
<Command>trQuestVarSet("zzzzc",xsVectorGetZ(kbGetBlockPosition("%SrcObject3%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzzza"),trQuestVarGet("zzzzb"),trQuestVarGet("zzzzc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>uiTerrainSelection(0);</Command>
<Command>trQuestVarSet("zzzzaa",xsVectorGetX(kbGetBlockPosition("%SrcObject4%")));</Command>
<Command>trQuestVarSet("zzzzbb",xsVectorGetY(kbGetBlockPosition("%SrcObject4%")));</Command>
<Command>trQuestVarSet("zzzzcc",xsVectorGetZ(kbGetBlockPosition("%SrcObject4%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzzzaa"),trQuestVarGet("zzzzbb"),trQuestVarGet("zzzzcc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>}</Command>
<Command>if(trQuestVarGet("zzzz") == 4){</Command>
<Command>uiTerrainSelection(1);</Command>
<Command>if(%v1% == false)uiToggleTerrainPasteMode(2);</Command>
<Command>if(%v2% == false)uiToggleTerrainPasteMode(1);</Command>
<Command>uiPasteFromClipboard();</Command>
<Command>if(%v1% == false)uiToggleTerrainPasteMode(2);</Command>
<Command>if(%v2% == false)uiToggleTerrainPasteMode(1);</Command>
<Command>editMode("none");</Command>
<Command>subModeLeave("Simulation", "Editor");</Command>
<Command>trackPlay(1,-1);</Command>
<Command>configToggle("cameraMovementLock");</Command>
<Command>xsDisableSelf();</Command>
<Command>}</Command>
</Effect>

The boy with the mad imagination
Prepare for the ultimate duel!
Learn to use all my triggers and what you can do with them. Visit here.
Find out and download the transform trigger here.
Play some minigames I have created outside AOM including some 3D games here.

[This message has been edited by nottud (edited 12-31-2007 @ 09:18 AM).]

posted 31 December 2007 10:04 AM EDT (US)     13 / 35  
Imagine the possibilities. It could be an RPG. You have to get up a cliff. You need to get a magic spell off an old man. He gives it to you and the cliff turns into grass!
One BIG problem I have recenty found but could be fixed:

If you hold down the left mouse button the whole thing fails to copy which I suspect is something to do with copying units! This is a really annoying bug and I am desperate to find a fix - if you have any suggestions, please post them here immediately! Current fix which is slightly limitating - run it while in cinematic mode. You have to be in cine mode before you do it or it will not work! (I have tried slipping in a cine toggle into these triggers to do it but it did not work)
Until that's fixed, just do the trigger while a cinematic is on.

MEPH
[Insert amazingly witty signature here.]

Me and Yeebaagooon's scenarios | Download The Corruptor
posted 31 December 2007 10:34 AM EDT (US)     14 / 35  
Hey! I have an idea that might work!
Idea that might work:
map("mouse1down", "world", "");
Unmap the mouse so it no longer can select units! Then, remap it back to the original state after the code has done the messy part.

The mappings has got to be the anwser. (Use whisper before your codes - this page is huge!)
-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.
posted 31 December 2007 11:16 AM EDT (US)     15 / 35  
Wow, huge trigger. Good idea about the mapping though!

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 31 December 2007 11:32 AM EDT (US)     16 / 35  
Yes! It worked! It also works for right click too. Now I can fix all my copy triggers that messed up if you had right click help down and these ones!

How I do it:

map("mouse1down", "copy", "");
map("mouse1up", "copy", "");
map("mouse1up", "TerrainPaste", "");
map("mouse2up", "TerrainPaste", "");

After:

map("mouse1down", "copy", "uiTerrainSelection(0)");
map("mouse1up", "copy", "uiTerrainSelection(1)");
map("mouse1up", "TerrainPaste", "uiPasteFromClipboard");
map("mouse2up", "TerrainPaste", "editMode(\"copy\")");

Thankyou! It solves more than 1 problem of mine.

I will update when I get time (No time right now)

The boy with the mad imagination
Prepare for the ultimate duel!
Learn to use all my triggers and what you can do with them. Visit here.
Find out and download the transform trigger here.
Play some minigames I have created outside AOM including some 3D games here.

[This message has been edited by nottud (edited 12-31-2007 @ 11:44 AM).]

posted 31 December 2007 11:59 AM EDT (US)     17 / 35  
NOTTUD IS A SUPER-GENIOUS.
NOTTUD OWNS MY SOUL.
NOTTUD IS AWESOME.
I WANT NOTTUD'S AUTOGRAPH!



But one quick question... how exactly are we going to use this trigger (I just want some ideas, its so complex that I don't think I can figure out how to use it!!!)

But this is very, very, very nice.

--Any ideas about a smooth elevation trigger? --

-Mator

..........(@_ "Keyboard unnatached, press F10 to continue or F8 to troubleshoot."
._..........)..\__________________________________
(_)@8@8{}<______________Mator______________>
.............)_/ "You are tempting fate."
............(@
(¯`._.[Creator of Miniscule!]._.´¯)

[This message has been edited by MatoR (edited 12-31-2007 @ 11:59 AM).]

posted 31 December 2007 12:04 PM EDT (US)     18 / 35  
I have now updated the triggers.
   <Effect name="zSmoothen area of map">
<Param name="x1" dispName="squares x1" VarType="long">25</Param>
<Param name="z1" dispName="squares z1" VarType="long">25</Param>
<Param name="x2" dispName="squares x2" VarType="long">75</Param>
<Param name="z2" dispName="squares z2" VarType="long">75</Param>
<Param name="amount" dispName="Amount" VarType="long">5</Param>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>trQuestVarSet("zsmooth", 0);</Command>
<Command>while(%amount%>=1*trQuestVarGet("zsmooth")){</Command>
<Command>terrainFilterArea(%x1%,%z1%,%x2%,%z2%);</Command>
<Command>trQuestVarSet("zsmooth", trQuestVarGet("zsmooth") + 1);}</Command>
<Command>subModeLeave("Simulation", "Editor");</Command>
<Command>modeEnter("pregame");</Command>
<Command>modeEnter("Simulation");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
</Effect>
DAM! The trick does not solve the right click problem where the mode jams on. I even tried using the message box trick to turn the mode off but with no sucess. (This has happened with all my copy triggers where if you right click same time it activates it still works but the edit mode jams on unless they press escape)

Still awaiting a solution to that. Thankfully it is minor and it rarely happens to someone and if it does all they have to do is press esc. (Nothing else works thankfully because they are no longer in editor mode)

The boy with the mad imagination
Prepare for the ultimate duel!
Learn to use all my triggers and what you can do with them. Visit here.
Find out and download the transform trigger here.
Play some minigames I have created outside AOM including some 3D games here.

[This message has been edited by nottud (edited 12-31-2007 @ 12:32 PM).]

posted 31 December 2007 12:26 PM EDT (US)     19 / 35  
Smoooth! YAY thats just what I needed for my map! Thnx nottud! (its ok if its going to happen in cinematic mode right? just checking...)
-Mator

..........(@_ "Keyboard unnatached, press F10 to continue or F8 to troubleshoot."
._..........)..\__________________________________
(_)@8@8{}<______________Mator______________>
.............)_/ "You are tempting fate."
............(@
(¯`._.[Creator of Miniscule!]._.´¯)
posted 31 December 2007 02:28 PM EDT (US)     20 / 35  
Awesome, I'll try this out just to make sure it works in vanilla.

If it does, this is exactly what I need for the avalanches I was planning to have in my scenario

posted 31 December 2007 03:09 PM EDT (US)     21 / 35  
It should work in vanilla IF you have enabled quest vars.

The boy with the mad imagination
Prepare for the ultimate duel!
Learn to use all my triggers and what you can do with them. Visit here.
Find out and download the transform trigger here.
Play some minigames I have created outside AOM including some 3D games here.
posted 31 December 2007 10:08 PM EDT (US)     22 / 35  
I don't think I'll use these triggers very much- unless I can randomly fire them without being in cinematic mode o.O


If I use it it'll be for some minor things.

( I had a great minigame lined up )
posted 01 January 2008 05:20 AM EDT (US)     23 / 35  
You can do it while not in cinematic mode now because that bug has been fixed.

The boy with the mad imagination
Prepare for the ultimate duel!
Learn to use all my triggers and what you can do with them. Visit here.
Find out and download the transform trigger here.
Play some minigames I have created outside AOM including some 3D games here.
posted 02 January 2008 04:08 PM EDT (US)     24 / 35  
good news! As you expected, it works for vanilla! (with invent00rs QV triggers, of course)

Well, most of it.

I couldn't get the quick copy/paste terrain trigger to work.

I set it up as you described: Inactive, Loop, High priority.
Condition: Always
Effect: zQuick copy and paste terrain

I use a trigger to fire event it, and it fires, but doesn't stop looping. So its continuously flickering back and forth between editor and game mode and I can't move the camera or do anything.

I tried it not on loop, and didn't do anything. I tried to set it up like a For loop (Quest Var Check: i <=n, effect QV Modify i +1)
to set it to a limited number of loops. But no matter how many I did, the camera would always be stuck once it stopped.
posted 02 January 2008 07:46 PM EDT (US)     25 / 35  
That is odd. Anyway I have done some updates which I have not released it. Anyway the updated version definately works. (Interestingly enough I got your bug a while back but I have managed to fix that.)

This one definately works:
   <Effect name="zQuick copy and paste terrain">
<Param name="SrcObject" dispName="Copy Block1" varType="unit">default</Param>
<Param name="SrcObject2" dispName="Copy Block2" varType="unit">default</Param>
<Param name="SrcObject3" dispName="Paste Block1" varType="unit">default</Param>
<Param name="SrcObject4" dispName="Paste Block2" varType="unit">default</Param>
<Param name="v" dispName="Paste rotation" varType="stringid">0</Param>
<Param name="v1" dispName="Enable Height Paste" varType="Bool">true</Param>
<Param name="v2" dispName="Enable Terrain Paste" varType="Bool">true</Param>
<Command>trQuestVarSet("zzzz", trQuestVarGet("zzzz") + 1);</Command>
<Command>if(trQuestVarGet("zzzz") == 1){</Command>
<Command>map("mouse1down", "copy", "");</Command>
<Command>map("mouse1up", "copy", "");</Command>
<Command>map("mouse1up", "TerrainPaste", "");</Command>
<Command>map("mouse2up", "TerrainPaste", "");</Command>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>configToggle("cameraMovementLock");</Command>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>modeEnter("pregame");</Command>
<Command>modeEnter("Simulation");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
<Command>editMode("copy");</Command>
<Command>trackInsert();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackAddWaypoint();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trQuestVarSet("zzza",xsVectorGetX(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("zzzb",xsVectorGetY(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trQuestVarSet("zzzc",xsVectorGetZ(kbGetBlockPosition("%SrcObject%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzza"),trQuestVarGet("zzzb"),trQuestVarGet("zzzc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>uiTerrainSelection(0);</Command>
<Command>trQuestVarSet("zzzaa",xsVectorGetX(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trQuestVarSet("zzzbb",xsVectorGetY(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trQuestVarSet("zzzcc",xsVectorGetZ(kbGetBlockPosition("%SrcObject2%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzzaa"),trQuestVarGet("zzzbb"),trQuestVarGet("zzzcc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>trackInsert();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackAddWaypoint();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackPlay(10000,-1);</Command>
<Command>}</Command>
<Command>if(trQuestVarGet("zzzz") == 2){</Command>
<Command>uiTerrainSelection(1);</Command>
<Command>uiCopyToClipboard();</Command>
<Command>editMode("none");</Command>
<Command>trackRemove();</Command>
<Command>}</Command>
<Command>if(trQuestVarGet("zzzz") == 3){</Command>
<Command>editMode("TerrainPaste");</Command>
<Command>uiChangeBrushType("Rectangular");</Command>
<Command>uiSetClipboardRotation(%v%);</Command>
<Command>trQuestVarSet("zzzza",xsVectorGetX(kbGetBlockPosition("%SrcObject3%")));</Command>
<Command>trQuestVarSet("zzzzb",xsVectorGetY(kbGetBlockPosition("%SrcObject3%")));</Command>
<Command>trQuestVarSet("zzzzc",xsVectorGetZ(kbGetBlockPosition("%SrcObject3%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzzza"),trQuestVarGet("zzzzb"),trQuestVarGet("zzzzc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>uiTerrainSelection(0);</Command>
<Command>trQuestVarSet("zzzzaa",xsVectorGetX(kbGetBlockPosition("%SrcObject4%")));</Command>
<Command>trQuestVarSet("zzzzbb",xsVectorGetY(kbGetBlockPosition("%SrcObject4%")));</Command>
<Command>trQuestVarSet("zzzzcc",xsVectorGetZ(kbGetBlockPosition("%SrcObject4%")));</Command>
<Command>trCameraCut(xsVectorSet(trQuestVarGet("zzzzaa"),trQuestVarGet("zzzzbb"),trQuestVarGet("zzzzcc")), vector(0.0,-1.0,0.0), vector(0.7,-0.0,0.7), vector(0.7,0.0,-0.7));</Command>
<Command>trackInsert();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackAddWaypoint();</Command>
<Command>trackEditWaypoint();</Command>
<Command>trackPlay(10000,-1);</Command>
<Command>}</Command>
<Command>if(trQuestVarGet("zzzz") == 4){</Command>
<Command>uiTerrainSelection(1);</Command>
<Command>if(%v1% == false)uiToggleTerrainPasteMode(2);</Command>
<Command>if(%v2% == false)uiToggleTerrainPasteMode(1);</Command>
<Command>uiPasteFromClipboard();</Command>
<Command>if(%v1% == false)uiToggleTerrainPasteMode(2);</Command>
<Command>if(%v2% == false)uiToggleTerrainPasteMode(1);</Command>
<Command>editMode("none");</Command>
<Command>subModeLeave("Simulation", "Editor");</Command>
<Command>trackRemove();</Command>
<Command>trackPlay(1,-1);</Command>
<Command>configToggle("cameraMovementLock");</Command>
<Command>xsDisableSelf();</Command>
<Command>map("mouse1down", "copy", "uiTerrainSelection(0)");</Command>
<Command>map("mouse1up", "copy", "uiTerrainSelection(1)");</Command>
<Command>map("mouse1up", "TerrainPaste", "uiPasteFromClipboard");</Command>
<Command>map("mouse2up", "TerrainPaste", "editMode(\"copy\")");</Command>
<Command>}</Command>
</Effect>

The boy with the mad imagination
Prepare for the ultimate duel!
Learn to use all my triggers and what you can do with them. Visit here.
Find out and download the transform trigger here.
Play some minigames I have created outside AOM including some 3D games here.
« Previous Page  1 2  Next Page »
Age of Mythology Heaven » Forums » Scenario Design » YES! Copy terrain from ANYWHERE and paste it ANYWHERE trigger breakthrough!
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Mythology Heaven | HeavenGames