Author Topic: Trying to debug a misson. Couple of quick qestions  (Read 1856 times)

0 Members and 1 Guest are viewing this topic.

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Trying to debug a misson. Couple of quick qestions
I'd try it myself but my weekly backup just started and running FS2 enough times would take forever right now. 

Anyway I have a self-destruct event based on a variable that is set in a when-argument loop.  Basically it's like this

when
-->(whatever)
-->when-argument
---->in-sequence
------><list>
---->(whatever>
---->when
------>string-equals
--------><argument>
--------><last item in list>
------>modify-variable
-------->phase2(0) +1
---->invalidate-argument


That whole sequence works with the possible exception of the string-equals.  Any known problems with using it to compare <argument>?

Next event
when
--> =
---->phase2(0)
---->1
-->self-destruct
----><list of 3 ships>

They don't blow up.  Now they do have a guardian threshold.  Does that override self-destruct?  They were blowing up before though but that was several 3.6.10 versions ago. 

Oh and this is multiplayer. 
« Last Edit: January 08, 2009, 01:42:50 pm by FUBAR-BDHR »
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Trying to debug a misson. Couple of quick qestions
Your invalidate argument is in the wrong place. What you have is

For X=0 to last ship
-When X = last ship
--Do stuff
--Increment X

X will never be incremented as you'll never enter the inner loop. It will just keep working on the first ship in the list. The Invalidate argument needs to be on the same level as the inner When. That way the list will invalidate the first valid ship on the list and move onto the next one each time it is called.

I've got no idea why this would work earlier. It never should have worked. Unless you made it just after I fixed inner loops. There was a bug in the way I did it back then which caused it to read the list incorrectly. That bug was  fixed months ago though.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Trying to debug a misson. Couple of quick qestions
Yes I did make it after the inner loop fix and I believe I have the invalidate-argument in the right place in the mission I just put it in the wrong one in the message.  Fixing it. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Trying to debug a misson. Couple of quick qestions
Hmmmm. In that case I'm a little mystified. Have you tried outputting the variable in a message to see if it is being incremented at all?

Self destruct shouldn't be affected by ship-guardian IIRC but I'll take a look and see if it is if you're sure that it's being incremented.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Trying to debug a misson. Couple of quick qestions
That was my next step but I couldn't try it last night due to the backup.  I'll be trying that later on. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Trying to debug a misson. Couple of quick qestions
Huston we have a bug!!!!!!!!


<argument> apparently doesn't get along with string-equals.  I did the message thing, nothing, put the message in then when-argument loop and correct values.  Stored the <argument> to a variable and used that in the string-equals and it works.   

Reported. http://scp.indiegames.us/mantis/view.php?id=1867 

No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Trying to debug a misson. Couple of quick qestions
That's rather odd. I'll look into it.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

  

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Trying to debug a misson. Couple of quick qestions
Might be a more widespread problem.  I just had another event not working with a when under a when-argument under a when.  This one looked like this:

when
-->(whatever)
---->when-argument
------->random-multiple-of
----------><list>
------->(whatever)
------->when
--------->and
----------->has-arrived-delay
------------->0
-------------><argument>
----------->not
------------->is-destroyed-delay
--------------->0
---------------><argument>
--------->self-destruct
-----------><argument>
------->invalidate-argument
---------><argument>
----->(some variable stuff)

Didn't do anything at all.  I just put the self destruct where the when was and it worked.   Guess self-destruct doesn't care if the ships aren't in the mission at the time. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Trying to debug a misson. Couple of quick qestions
I'm likely to be very busy the next few days with Diaspora but this is now my top priority bug. :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]