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

Scenario Design
Moderated by Yeebaagooon, TAG

Hop to:    
Welcome! You are not logged in. Please Login or Register.14 replies
Age of Mythology Heaven » Forums » Scenario Design » Need some help with QV please
Bottom
Topic Subject:Need some help with QV please
Someone_9999
Inactive
posted 01 September 2018 12:13 PM EDT (US)         
_

[This message has been edited by Someone_9999 (edited 04-01-2019 @ 04:32 PM).]

AuthorReplies:
Izalith
Mortal
(id: Lilitu)
posted 01 September 2018 01:03 PM EDT (US)     1 / 14       
QV Echo shows the value of variables, but that's for debugging mostly.

What you'd want would be to use a send chat. Dunno if u know about strings, but send chat something like this should give you your desired result:

{PlayerName(1)} has "+ 1*trQuestVarGet("P1Kills") +" kills.


The questVarGet gives you the value of the QV named P1Kills. The 1* is required to make it an integer instead of float, so it says e.g. 342 kills instead of 342.0000000000000 kills.

The " and + help you to escape the string, add the number to it, and then get back to the string. String syntax is like "asdf" + "xyz" + "fdsa" will be displayed as asdfxyzfdsa.

Azarath Metrion Zinthos

Steam: Order of Azarath
Twitch: twitch.tv/orderofazarath
Discord: Azarath @ https://discord.gg/3ENKJeb

[This message has been edited by Izalith (edited 09-01-2018 @ 01:05 PM).]

Someone_9999
Inactive
posted 01 September 2018 02:19 PM EDT (US)     2 / 14       
_

[This message has been edited by Someone_9999 (edited 04-01-2019 @ 04:32 PM).]

Izalith
Mortal
(id: Lilitu)
posted 01 September 2018 02:23 PM EDT (US)     3 / 14       
If the QVars are named accordingly, yeah. I don't think players can use this in the chat in game, but triggers with Send Chat & your Fake counter should work.

Azarath Metrion Zinthos

Steam: Order of Azarath
Twitch: twitch.tv/orderofazarath
Discord: Azarath @ https://discord.gg/3ENKJeb
nottud
Mortal
posted 01 September 2018 03:47 PM EDT (US)     4 / 14       
The main thing to note about QVs is thinnk of them as boxes which you provide a name that you sstore a number in which you can retrieve for later or comapare, etc. Also when doing the 1* thing surround it with ( and ) otherwise the game can get confused with the concatenation + operator.
Someone_9999
Inactive
posted 01 September 2018 04:28 PM EDT (US)     5 / 14       
_

[This message has been edited by Someone_9999 (edited 04-01-2019 @ 04:32 PM).]

nottud
Mortal
posted 02 September 2018 10:27 AM EDT (US)     6 / 14       
Other general ways I have used are: using a resource count, using a unit name change, using a culture name change or doing the chat thing as suggested (Though I don't clear the history).
Izalith
Mortal
(id: Lilitu)
posted 02 September 2018 12:23 PM EDT (US)     7 / 14       
I'd also advise against clearing the chat history, because it makes chatting difficult. Like someone said something and it gets cleared immediately so no one can finish reading it or it goes unnoticed.

The only other things u can use in chat I can think of would be:
- Underline <u>just like html</u>
- Color <color=1.0,1.0,1.0> RGB with 0 to 1.0, but there is also some other older syntax for the same effect. </color>
- Icons <icon=20(icons\special n fenris wolf icon 64)>, find all usable icon names with preview by downloading the converted folder here: https://meta-plays.com/index.php?/files/file/12-all-aom-icons-images-textures-and-more/&game=5

But you also need to try and not exceed the text limit for the send chat. You don't need to end the color tag, since a new chat line will not be colored with it, so that's a way to save some characters.

Also if you send chat from player 0, it gets automatically some yellow color which is quite cool.

Azarath Metrion Zinthos

Steam: Order of Azarath
Twitch: twitch.tv/orderofazarath
Discord: Azarath @ https://discord.gg/3ENKJeb
Zenophobia
Irrational Fear
posted 03 September 2018 03:52 AM EDT (US)     8 / 14       
Nickonhawk's Bad Contract scenario utilizes counters to display multiple lines at once on the right side of the screen. Check it out and see for yourself.

Keep in mind this will probably cause more lag in multiplayer, though, as it requires a continuously looping trigger.

[This message has been edited by Zenophobia (edited 02-29-2094 @ 10:60 AM).]
nottud
Mortal
posted 03 September 2018 07:24 AM EDT (US)     9 / 14       
Another trick could be to put all the counters into one and use a line break to separate them vertically?
Zenophobia
Irrational Fear
posted 03 September 2018 12:22 PM EDT (US)     10 / 14       
Wow, I never even knew there were line breaks in AoM. Depending on the length of the string, you would need multiple lines of xs user code to get the counter to display though, if what nottud says is true.

[This message has been edited by Zenophobia (edited 02-29-2094 @ 10:60 AM).]
scragins
Heretic of December
posted 04 September 2018 06:21 AM EDT (US)     11 / 14       
In the extended edition I thought they added a way to set the score to a given value. I assume this could then be set to a QV. This would require the extended edition and O have never tried it myself.
nottud
Mortal
posted 04 September 2018 07:36 AM EDT (US)     12 / 14       
I never could get the score thing to consistently work - seems to change around on its own and ignore sets to it so I don't use it - shame as a few maps I could benefit from it. Maybe will have to try again sometime.
Someone_9999
Inactive
posted 05 September 2018 04:21 AM EDT (US)     13 / 14       
_

[This message has been edited by Someone_9999 (edited 04-01-2019 @ 04:32 PM).]

nottud
Mortal
posted 05 September 2018 02:01 PM EDT (US)     14 / 14       
Yea I admit that I cannot get the new line stuff to work in a trigger. I tried the chat new line trick and the game recognised a new line but it did a trigger lock as it literally cause the code on the generated file to break up into multiple lines which the game considers invalid. I wondered if I could store as a String variable and then append but I would have the same problems.
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Mythology Heaven | HeavenGames