Ole Greg
Registered:1391491636 Posts: 7
Posted 1401242311
Reply with quote
#1
I'm trying to set up a serious of events. I'm currently using timers, since I don't really understand variables. But whenever I start the mission, every single thing happens within a second. And not the designated time I had set up in the script editor. Everything pretty much comes at me, and from the looks of it, its LOOPING. Any suggestions?
Nordk
Registered:1400632172 Posts: 5
Posted 1401246932
Reply with quote
#2
Setting up an order of events is most easily accomplished by using the set variable command at the end of an event, with each event increasing the variable by 1. For example:<set_variable name="chapter_1" value="1.0" /> In the Mission Editor it will look like: Then in the next event you have a condition that looks something like this:<if_variable name="chapter_1" comparator="EQUALS" value="1.0" /> Or in the Mission Editor (right-click, new condition) and then you put whatever actions you want to happen, followed by a command to set the variable to 2.0, and then everything repeats. Timers work the same way, through a condition. When using timers, I've found it most robust to use a variable condition in addition to the timer, such as:<if_variable name="chapter_1" comparator="EQUALS" value="1.0" /> <if_timer_finished name="SampleTimer" /> <warning_popup_message message="Look out! Aliens!" consoles="M" /> <set_variable name="chapter_1" value="2.0" /> In the Mission Editor it will look something like this:Conditions: -Variable "chapter_1" = 1.0 -Timer "SampleTimer" has finished Actions -Show warning popup message with text "Look out! Aliens!" to consoles: (Main) -Set variable "chapter_1" to 2.0 For references on conditions and actions, you can check here:http://artemis.forumchitchat.com/post/mission-script-reference-2-0-6477317?highlight=artscale&pid=1279280972#post1279280972
leaola
Registered:1386628133 Posts: 268
Posted 1401264049
Reply with quote
#3
did I set all your timers at the start and how long did u set them for? for sample timer to work it must have been set earlier. and with out added some to make it not true it will repeat for ever, so as long as the timer ended and u don't reset it will loop. so if u want to just use times after ever thing else goes off 'set_timer 1= big number'
Mike Substelny
Administrator
Registered:1375273622 Posts: 2,990
Posted 1401305438
Reply with quote
#4
You need variables or events will constantly loop. I haven't found a way around it. Can you share some of your XML code, Ole Greg?
__________________"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight." - Winston Churchill
Ole Greg
Registered:1391491636 Posts: 7
Posted 1401324845
Reply with quote
#5
I'll try out these tips, and if I still can't get it to work I'll share what I've got so far. I started out small, testing the mission with my 2 computers. Then I added in a butt load of new stuff, and this started happening. Now that I think about it, I'm pretty sure I had gone through and deleted the variables and replaced them with timers. Thanks for the help guys! (or ladies)