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

Scenario Design
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: So close yet so far - Acomplished!
posted 09 November 2007 12:56 PM EDT (US)   
Copy and paste terrain ingame!



Map before copying and pasting



Map after copying the bottom half, flattening and painting map with snow and being pasted again with terrain heights and textures at a rotation of 0.
  <Effect name="zCopy Terrain to Clipboard">
<Param name="warning" dispName="Info" varType="string">LAGS ON COPYING LARGE AREAS! Put in copy distance from map bottom</Param>
<Param name="v1" dispName="Copy squares distance X" varType="stringid">0</Param>
<Param name="v2" dispName="Copy squares distance Z" varType="stringid">0</Param>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>editMode("copy");</Command>
<Command>uiChangeBrushSize(%v1%*2,%v2%*2,%v1%*2,%v2%*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>
</Effect>

<Effect name="zPaste Terrain from Clipboard">
<Param name="warning" dispName="Info" varType="string">Paste last terrain copied</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="v3" dispName="Paste rotation" varType="stringid">0</Param>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>editMode("TerrainPaste");</Command>
<Command>uiChangeBrushType("Rectangular");</Command>
<Command>uiSetClipboardRotation(%v3%);</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>modeEnter("pregame");</Command>
<Command>modeEnter("Simulation");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
</Effect>

<Effect name="zUndo Paste">
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>undo();</Command>
<Command>subModeLeave("Simulation", "Editor");</Command>
<Command>modeEnter("pregame");</Command>
<Command>modeEnter("Simulation");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
</Effect>

<Effect name="zRedo Paste">
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>redo();</Command>
<Command>subModeLeave("Simulation", "Editor");</Command>
<Command>modeEnter("pregame");</Command>
<Command>modeEnter("Simulation");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
</Effect>
(CLICK THE EDIT THIS POST BEFORE COPYING THE TRIGGER OR IT MAY NOT PASTE FORMATTED PROPERLY)

Here you go - not perfect but good enough! The limiting factors are that it lags more than it would if my old way worked but on small maps it rocks. Also you cannot choose where you paste appart from the fact that it copies from the bottom of the map and pastes at the bottom of the map. However you can set the distance to copy from the bottom of the map or of course select the entire map. Distance is measured in squares. (2 metres per square)

For pasting, you can select how you want it pasting. You can select if you want to paste with terrain heights, paste the textures and the rotation of the clipboard to paste. Note that wierd things happen when you rotate but the best thing to do is experiment.

This should work perfectly on multiplayer and I have tested on LAN with no problems.

This has been 2 very tricky triggers to make and I hope you appreciate the work that has gone into these. Have fun!


P.S. On maps when copying and heights and you want the full map, put 1 square more than the number of squares in each direction on the map otherwise the hills will not place properly on the edges of the map!

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 11-09-2007 @ 01:38 PM).]

Replies:
posted 09 November 2007 12:58 PM EDT (US)     1 / 7  
Wow man, nice work. This would be awesome for one of those ingame eye candy scenarios.
posted 09 November 2007 01:18 PM EDT (US)     2 / 7  
Strangely enough it seems to be the only editor fuction that can be undone and redone with the undo and redo tools that works online! SO I am going to make triggers for that.

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 09 November 2007 01:19 PM EDT (US)     3 / 7  
Nicely done!

-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 09 November 2007 01:26 PM EDT (US)     4 / 7  
Good - I hope you enjoy them!

I have now included the redo and undo functions.

Undo is useful for undoing the last paste done without having to rerender the stae of the old map.

Redo is useful for repasting terrain that has been undone and you want to repaste it even though though some new terrain has been copied. It also makes repasting easier because you don't have to remember the parameters of the old pasting.

I will update my editor superpack.

Get it with the superpack here!:

http://aom.heavengames.com/downloads/showfile.php?fileid=6729

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 11-09-2007 @ 01:33 PM).]

posted 09 November 2007 01:53 PM EDT (US)     5 / 7  
WOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO, this proves that anything is possible! Good job nottud!
posted 09 November 2007 02:35 PM EDT (US)     6 / 7  
The ultimate use for this would be a 100x100 RPG, where the objects and terrain contantly change to meet the required scene, Ill get right on it! Amazing job!!!

______________________________________ 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 09 November 2007 04:49 PM EDT (US)     7 / 7  
Good luck - with a combination of terrain change and stuff you could get some pretty interesting results.

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.
Age of Mythology Heaven » Forums » Scenario Design » So close yet so far - Acomplished!
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Mythology Heaven | HeavenGames