|
Thread: Need help with simple ERM | |
|
cutee_honee
Tavern Dweller
|
posted April 22, 2008 04:21 AM |
|
|
Need help with simple ERM
Hello!
I have made a WOG map recently and managed to do everything without using any ERM. So far, so good. But now I'm in dire need of a simple function.
I tried. I went to the WOG site, read the help, even tried a bit of the examples... ugh! Made my head hurt! So many errors and complexity. All I want to do is this :
I want to teleport AI heroes from one place to another at a given time. Like, on day 52, Alamar the big meanie is magically teleported from his castle to your territory, ready to spread his bad manners. Can somebody just give me the line of code for this? I know I sound stupid, but I literally tried for 2 hours to figure this out, and I hope that maybe someone here knows how to do this.
Thanks in advance!
____________
|
|
sagamosa
Hired Hero
|
posted April 22, 2008 09:59 AM |
|
Edited by sagamosa at 10:00, 22 Apr 2008.
|
try this
ZVSE
!#TM60:S1/999/1/255; set-up timer 60 to trigger every day for all factions
!?TM60; check every day
!!VRy-1:Sc; check current day
!!FU&y-1<>52:E; continue only when day =52
!!HE88:'Px/y/z; teleport Alamar to x/y/z map coordinates [must be set by you]
____________
Sagamosa
[url=http://www.wog.euweb.cz]Advanced Levels[/url]
|
|
hippocamus
Hired Hero
|
posted April 22, 2008 11:59 AM |
|
|
Variable "c" initialized only if wogification turned on!
If interestingly you, can bring a script over for Wog 3.58 for getting and setting of day without the use of variable of ‘c’. Instruction of UN:C is used.
|
|
cutee_honee
Tavern Dweller
|
posted April 25, 2008 06:34 PM |
|
|
Thanks so much Sagamosa for your quick reply!
I tried it, and it works! It's a miracle. You have no idea how long I wasted time on this small problem! Now I'm wondering, how would you go about doing the same thing for multiple heroes at different days? Like, Alamar on day 52, Orion on day 76, etc... would you know how?
|
|
Arkas
Tavern Dweller
|
posted April 27, 2008 04:45 AM |
|
|
Quote:
ZVSE
!#TM60:S1/999/1/255; set-up timer 60 to trigger every day for all factions
!?TM60; check every day
!!VRy-1:Sc; check current day
!!FU&y-1<>52:E; continue only when day =52
!!HE88:'Px/y/z; teleport Alamar to x/y/z map coordinates [must be set by you]
The script is commented. If you want to have it do the same thing for multiple heroes, just copy paste the script and change the relevant parts.
Instead of:
!!FU&y-1<>52:E; continue only when day =52
It would be:
!!FU&y-1<>76:E; continue only when day =76
And then change the hero number:
!!HE88:'Px/y/z; teleport Alamar to x/y/z map coordinates [must be set by you]
88 = Alamar, these numbers are in the ERM help appendix.
____________
|
|
|