Adding Xp as an Event
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Adding Xp as an Event
i have a problem with one of the scenarios i am making. i want to make it so that every time you get in combat or kill someone, you get double experience. i also want you to get xp when something else happens. is there a way to give a unit xp during an eveny, such as:
[effect]
experience=+8
[/effect]
specifying what unit recieves the xp and how much is recieved. is there any way to do this?
[effect]
experience=+8
[/effect]
specifying what unit recieves the xp and how much is recieved. is there any way to do this?
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
Greetings. I hope I am not resurrecting a thread whereas the same topic has been discussed elsewhere (the searches I made all led here).
I was interested in the experience issue, for I think one character might gain experience not only during fights, but also when performing some other "task", such as finding secret passage, finding treasures, disarming traps, etc.
I have written the following macro to add experience to a character at a given location (to associate it to a "moveto" event) :
It works fine, but now I'm facing a trap in the experience adding stuff : this code does not trigger the advancement condition.
I've explored a few pists to perform this operation "manually", without success so far. I may have missed something, but is it possible to retrieve the experience attribute from a <unit>.cfg file ? Or to trigger the advancement in a cleaner way ?
Thank you in advance for any contribution.
I was interested in the experience issue, for I think one character might gain experience not only during fights, but also when performing some other "task", such as finding secret passage, finding treasures, disarming traps, etc.
I have written the following macro to add experience to a character at a given location (to associate it to a "moveto" event) :
Code: Select all
#define ADD_XP X Y AMOUNT
[store_unit]
[filter]
x={X}
y={Y}
[/filter]
variable="stored_unit"
[/store_unit]
[set_variable]
name=stored_unit.experience
add={AMOUNT}
[/set_variable]
[unstore_unit]
variable="stored_unit"
[/unstore_unit]
#enddef
I've explored a few pists to perform this operation "manually", without success so far. I may have missed something, but is it possible to retrieve the experience attribute from a <unit>.cfg file ? Or to trigger the advancement in a cleaner way ?
Thank you in advance for any contribution.