 |
View previous topic :: View next topic |
 |
|
|
|
|
Author |
Message |
|
|
|
|
|
Matterom
Joined: 20 Aug 2009 Posts: 287 on topic Location: my own little world

 |
Posted: Tue, 15. May 12, 03:48 Post subject: Unfinished[Script] Jump Singularity |
|
|
Although unfinished i wanted to know How you(the community) think this Script should work.
Also Using this post to coalesce the idea
Concept: Modify Vanilla Jump Command to "Pull" Surrounding ships into the Jump "Event" Propelling both the ship with the jump drive and smaller ships without the jump drive to target Gate.
Details:
Ships of class M6 and up will cause a jump ripple that will pull others into the jump regardless of faction affiliation
The size of the ripple will be determined by the size of said ship
M6 sized ships jump Smaller Vessels within a radius of 500m
M7s can jump Ts, fighters and M6s with a radius of 2km
M2s and M1s jump Everything an M7 can but within a radius of 3km
What this is useful for, don't know but it felt like it should be done.
Also: Should i cause ships that jump near each other take damage?
Eg: Small ships get pulled into the jump and larger ships get pulled but are to big, thus take damage,(At most shield damage or just a set amount so as the possibility of using it as a weapon?)
Anyway still finishing the proof of concept script so tell me if you have any ideas
Last edited by Matterom on Wed, 23. May 12, 06:24; edited 1 time in total |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
LV Moderator (Script&Mod)


Joined: 06 Nov 2002 Posts: 6299 on topic Location: The Dark Side

|
Posted: Tue, 15. May 12, 11:53 Post subject: Re: Scripting Assistance |
|
|
| Geekey265 wrote: |
This is a long shot question really, but i could use scripting help from someone. Having a hard time figuring out what command does what and i kind of want to actually finish a script for once instead of saying i will then getting frustrated and quitting.
If not then i would just like to ask:
What would select all allies, owned and enemy ships within a radius of a ship jumping
universe commands
006 |$enemy = find ship: sector=$sec class or type=Moveable Ship race=$anull flags=find multiple refobj=$ship maxdist=10000 maxnum=100 refpos=$anull
what would tell if a ship was jumping or not
there is a command in the universe section which states "is ship jumping" not sure if it works or not (it may be at bottom of 2nd generaL menu)
and what can cause ships to free jump without a jumpdrive
2nd general menu, put into environment $sector
|
_________________ LV's TC Scripts
Readme's For All My Scripts
I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced
LV has left the building |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Matterom
Joined: 20 Aug 2009 Posts: 287 on topic Location: my own little world

|
Posted: Tue, 15. May 12, 15:05 Post subject: |
|
|
Thanks Lv hopefuly this will put me on the right track
What i Think i am trying to do is to:
First detect any ship sized M6 or Larger that is about to jump
Determine where that ship is going
Determine the amount, and class of ships within a varying distance from the jumping ship
If ship size <M6(Jship Size) Then Jump Ship to Target sector
If ship size =M6(Jship Size) Ship is jumped but drops off in a random sector between target point(Yes, No?)
If Ship size >M6(Jship size) Ship is unaffected
Allied Jumps Should ideally pull the player ship along
Any other helpful advice?
Edit: All i see is (RetVar/if) Is Player Warping in fly commands, is that it?
_________________ Geek is my name, gaming is ......? that wont rhyme o well you get the idea |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
X2-Illuminatus Moderator (Deutsch)

Joined: 02 Apr 2006 Posts: 14890 on topic

|
Posted: Tue, 15. May 12, 20:07 Post subject: |
|
|
| Geekey265 wrote: |
| Any other helpful advice? |
Edit the jump script(s)! They're called and executed anyway, when a ship jumps. So there's no need to write an own script to constantly check for jumping ships.
| Geekey265 wrote: |
| Edit: All i see is (RetVar/if) Is Player Warping in fly commands, is that it? |
Probably. At least I'm not aware of any other command that does something like this.
_________________ Schreibwettbewerb der Kreativen Zone
X-BtF Anniversary Screensaver von TVCD
VAGABUND von arragon0815
FAQ - häufig gestellte Fragen einfach beantwortet.
XDownloads - Upload, Link, Download
"...time it seems does not care if you have stuff to do or not, it just goes by regardless." - Ketraar |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Matterom
Joined: 20 Aug 2009 Posts: 287 on topic Location: my own little world

