Trouble with Emitters

Tero · 2546

Tero

  • Full Member
  • ***
    • Posts: 166
  • Happiness is not being quoted.
on: January 07, 2010, 02:46:03 am
I am having trouble with emitters in the map editor.  I want four emitters to fire in sequence.  I am going for an effect.  The first needs to start at 15 seconds, the second at 30 seconds, the third at 45 seconds the fourth at 60.  So naturally, I set the first emitter’s “Start” for 15, and its Interval” at 60.  The second emitter for 30 & 60, 3rd 45 & 60 the last emitter Start:60 & Interval:60.  Here’s what happens in the game.  At one minute all the emitters fire at the same time for the first time.  And all of them repeat once per minute.  Not in progression.   Which is what I am striving for.  Next, I tried keeping the “Start” the same, 60.  And making the “Interval” different by 15 seconds per emitter.  While the four emitters fired at one minute and then some or all every 15 seconds.  It’s not exactly what I am looking for.
Any ideas?

I respect those who quote me the least.


Aurzel

  • Sr. Member
  • ****
    • Posts: 1853
  • If at first you dont succeed ... kill the b@$tard
Reply #1 on: January 07, 2010, 10:29:31 am
start 15 ineterval 60 means the emitter will fire at 15 seconds, 75 seconds, etc every 60 seconds



Tero

  • Full Member
  • ***
    • Posts: 166
  • Happiness is not being quoted.
Reply #2 on: January 07, 2010, 12:35:26 pm
Quote
start 15 ineterval 60 means the emitter will fire at 15 seconds, 75 seconds, etc every 60 seconds

That's the basic idea of what I am striving for.  But what happens, like I wrote earlier, is at one minute(and not before) they all fire.  And they all fire at one minute intervals.  Instead of first emitter 1, then emitter 2 etc.  I have the emitters spaced apart.  And they are on an open elevation.  So there is nothing to hinder their flow.  And nothing on top of any of the emitters.
Today, I deleted three of the four emitters.   So there is just one with it's "Start" = 15 and "Interval" = 60.  The same thing happens.  At one minute (and not before) the emitter fires.  It fires again at 2 minutes, not 75 seconds.

I respect those who quote me the least.


Aurzel

  • Sr. Member
  • ****
    • Posts: 1853
  • If at first you dont succeed ... kill the b@$tard
Reply #3 on: January 07, 2010, 12:43:13 pm
have you taken the . out so that it's not reading 1.5 or something? that's al i can think of



djcian

  • Full Member
  • ***
    • Posts: 353
Reply #4 on: January 07, 2010, 07:55:09 pm
ok so i see what is happening i tried it and my guess is that the emitters rate starts counting at the beginning and is always telling it to fire creeper at the right time but the emitter delay you set keeps the creeper from actually coming out until a certain amount of time.  there is no way to get the effect you are talking about that i can think of but there is a way you could compromise and have one fire on the 30 sec mark (30, 90, 150)and one fire on the one minute mark(60, 120, 180)
« Last Edit: January 07, 2010, 08:04:29 pm by djcian »

grant me the serenity to accept the things i can not change, the courage to change the things i can, and the wisdom to know the difference


knucracker

  • Administrator
  • *****
    • Posts: 11761
Reply #5 on: January 07, 2010, 08:17:13 pm
Good grief.... this just has not been my week :)

Here is the code for when an emitter fires.... see the problem?

if (!off && updateCount >= startTime && updateCount <= finishTime && updateCount % productionInterval == 0) {
 //Emit creeper
}

If you set the interval to 1 second, the emitters will all start at the "Start" time you specify.  If you specify something large for the interval, then then emitters won't fire until that time (updateCount % 60 == 0).

I probably never tested with large interval values, so I never caught this.  Now the challenge is how to correct this without disturbing any existing custom maps.  I suppose I could change the logic only for maps made with the newer map editor (the one I'll release along with the new game update).

Dang, I just can't catch a break this week!  :)





betadata

  • Full Member
  • ***
    • Posts: 137
Reply #6 on: January 07, 2010, 08:22:34 pm
see what happens when you let others play with your toys.  They break them.  ;)



Tero

  • Full Member
  • ***
    • Posts: 166
  • Happiness is not being quoted.
Reply #7 on: January 08, 2010, 01:19:33 am
The only computer language I know is G&M.  So I can't appreciate what you posted above.  My first goal was to test the survivability of the various items when built on top of a slow & weak emitter.  Then the idea of having the emitters fire in sequence, so I could count the number of cycles before the items failed.  But if you could get the “Start” variable to work then,  the possibilities of obstacles in maps really takes off.

I respect those who quote me the least.


Aurzel

  • Sr. Member
  • ****
    • Posts: 1853
  • If at first you dont succeed ... kill the b@$tard
Reply #8 on: January 08, 2010, 06:04:00 am
yeah i didnt catch what the problem was, i think he's saying the programming wont accept long intervals?