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

Scenario Design
Moderated by MosheLevi, Mister SCP

Hop to:    
Welcome! You are not logged in. Please Login or Register.10 replies
Age of Empires III Heaven » Forums » Scenario Design » spawn units onto anther unit??
Bottom
Topic Subject:spawn units onto anther unit??
ksea
Skirmisher
posted 03-09-18 03:18 AM EDT (US)         
Hi so example gametype wolo you move unit next to anther and spawn them in a specific area, is it possible to spawn them on a specific unit example explorer?? thanks
AuthorReplies:
murdilator
Skirmisher
posted 03-19-18 10:44 AM EDT (US)     1 / 10       
Unit create multi.
ksea
Skirmisher
posted 03-19-18 10:54 PM EDT (US)     2 / 10       
what you mean by this? please expand, will help me out big time
onfiregun17
Skirmisher
posted 03-21-18 03:15 PM EDT (US)     3 / 10       
Unit Create at Unit is probably what you're looking for

<Effect name="Unit Create At Unit">
<Param name="PlayerID" dispName="Player" varType="string">0</Param>
<Param name="ProtoName" dispName="ProtoName" varType="protounit">Villager</Param>
<Param name="ScenName" dispName="Name" varType="string">Default</Param>
<Param name="Object" dispName="Target Unit" varType="unit">default</Param>
<Param name="Heading" dispName="Heading" varType="string">0</Param>
<Command>trQuestVarSet("fhweaohpgpagowhwa", xsGetContextPlayer());</Command>
<Command>xsSetContextPlayer(0);</Command>
<Command>kbLookAtAllUnitsOnMap();</Command>
<Command>trUnitCreate("%ProtoName%", "%ScenName%", xsVectorGetX(kbGetBlockPosition(""+1*%Object%)),xsVectorGetY(kbGetBlockPosition(""+1*%Object%)),xsVectorGetZ(kbGetBlockPosition(""+1*%Object%)), %Heading%, %PlayerID%);</Command>
<Command>xsSetContextPlayer(trQuestVarGet("fhweaohpgpagowhwa"));</Command>
</Effect>

You may also be interested in Unit Create at ProtoUnit

<Effect name="Unit Create At Protounit"> 
<Param name="PlayerID" dispName="Object Player" varType="string">0</Param>
<Param name="Object" dispName="Object Protounit" varType="protounit">Villager</Param>
<Param name="Heading" dispName="Object Heading" varType="string">0</Param>
<Param name="Target" dispName="Target Protounit" varType="protounit">Villager</Param>
<Param name="PlayerID2" dispName="Target Player" varType="string">0</Param>
<Param name="Condition" dispName="Target Alive/Dead" varType="bool">true</Param>
<Command>for(Qid=1;>0) {}</Command>
<Command>xsSetContextPlayer(%PlayerID2%);</Command>
<Command>kbLookAtAllUnitsOnMap();</Command>
<Command>Qid=kbUnitQueryCreate("QueryProtounit");</Command>
<Command>kbUnitQuerySetPlayerID(Qid, %PlayerID2%, true);</Command>
<Command>kbUnitQuerySetUnitType(Qid, kbGetProtoUnitID("%Target%"));</Command>
<Command>if(%Condition%==true)kbUnitQuerySetState(Qid, 2);</Command>
<Command>else kbUnitQuerySetState(Qid, 4);</Command>
<Command>for(i=kbUnitQueryExecute(Qid)-1;>-1)</Command>
<Command>trUnitCreate("%Object%", "default", xsVectorGetX(kbUnitGetPosition(kbUnitQueryGetResult(Qid, i))),xsVectorGetY(kbUnitGetPosition(kbUnitQueryGetResult(Qid, i))),xsVectorGetZ(kbUnitGetPosition(kbUnitQueryGetResult(Qid, i))), %Heading%, %PlayerID%);</Command>
</Effect>
ksea
Skirmisher
posted 03-23-18 05:01 AM EDT (US)     4 / 10       
Hey so spawn unit at prounit would work but for some reason i dont have the option to use that triggr? like its not in the list of them even though i know it exists, is there a way to move that specific trigger file into my maps files for use or something or is there another way
onfiregun17
Skirmisher
posted 03-23-18 04:02 PM EDT (US)     5 / 10       
It looks like you haven't downloaded any trigger packs then. At the very least you'll need Mister SCP's as it contains the trigger you need. His can be found here. To install, navigate to your AOE3 installation, and then folder "Trigger 3". It will be something like "C:\Program Files (x86)\Age of Empires III - Complete Collection\trigger3".

I'd also recommend Musketeer925's, gunner1's, and then a shameless plug for my own (which I actually just updated yesterday). There are many more you can download but these should be enough to get you started.
ksea
Skirmisher
posted 03-23-18 07:56 PM EDT (US)     6 / 10       
Mate!! thanks so much haha dont understand how long iv been trying to work this out for. I have just tried to download them and followed the instructions but had no luck getting them into the game. I think partly because im stupid but i download the trigger pack then extract S.C-P 6.0.xml into the games trigger 3 folder then is that all?

[This message has been edited by ksea (edited 03-23-2018 @ 09:02 PM).]

onfiregun17
Skirmisher
posted 03-24-18 01:00 AM EDT (US)     7 / 10       
Yep that's it, just drag and drop the xml files into the trigger3 folder. And trigger3 is for TAD, trigger2 is for TWC, and trigger is for vanilla . And while you're at it you might want Reyk's editor if you don't already. It adds a bunch of (in my opinion essential) tools to the editor. And with that Mister SCP's Editor Tools are also nice as they fix a few bugs in Reyk's editor.
ksea
Skirmisher
posted 03-24-18 01:55 AM EDT (US)     8 / 10       
Its not working for some reason still, there all in the trigger 3 folder but i cannot select them in the list of triggers in scenario editor, do you have to load or update your game or are they not in the normal menu of triggers if not where do i find them
onfiregun17
Skirmisher
posted 03-25-18 02:13 PM EDT (US)     9 / 10       
You're probably putting them in the wrong spot. You might accidentally be putting them in \Documents\My Games\Age of Empires 3\Trigger3, which is for something else entirely.
ksea
Skirmisher
posted 03-26-18 07:29 AM EDT (US)     10 / 10       
yep thats what i was doing, sorta. Finally got it working, it was hidden away amognst my steam folder in some random doucment. All sorted thanks again legend
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Empires III Heaven | HeavenGames