Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
e4mafia

Registered:
Posts: 200
Reply with quote  #1 
Problem - the sound does not play when expected.
Expectation -
  • initialFailure timer begins
  • when timer complete, initialDamage variable set to 1.0
  • when initialDamage = 1.0 AND ship is in a nebula, play sound and set damage to systems
  • initialDamage set to 2.0

Code attached.


 
Attached Files
txt MISS_BGEvent.txt (4.54 KB, 3 views)

Darrin

Registered:
Posts: 86
Reply with quote  #2 
Some thoughts:

<event name="Initial Damage trigger" id_arme="e8b1087b-de27-41f7-9065-ba7d59343e53" parent_id_arme="215b50cc-07a0-42e8-b576-1d478448e128">
<if_timer_finished name="initialFailure" />
<set_variable name="initialDamage" value="1.0" />
</event>

You need to set an additional condition on this event so it turns off, otherwise it keeps executing over and over again, resetting initialDamage to 1.0 on every single tick. For example:

<event name="Initial Damage trigger" id_arme="e8b1087b-de27-41f7-9065-ba7d59343e53" parent_id_arme="215b50cc-07a0-42e8-b576-1d478448e128">
<if_timer_finished name="initialFailure" />
<if_variable name="initialDamage" comparator="EQUALS" value="0.0" />
<set_variable name="initialDamage" value="1.0" />
</event>

Initial Failure event looks fine, just be aware that the crew can choose a different hull type that has a different number of nodes. If you're deliberately trying to strand the player by taking out the warp drive, then the Artemis SBS Wiki on damage can give you a list of hull types and how many nodes they have for each system. 

For Ship Jump, you may want to add an additional condition, as this random jump will keep executing every 180 seconds... I'm not sure if that's what you intended. The generic mesh code works fine, although you can actually set Artemis' position directly by using 'Set numeric property "positionX/Y" to <variable> m west of right edge for object with name "Artemis"'. Same thing with angle. 




Newcommerin

Avatar / Picture

Registered:
Posts: 160
Reply with quote  #3 
Just an unqualified guess:

Change the positions of „Initial Damage Trigger“ an „Initial Failure“. I read something about the orde ris sometimes important.

__________________
Sorry, English is not my native language, I am German.
(* I wish I would live in America, I wish I would... *)
Any mistakes you can find, you can keep and with the spelling mistakes you can cook you an alphabet soup.

My Artemis Homepage: https://star-ship-academy.jimdo.com/
e4mafia

Registered:
Posts: 200
Reply with quote  #4 
Quote:
Originally Posted by Darrin
Some thoughts:

You need to set an additional condition on this event so it turns off, otherwise it keeps executing over and over again, resetting initialDamage to 1.0 on every single tick. For example:



Thanks - I see this error now. I forgot that its going to "forever check" on that timer, and once its done, without starting it again it will be done forever. That will forever keep resetting the variable to 1 as you stated. I'll correct that issue with another check condition.

As for the timer, those were temporary settings for test purposes. they will be longer in the actual scenario - Part of the shtick for this is a "malfunctioning jump drive" that will keep relocating them until they "fix" it.
e4mafia

Registered:
Posts: 200
Reply with quote  #5 

That fixed it, thanks!
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.