|
Posted: Fri, 18. May 12, 03:00 Post subject: |
|
|
Ok so i had trouble getting the jump scripts to show up
Anyway [THIS] Defines the ship using the jump command correct?
If [this] is of class: Bigship
$Nearest = find ship: sector=$sector class or type=Littleship ship
race=$anull flags=[find.multiple] refobj=[This] maxdist=10000 maxnum=100
refpos=[This]
$Nearest put into enviroment $target
this is a mess but what exactly am i doing wrong
_________________ Geek is my name, gaming is ......? that wont rhyme o well you get the idea |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
X2-Illuminatus Moderator (Deutsch)

Joined: 02 Apr 2006 Posts: 14890 on topic

|
Posted: Fri, 18. May 12, 11:40 Post subject: |
|
|
| Quote: |
| Anyway [THIS] Defines the ship using the jump command correct? |
[THIS] is always the object the script is running on, so in many cases the ship that executes a certain command.
| Quote: |
| Anyway [THIS] Defines the ship using the jump command correct? |
Well, first of all the flag "[Find.Multiple]" will, as the name suggests, find multiple ships. So, if there are more ships in range the command will return all. Also with [Find.Multiple] the command will always return an array, even if only one ship was found in range (or null, if none was found). So, you will have to get one of these ships from the array to have a valid reference object for your "put into environment"-command.
_________________ Schreibwettbewerb der Kreativen Zone
X-BtF Anniversary Screensaver von TVCD
VAGABUND von arragon0815
FAQ - häufig gestellte Fragen einfach beantwortet.
XDownloads - Upload, Link, Download
"...time it seems does not care if you have stuff to do or not, it just goes by regardless." - Ketraar |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Cycrow Moderator (Script&Mod)


Joined: 15 Nov 2004 Posts: 19862 on topic Location: London

|
Posted: Fri, 18. May 12, 20:30 Post subject: |
|
|
also refpos is a position array, u'll confuse the command by sending in an object instead of an array. You only need either refobj, or refpos, you generally dont need both
_________________ My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Matterom
Joined: 20 Aug 2009 Posts: 287 on topic Location: my own little world

|
Posted: Wed, 23. May 12, 06:37 Post subject: |
|
|
When i set variables in arrays do i always have to pre-define them in some form or fashion earlier in the script, and are there pre-defined variables that the script editor already knows, like sector or ship for instance, and going over multiple jump scripts i assume that i need to apply an argument for the variable Nearest?
trying to understand the very well written handbook and the very extensive database of commands only to think, hrm back to page 1
also for refpos i can set value to null and be good right?
_________________ Geek is my name, gaming is ......? that wont rhyme o well you get the idea |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Gazz Moderator (Script&Mod)


Joined: 13 Jan 2006 Posts: 12154 on topic Location: Bavaria

|
Posted: Wed, 23. May 12, 11:55 Post subject: |
|
|
When using put into environment, you have to pay close attention to all scripts running on the ship.
Some scripts (especially task 0 scripts!) do not expect to have their ship change sectors at odd times. It's is expected that they are the ones to do the sector changing.
It may not be likely but worst case this can get you a crash.
_________________ My complete script download page. . . . . . Xai-Corp MSCI List is scripter's friend. I AM THE LAW!
Dogs and colour blindness explained: People with green eyes can't see dogs. |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Matterom
Joined: 20 Aug 2009 Posts: 287 on topic Location: my own little world

|
Posted: Wed, 23. May 12, 14:47 Post subject: |
|
|
So i should have a 2 part script that shuts off the script it is running prior to a jump?
_________________ Geek is my name, gaming is ......? that wont rhyme o well you get the idea |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
|
|