Hi there. I've already got an answer for this problem in this forums but I cant find it anymore, so another go:
In a modified Army Deploy-Trigger I want to ask if a players QVAR for a Spawn-Location is e.g. 1, 2 or 3 and deploy the army at the correct preset location.
Helpful stuff:
https://mythicfreak.github.io/aomcodereference/
Presetting a Location
I believe I was told to use 3 QVARS per location for X, Y and Z values. The usual way to set a location is:
Thus I tried to combine it with QVAR, which looks like this but fails:
(I'm probably not allowed to use xsTriggers there, ... well)
(Also: Why do I need to end the code bracket to break lines in this forum now??)
Spawn Army at preset Location 1, 2 or 3
Juding by the CodeRef I'm allowed to put the variables for X, Y and Z seperately instead of as a vector.
trArmyDispatch(~~~~, Location, ~~~~)
would take in
trArmyDispatch(~~~~, x, y, z, ~~~~) if thats true. As Floats aswell, thus no need for casting.
The rest would be done with IF-stuff. If Player1SpawnLocation==1, spawn there, if ==2, spawn there and so on. Thats the easy part.
Well, thx for any help I'll get here :/
Azarath Metrion Zinthos
Steam: Order of Azarath
Twitch: twitch.tv/orderofazarath
Discord: Azarath @ https://discord.gg/3ENKJeb
In a modified Army Deploy-Trigger I want to ask if a players QVAR for a Spawn-Location is e.g. 1, 2 or 3 and deploy the army at the correct preset location.
Helpful stuff:
trArmyDispatch(string SrcArmy, string ProtoName, int Count, float x, float y, float z, int Heading, bool Clear)
I believe I was told to use 3 QVARS per location for X, Y and Z values. The usual way to set a location is:
<Param name="Location" dispName="" varType="area"> 0,0,0< /Param>
Thus I tried to combine it with QVAR, which looks like this but fails:
<Effect name="Arc Azar SaveLocation">
<Param name="Location" dispName="" varType="area">0,0,0</Param>
<Param name="QVName" dispName="$$23952$$Var Name" VarType="string">SpawnLoc</Param>
<Command>trQuestVarSet("%QVName%X", xsVectorGetX(%Location%));</Command>
<Command>trQuestVarSet("%QVName%Y", xsVectorGetY(%Location%));</Command>
<Command>trQuestVarSet("%QVName%Z", xsVectorGetZ(%Location%));</Command>
</Effect>
(I'm probably not allowed to use xsTriggers there, ... well)
(Also: Why do I need to end the code bracket to break lines in this forum now??)
Juding by the CodeRef I'm allowed to put the variables for X, Y and Z seperately instead of as a vector.
trArmyDispatch(~~~~, Location, ~~~~)
would take in
trArmyDispatch(~~~~, x, y, z, ~~~~) if thats true. As Floats aswell, thus no need for casting.
The rest would be done with IF-stuff. If Player1SpawnLocation==1, spawn there, if ==2, spawn there and so on. Thats the easy part.
Well, thx for any help I'll get here :/
Steam: Order of Azarath
Twitch: twitch.tv/orderofazarath
Discord: Azarath @ https://discord.gg/3ENKJeb
[This message has been edited by Izalith (edited 09-09-2017 @ 12:34 PM).]