Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
AlecciaRosewater

Registered:
Posts: 3
Reply with quote  #1 
So I started scripting the first 20 seconds of a mission, and when I went to test it I got this wonderful wonderful message:

assertion failed.png 

I guess it could be a problem with the script, but then why would the error be within the executable rather then the script? I have zero idea how to fix this halp

Below is the mission script in question.

 
Attached Files
zip MISS_Coordinate_Four.zip (1.63 KB, 5 views)

MarkBell

Avatar / Picture

Administrator
Registered:
Posts: 1,648
Reply with quote  #2 
This assertion error happens more often with mission scripts than anything else.  The program is throwing an error because the script is telling it to do something it doesn't like.  In this instance, it is showing a problem with a ship with sideValue > 0 - in your case, that sounds like the Imprudent Constable.  As a neutral, I don't know if the sideValue can be greater than 0 - that may be for enemy types only.

Note: Moved to Mission Scripting.

__________________
Note - this is in no way intended to be an official position of Thom or Artemis, as I am not an official representative of the creator or game.
AlecciaRosewater

Registered:
Posts: 3
Reply with quote  #3 
I set sideValue=0 for Imprudent Constable at 0 as told, and did a search to see if any other sideValues are causing problems. All of them are at zero. I am still seeing the error message.

If the problem was not with something so basic as "place down neutral ships" then I would try to work around the issue, but alas...

I think I will write down what I want to do on paper instead while waiting for you guys to fix this for me. Critical crash-to-desktop errors are no excuse to stop coding [mad]
MarkBell

Avatar / Picture

Administrator
Registered:
Posts: 1,648
Reply with quote  #4 
Are you getting the same error message?  or is the message a little different?  Also, you may try having all the ships spawn in a new event, after the setup.  Like, set a half second timer, then spawn the ships.  There have been some instances of ships spawning in the setup event triggering errors when they load on top of each other.  Also, I don't know if you can set elite abilities for non enemy types - that may be causing the crash as well, I don't know.
__________________
Note - this is in no way intended to be an official position of Thom or Artemis, as I am not an official representative of the creator or game.
ryleyra

Registered:
Posts: 2,459
Reply with quote  #5 
Actually, I believe you have it backwards. The error message is not complaining because sideValue > 0, it is ASSERTING that sideValue > 0. So all the neutral ships that have sideValue 0 are throwing an exception.

Try setting sideValue to 1 for those ships. I believe sideValue 0 is for all enemy ships, while sideValue 1 is the first player side, sideValue 2 is the second player side, and so on. It's defined that way for team PvP.

Note this may contradict the older documentation.

Elite abilities are being set correctly, but you shouldn't set specials and captain/ship type in the same block. Instead try this: 

<set_special name="Imprudent Constable" captain="0" ship="2"/>
<set_special name="Imprudent Constable" ability="Tractor">
<set_special name="Imprudent Constable" ability="Teleport"/>
Fish Evans

Registered:
Posts: 350
Reply with quote  #6 
Maverick Gunslinger and Apprehensive Swindler have no spawn location

Side 0 is "no side"
Side 2 is defualt Player
Side 1 is the default enemy

Sides can go up to 32 ships on the same side will treat eachother as firendly im not entirly sure if 0 works currently.

You may consider using the Mission Editor, it flaged up the ship erros I mentiuoned the second I loaded it in.
AlecciaRosewater

Registered:
Posts: 3
Reply with quote  #7 
Quote:
Originally Posted by Fish Evans
You may consider using the Mission Editor,

But that is what I HAVE been using!

Quote:
Originally Posted by Fish Evans
it flaged up the ship erros I mentiuoned the second I loaded it in.

oh. If only I knew of that button earlier. Now that I have found it then everything just became much easier.

I set all the sideValue to 2. The mission runs now at least with all ships showing up as light blue. But for whatever reason, the mission comm dialogue starts with Shadow Bazzar saying "Leave none alive! Boo haa haa!" even though Bazzar is not hostile. Additionally, everything is pre-scanned on the science console - I want him to spend time scanning everything in the area.

What is the proper method of keeping comm dialogue from spamming itself? I could come up with a messy solution using timers and variables but surely there is a better way?
Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 1,716
Reply with quote  #8 
Shadow Bazzar must have a bombastic captain. He isn't talking to you, he is talking to any ship that dares to have another side value. He will continue to do that even if there are no ships with another side value. Bombastic captains are supposed to be annoying.

You can have the script force all your NPC captains to be something that makes more sense.

__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
Fish Evans

Registered:
Posts: 350
Reply with quote  #9 
if your refering to comms message event spamming activation. nope only way to handle it is to use a variable as a "fired" flag.

Welcome to programing.
ryleyra

Registered:
Posts: 2,459
Reply with quote  #10 
Quote:
Originally Posted by AlecciaRosewater
Additionally, everything is pre-scanned on the science console - I want him to spend time scanning everything in the area.


Unfortunately, all neutral ships are identified automatically. You'll have to use enemy ships if you want them to be unknown. And enemy ships will show up in red and be treated as enemies to Comms. You can set hasSurrendered, though, to turn that enemy ship yellow. You will also want to clear the brain stack.

You won't be able to tell when the ship is scanned, but you can wait until the player ship gets in range of the friendly ship, or it turns hostile, and destroy it and replace it with a brand new neutral or enemy ship. That will turn it red or blue on the screen and let Comms control or taunt it. (Note if it's an enemy and Comms gets it to surrender it will turn yellow again)

I'll add that I was wrong above. NO ship can be set sideValue=0. That value is illegal. Instead, side 1 is the enemy, side 2 is the player, and side 3+ is any additional player or enemy sides. That is, side 3 is an enemy to both side 1 and side 2.

See this post, which contains examples: https://artemis.forumchitchat.com/post/setting-ships-neutral-7736842?pid=1289371243
Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 1,716
Reply with quote  #11 
I sometimes want Science to scan friendly/neutral ships, too, but there is no way to do that.

You can conceal information in the Hail_text field. That way Communications needs to hail the neutral ship to learn the information.

__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.