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

Scenario Design
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: A guide to triggers that set an exact value of stat ingame
posted 29 July 2005 02:06 PM EDT (US)   
Using the modify protounit effect, one can add to or subtract from the value of a unit's stat ingame. However, this effect on its own does not allow an exact value of stat to be set ingame.

With just a few triggers though, one can easily set the value of a stat to whatever value anytime and any amount of times one wants during a scenario. One can still add or subtract to the value of the stat.

For example, in a scenario the LOS of the character could vary depending on the place he is in. I've found that this system of triggers makes it easy for me to do this. For example, in a cave the LOS would be 10, but in a field it would be 45. A spell may be cast upon the character that takes his LOS down to 1, but will wear off after time until full LOS is restored. Or, a spell that reduces the characters strength by one every few seconds until the baddie is killed; then the strength is restored to its original value.
As the character gets old the effect 'modify protounit' may be used to lessen his LOS.

The triggers:

Trigger 1: 'stat_change_begin', Active, Looped
Conditions:
QV check, 'stat_new' greater than 0
Effects:
QV modify 2, 'stat_new' - 'stat_current'
QV modify 2, 'stat_change' + 'stat_new'
Qv set, 'stat_new' = 0
Fire event, 'stat_change_up'
Fire event, 'stat_change_down'

Trigger 2: 'stat_change_up', Active, Looped
Conditions:
QV check, 'stat_change' greater than 0
Effects:
QV modify, 'stat_change' - 1
QV modify, 'stat_current' + 1
Modify protounit, (the stat in question) + 1

Trigger 3: 'stat_change_down', Active, Looped
Conditions:
QV check, 'stat_change' less than 0
Effects:
QV modify, 'stat_change' + 1
QV modify, 'stat_current' - 1
Modify protounit, (the stat in question) - 1

Trigger 4: stat_begin
Conditions:
Always
Effects:
QV set, 'stat_current' (the value is the value of the stat at the start of the game)

To set the stat ingame, set the QV 'stat_new' to the value of the stat.

To add or subtract from the stat ingame, set the QV 'stat_change' to the value you want to add to the stat. However, this change will be overwritten if you set the stat after.

For a permanant addition or subtraction, one that is independant of the stat setting system, use the effect 'modify protounit' ingame.

[This message has been edited by greyshark (edited 07-29-2005 @ 03:12 PM).]

Replies:
posted 29 July 2005 02:10 PM EDT (US)     1 / 3  
That is kind of a pain though... but could be useful.
posted 29 July 2005 02:23 PM EDT (US)     2 / 3  
I suppose it may be a pain to set the triggers up, but surely it would only take 10 minutes? Also, look how easy it is to set the value of the stat once the triggers have been setup. All you have to do is set the value of one QV.
posted 29 July 2005 03:03 PM EDT (US)     3 / 3  
I guess it would be cool, there is a cave in my scenario. Maybe I'll use it, but then again I've had a lazy streak...

-=*Put this in your sig if you or a friend has survived or was killed in a Pokemon battle.*=-
-=Eyecandy & Screenies=-
-=Join the Effort! Community Campaign!=-
-=Email me at: att.151(at)gmail(dot)com=-
-=My AoM:TT Tag=-
Age of Mythology Heaven » Forums » Scenario Design » A guide to triggers that set an exact value of stat ingame
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Mythology Heaven | HeavenGames