Oolite Bulletins

For information and discussion about Oolite.
It is currently Wed Oct 17, 2018 9:11 pm

All times are UTC




Post new topic  Reply to topic  [ 1432 posts ]  Go to page Previous 192 93 94 95 96
Author Message
 Post subject: Re: Scripters cove
PostPosted: Tue Aug 21, 2018 5:59 am 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 5259
Quote:
I am also looking at the Javascript function addCollisionException, but I am confused by it. For one thing, the name seems odd. For, the documentation seems to say that one uses it to prevent ships colliding. Also, how does that prevention work? Are the ships allowed to occupy the same space, but without taking damage? I presume that rather the ships are prevented from occupying the same space. How, though? Is it that, if the ship to which one adds the exception is powered, it will be made to try to avoid the other ship?
addCollisionException disables collision detection between the object it is applied on and the target object given by the function's argument. That's it, nothing special about it, really. When collision detection is disabled, stuff goes through other stuff. Here is a screenie of a Cobra which has its collision checks with the Coriolis disabled:
Image


Top
   
 Post subject: Re: Scripters cove
PostPosted: Tue Aug 21, 2018 6:26 am 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Sat Sep 12, 2009 11:58 pm
Posts: 1035
Location: Essex (mainly industrial and occasionally anarchic)
Hello a.n.

Ah, now I understand. Thanks. That routine is useless for my current purpose, but it should be good for the Hijacked Generation Ship (tm) in my Interstellar Tweaks, because ships launched from that do sometimes end up in the entrails of their mothership . .


Top
   
 Post subject: Re: Scripters cove
PostPosted: Mon Oct 01, 2018 6:46 pm 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Sat Sep 12, 2009 11:58 pm
Posts: 1035
Location: Essex (mainly industrial and occasionally anarchic)
Hey guys

How does the heat shield equipment work, programmatically? If I have a script increase the player ship's temperature, will the resulting temperature of that ship differ depending on whether the ship has a heat shield or not? Thanks. (I couldn't seem to find the answer in the docs.)


Top
   
 Post subject: Re: Scripters cove
PostPosted: Fri Oct 12, 2018 11:22 pm 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Sat Sep 12, 2009 11:58 pm
Posts: 1035
Location: Essex (mainly industrial and occasionally anarchic)
Also ('also' because: see my post above) I have the following problem.

I have this in a ship script:
Code:
this.$_fireQuirium = function() {
	log("ExtraThargoids", "OK 123." );
	this.ship.awardEquipment("EQ_QC_MINE");
	this.ship.commsMessage("We boom your bases!");
	this.ship.fireMissile("EQ_QC_MINE");
	this.$_deleteTimers();
};

And I get this in the log:
Code:
00:08:08.621 [ExtraThargoids]: OK 123.
00:08:08.959 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (Oolite Q-bomb AI 1.87): TypeError: this.explosion is undefined
00:08:08.959 [script.javaScript.exception.unexpectedType]:       Resources/AIs/oolite-qbombAI.js, line 40.
Oolite development version 1.87.0.7085-180729-89d301b (x86-64 test release) under Windows 6.3.9600.19155 64-bit.


Top
   
 Post subject: Re: Scripters cove
PostPosted: Sat Oct 13, 2018 4:20 am 
Offline
Deadly
Deadly
User avatar

Joined: Mon May 30, 2016 3:54 am
Posts: 178
Rustem had a new AI for the Q-Bomb: viewtopic.php?f=4&t=19298

Personally I use a very simple one which (most of the time) is actually working:
Code:
{
	GLOBAL = 
	{
		//ENTER = ("commsMessageByUnpiloted: [CWC_explosion_01]", "pauseAI: 5.0");
		ENTER = ("pauseAI: 5.0");
		UPDATE = ("setStateTo: DETONATE"); 
   };

	DETONATE = 
	{
		ENTER = (becomeEnergyBlast);
	};
}

_________________
Trying to survive behind the controls of a Caduceus Psi XT in Alpha test :lol:


Top
   
 Post subject: Re: Scripters cove
PostPosted: Sat Oct 13, 2018 3:32 pm 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Sat Sep 12, 2009 11:58 pm
Posts: 1035
Location: Essex (mainly industrial and occasionally anarchic)
Montana: ah, I see from that link that the Q-bomb has indeed been banned! Ha!

OK, this is working:
Code:
this.$_fireQuirium = function() {
	var qbomb = ship.spawnOne("extraThargoids_qmine"); 	 // inbuilt qmine AI is buggy.
	this.ship.commsMessage("We boom your bases!");
};
with this in shipdata:
Code:
	"extraThargoids_qmine" =
	{
		like_ship = "qbomb";
		ai_type = "extraThargoids_qMineAI.plist";
		roles = "energy-bomb(0) EQ_QC_MINE(0) extraThargoids_qmine";
		"script_info" = {"npc_shields" = no;};
	};
and the AI provided by Montana. Thanks!

EDITED.


Top
   
 Post subject: Re: Scripters cove
PostPosted: Sun Oct 14, 2018 3:41 am 
Offline
Deadly
Deadly
User avatar

Joined: Mon May 30, 2016 3:54 am
Posts: 178
Quote:
and the AI provided by Montana. Thanks!
Glad to help, I forgot to mention that you need to create your own Q-Weapon in order to make it work but you figured it out already. :)

_________________
Trying to survive behind the controls of a Caduceus Psi XT in Alpha test :lol:


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1432 posts ]  Go to page Previous 192 93 94 95 96

All times are UTC


Who is online

Users browsing this forum: No registered users and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited